CI: Gate on C23 compilers; move older compilers to canaries #125
Workflow file for this run
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| name: C-Core Gate | |
| on: [pull_request] | |
| permissions: | |
| contents: read | |
| jobs: | |
| build-test: | |
| runs-on: ubuntu-latest | |
| steps: | |
| - uses: actions/checkout@v4 | |
| - name: Install LLVM 20 and build tools | |
| run: | | |
| sudo apt-get update | |
| sudo apt-get install -y wget gnupg lsb-release python3-pip | |
| wget -O - https://apt.llvm.org/llvm.sh | sudo bash -s -- 20 | |
| sudo apt-get install -y clang-20 clang-tidy-20 cppcheck libsodium-dev libgit2-dev | |
| sudo ln -sf /usr/bin/clang-tidy-20 /usr/local/bin/clang-tidy | |
| sudo ln -sf /usr/bin/clang++-20 /usr/local/bin/clang++ | |
| sudo ln -sf /usr/bin/clang-20 /usr/local/bin/clang | |
| pip3 install --break-system-packages meson ninja | |
| - name: Build & capture compile DB | |
| run: | | |
| CC=clang meson setup build | |
| ninja -C build | |
| cp build/compile_commands.json . | |
| - name: clang-tidy (diff-guard) | |
| run: | | |
| clang-tidy -quiet -p . --config-file=quality/.clang-tidy \ | |
| $(git ls-files 'core/**/*.c' 'core/**/*.h' | grep -v -E '(test_|_test\.|/tests/)') \ | |
| | tee clang-tidy-report-full.txt || true | |
| # Filter to just project warnings | |
| grep -E "^/.*core/|^core/" clang-tidy-report-full.txt > clang-tidy-report.txt || true | |
| - name: Enforce no new warnings | |
| run: python3 tools/count_warnings.py check clang-tidy-report.txt tools/baseline_count.txt | |
| - run: cppcheck --enable=all --inconclusive --quiet src | |
| - run: python tools/run_fuzz.py 60 |