brintos

brintos / llvm-project-archived public Read only

0
0
Text · 3.2 KiB · a823dad Raw
96 lines · yaml
1name: Post-Commit Static Analyzer2 3permissions:4  contents: read5 6on:7  push:8    branches:9      - 'release/**'10    paths:11      - 'clang/**'12      - 'llvm/**'13      - '.github/workflows/ci-post-commit-analyzer.yml'14  pull_request:15    types:16      - opened17      - synchronize18      - reopened19      - closed20    paths:21      - '.github/workflows/ci-post-commit-analyzer.yml'22      - '.github/workflows/ci-post-commit-analyzer-run.py'23  schedule:24    - cron: '30 0 * * *'25 26concurrency:27  group: >-28    llvm-project-${{ github.workflow }}-${{ github.event_name == 'pull_request' &&29      ( github.event.pull_request.number || github.ref) }}30  cancel-in-progress: ${{ startsWith(github.ref, 'refs/pull/') }}31 32jobs:33  post-commit-analyzer:34    if: >-35      github.repository_owner == 'llvm' &&36      github.event.action != 'closed'37    runs-on: ubuntu-24.0438    container:39      image: 'ghcr.io/llvm/ci-ubuntu-24.04:latest'40    env:41      LLVM_VERSION: 1842    steps:43      - name: Checkout Source44        uses: actions/checkout@1af3b93b6815bc44a9784bd300feb67ff0d1eeb3 # v6.0.045 46      - name: Setup ccache47        uses: hendrikmuhs/ccache-action@5ebbd400eff9e74630f759d94ddd7b6c26299639 # v1.2.2048        with:49          # A full build of llvm, clang, lld, and lldb takes about 250MB50          # of ccache space. There's not much reason to have more than this,51          # because we usually won't need to save cache entries from older52          # builds.  Also, there is an overall 10GB cache limit, and each53          # run creates a new cache entry so we want to ensure that we have54          # enough cache space for all the tests to run at once and still55          # fit under the 10 GB limit.56          # Default to 2G to workaround: https://github.com/hendrikmuhs/ccache-action/issues/17457          max-size: 2G58          key: post-commit-analyzer59          variant: sccache60 61      - name: Configure62        run: |63              cmake -B build -S llvm -G Ninja \64                  -DLLVM_ENABLE_ASSERTIONS=ON \65                  -DLLVM_ENABLE_PROJECTS=clang \66                  -DLLVM_BUILD_LLVM_DYLIB=ON \67                  -DLLVM_LINK_LLVM_DYLIB=ON \68                  -DCMAKE_CXX_COMPILER=clang++ \69                  -DCMAKE_C_COMPILER=clang \70                  -DCMAKE_CXX_COMPILER_LAUNCHER=sccache \71                  -DCMAKE_C_COMPILER_LAUNCHER=sccache \72                  -DCMAKE_EXPORT_COMPILE_COMMANDS=ON \73                  -DLLVM_INCLUDE_TESTS=OFF \74                  -DCLANG_INCLUDE_TESTS=OFF \75                  -DCMAKE_BUILD_TYPE=Release76 77      - name: Build78        run: |79          # FIXME: We need to build all the generated header files in order to be able to run80          # the analyzer on every file.  Building libLLVM and libclang is probably overkill for81          # this, but it's better than building every target.82          ninja -v -C build libLLVM.so libclang.so83 84          # Run the analyzer.85          python3 .github/workflows/ci-post-commit-analyzer-run.py build/compile_commands.json86 87          scan-build --generate-index-only build/analyzer-results88 89      - name: Upload Results90        uses: actions/upload-artifact@330a01c490aca151604b8cf639adc76d48f6c5d4 # v5.0.091        if: always()92        with:93          name: analyzer-results94          path: 'build/analyzer-results/*'95 96