Skip to content

Bump actions/cache from 4.3.0 to 5.0.1 (#869) #926

Bump actions/cache from 4.3.0 to 5.0.1 (#869)

Bump actions/cache from 4.3.0 to 5.0.1 (#869) #926

name: Clang Static Analyzer
on:
workflow_dispatch:
push:
branches: [ main, "release/**" ]
pull_request:
branches: [ main ]
permissions:
contents: read
jobs:
Analyze:
runs-on: ubuntu-latest
permissions:
# Needed to upload the results to code-scanning dashboard.
security-events: write
contents: read
steps:
- name: Setup
run: |
echo "set man-db/auto-update false" | sudo debconf-communicate && sudo dpkg-reconfigure man-db
sudo apt-get -qq update
sudo apt-get -qq install -y ninja-build clang-tools
- name: Checkout
uses: actions/checkout@8e8c483db84b4bee98b60c0593521ed34d9990e8 # v6.0.1
with:
submodules: true
- name: Configure & Build
run: |
LLVM_VER=`clang --version | head -n1 | grep -Eo '[0-9]+\.[0-9]+\.[0-9]+' | cut -d. -f1`
echo "Using LLVM version $LLVM_VER"
mkdir build
cd build
scan-build-py-$LLVM_VER cmake -G Ninja -DPCRE2_SUPPORT_JIT=ON -DCMAKE_BUILD_TYPE=Debug ..
scan-build-py-$LLVM_VER -o clang-sarif-root/ --sarif-html ninja
rm clang-sarif-root/*/result-*.sarif
mv clang-sarif-root/* ../clang-report
../.github/scripts/merge_sarif.py ../clang-report/results-merged.sarif
# Upload the browsable HTML report as an artifact.
- name: Upload report
uses: actions/upload-artifact@b7c566a772e6b6bfb58ed0dc250532a479d7789f # v6.0.0
with:
name: "Clang Static Analyzer report"
path: './clang-report'
# Upload the results to GitHub's code scanning dashboard.
- name: "Upload to code-scanning"
uses: github/codeql-action/upload-sarif@5d4e8d1aca955e8d8589aabd499c5cae939e33c7 # v3.29.5
with:
sarif_file: ./clang-report/results-merged.sarif
category: clang-analyzer