clang-tidy.yml: updated to Clang 21 (#421) #20
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
| # Syntax reference https://help.github.com/en/actions/reference/workflow-syntax-for-github-actions | |
| # Environment reference https://help.github.com/en/actions/reference/virtual-environments-for-github-hosted-runners | |
| name: clang-tidy | |
| on: [push, pull_request] | |
| permissions: | |
| contents: read | |
| jobs: | |
| build: | |
| runs-on: ubuntu-24.04 | |
| steps: | |
| - uses: actions/checkout@v4 | |
| with: | |
| persist-credentials: false | |
| # the man-db trigger causes package installations to stall for several minutes at times. so just drop the package. | |
| # see https://github.com/actions/runner/issues/4030 | |
| - name: Remove man-db package | |
| run: | | |
| sudo apt-get update | |
| sudo apt-get remove man-db | |
| - name: Install missing software | |
| run: | | |
| sudo apt-get update | |
| sudo apt-get install -y cmake make | |
| - name: Install clang | |
| run: | | |
| wget https://apt.llvm.org/llvm.sh | |
| chmod +x llvm.sh | |
| sudo ./llvm.sh 21 | |
| sudo apt-get install clang-tidy-21 | |
| - name: Verify clang-tidy configuration | |
| run: | | |
| clang-tidy-21 --verify-config | |
| - name: Prepare CMake | |
| run: | | |
| cmake -S . -B cmake.output -Werror=dev --warn-uninitialized -DCMAKE_COMPILE_WARNING_AS_ERROR=On -DCMAKE_EXPORT_COMPILE_COMMANDS=ON | |
| env: | |
| CXX: clang-21 | |
| - name: Clang-Tidy | |
| run: | | |
| run-clang-tidy-21 -q -j $(nproc) -p=cmake.output |