This PR contains the following updates: | Package | Type | Update | Change | Pending | |---|---|---|---|---| | [EnricoMi/publish-unit-test-result-action](https://redirect.github.com/EnricoMi/publish-unit-test-result-action) | action | minor | `v2.23.0` → `v2.24.0` | | | [actions/attest-build-provenance](https://redirect.github.com/actions/attest-build-provenance) | action | patch | `v4.1.0` → `v4.1.1` | | | [actions/checkout](https://redirect.github.com/actions/checkout) | action | patch | `v6.0.2` → `v6.0.3` | | | [actions/checkout](https://redirect.github.com/actions/checkout) | action | patch | `v6.0.1` → `v6.0.3` | | | [actions/create-github-app-token](https://redirect.github.com/actions/create-github-app-token) | action | minor | `v3.1.1` → `v3.2.0` | | | [actions/labeler](https://redirect.github.com/actions/labeler) | action | minor | `v6.0.1` → `v6.2.0` | | | [actions/setup-node](https://redirect.github.com/actions/setup-node) | action | minor | `v6.3.0` → `v6.5.0` | | | [actions/setup-python](https://redirect.github.com/actions/setup-python) | action | minor | `v6.2.0` → `v6.3.0` | | | [actions/upload-artifact](https://redirect.github.com/actions/upload-artifact) | action | patch | `v7.0.0` → `v7.0.1` | | | [aminya/setup-cpp](https://redirect.github.com/aminya/setup-cpp) | action | patch | `v1.8.0` → `v1.8.1` | | | [docker/login-action](https://redirect.github.com/docker/login-action) | action | minor | `v4.1.0` → `v4.4.0` | | | ghcr.io/llvm/amd64/ci-ubuntu-24.04-github-automation | container | digest | `82b5304` → `f419363` | | | ghcr.io/llvm/ci-ubuntu-24.04 | container | digest | `cc4fd65` → `26c16c2` | | | ghcr.io/llvm/ci-ubuntu-24.04-abi-tests | container | digest | `cb3aea3` → `a948062` | | | ghcr.io/llvm/ci-ubuntu-24.04-lint | container | digest | `91665a4` → `416874e` | | | ghcr.io/llvm/libc-ubuntu-24.04 | container | digest | `a902fb5` → `b9c8ea7` | | | [github/codeql-action](https://redirect.github.com/github/codeql-action) | action | minor | `v4.35.2` → `v4.37.0` | `v4.37.1` | | [hendrikmuhs/ccache-action](https://redirect.github.com/hendrikmuhs/ccache-action) | action | patch | `v1.2.22` → `v1.2.23` | | | [zizmorcore/zizmor-action](https://redirect.github.com/zizmorcore/zizmor-action) | action | minor | `v0.5.3` → `v0.6.0` | |
97 lines
3.4 KiB
YAML
97 lines
3.4 KiB
YAML
name: Post-Commit Static Analyzer
|
|
|
|
permissions:
|
|
contents: read
|
|
|
|
on:
|
|
push:
|
|
branches:
|
|
- 'release/**'
|
|
paths:
|
|
- 'clang/**'
|
|
- 'llvm/**'
|
|
- '.github/workflows/ci-post-commit-analyzer.yml'
|
|
pull_request:
|
|
types:
|
|
- opened
|
|
- synchronize
|
|
- reopened
|
|
- closed
|
|
paths:
|
|
- '.github/workflows/ci-post-commit-analyzer.yml'
|
|
- '.github/workflows/ci-post-commit-analyzer-run.py'
|
|
schedule:
|
|
- cron: '30 0 * * *'
|
|
|
|
concurrency:
|
|
group: >-
|
|
llvm-project-${{ github.workflow }}-${{ github.event_name == 'pull_request' &&
|
|
( github.event.pull_request.number || github.ref) }}
|
|
cancel-in-progress: ${{ startsWith(github.ref, 'refs/pull/') }}
|
|
|
|
jobs:
|
|
post-commit-analyzer:
|
|
if: >-
|
|
github.repository_owner == 'llvm' &&
|
|
github.event.action != 'closed'
|
|
runs-on: ubuntu-24.04
|
|
container:
|
|
image: 'ghcr.io/llvm/ci-ubuntu-24.04:latest@sha256:26c16c2c1d57a0e052e01873db555dd56f1d462cbacdd496fecae0b486266a8e'
|
|
env:
|
|
LLVM_VERSION: 18
|
|
steps:
|
|
- name: Checkout Source
|
|
uses: actions/checkout@df4cb1c069e1874edd31b4311f1884172cec0e10 # v6.0.3
|
|
with:
|
|
persist-credentials: false
|
|
|
|
- name: Setup ccache
|
|
uses: hendrikmuhs/ccache-action@d62db5f07c26379fc4b4e0916f098a92573c3b03 # v1.2.23
|
|
with:
|
|
# A full build of llvm, clang, lld, and lldb takes about 250MB
|
|
# of ccache space. There's not much reason to have more than this,
|
|
# because we usually won't need to save cache entries from older
|
|
# builds. Also, there is an overall 10GB cache limit, and each
|
|
# run creates a new cache entry so we want to ensure that we have
|
|
# enough cache space for all the tests to run at once and still
|
|
# fit under the 10 GB limit.
|
|
# Default to 2G to workaround: https://github.com/hendrikmuhs/ccache-action/issues/174
|
|
max-size: 2G
|
|
key: post-commit-analyzer
|
|
variant: sccache
|
|
|
|
- name: Configure
|
|
run: |
|
|
cmake -B build -S llvm -G Ninja \
|
|
-DLLVM_ENABLE_ASSERTIONS=ON \
|
|
-DLLVM_ENABLE_PROJECTS=clang \
|
|
-DLLVM_BUILD_LLVM_DYLIB=ON \
|
|
-DLLVM_LINK_LLVM_DYLIB=ON \
|
|
-DCMAKE_CXX_COMPILER=clang++ \
|
|
-DCMAKE_C_COMPILER=clang \
|
|
-DCMAKE_CXX_COMPILER_LAUNCHER=sccache \
|
|
-DCMAKE_C_COMPILER_LAUNCHER=sccache \
|
|
-DCMAKE_EXPORT_COMPILE_COMMANDS=ON \
|
|
-DLLVM_INCLUDE_TESTS=OFF \
|
|
-DCLANG_INCLUDE_TESTS=OFF \
|
|
-DCMAKE_BUILD_TYPE=Release
|
|
|
|
- name: Build
|
|
run: |
|
|
# FIXME: We need to build all the generated header files in order to be able to run
|
|
# the analyzer on every file. Building libLLVM and libclang is probably overkill for
|
|
# this, but it's better than building every target.
|
|
ninja -v -C build libLLVM.so libclang.so
|
|
|
|
# Run the analyzer.
|
|
python3 .github/workflows/ci-post-commit-analyzer-run.py build/compile_commands.json
|
|
|
|
scan-build --generate-index-only build/analyzer-results
|
|
|
|
- name: Upload Results
|
|
uses: actions/upload-artifact@043fb46d1a93c77aae656e7c1c64a875d1fc6a0a # v7.0.1
|
|
if: always()
|
|
with:
|
|
name: analyzer-results
|
|
path: 'build/analyzer-results/*'
|
|
|