ci: build and test fairmq-tidy against LLVM 17 to 20

- Add a tidy-tool job with one entry per LLVM release of the Ubuntu
  24.04 archive. It builds fairmq-tidy and runs the tidy.* tests.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
This commit is contained in:
Claude
2026-11-09 22:39:03 +00:00
parent 22d7eb671f
commit 78d764bcd3

View File

@@ -214,6 +214,63 @@ jobs:
ulimit -l
ctest --test-dir build --output-on-failure --no-tests=error --parallel "$(nproc)"
tidy-tool:
if: github.repository == 'FairRootGroup/FairMQ'
name: tidy-tool-llvm-${{ matrix.llvm }}
runs-on: ubuntu-24.04
strategy:
fail-fast: false
matrix:
# all LLVM releases of the Ubuntu 24.04 archive
llvm: ['17', '18', '19', '20']
steps:
- uses: actions/checkout@v6
with:
submodules: true
fetch-tags: true
fetch-depth: 0
- name: Setup spack environment
uses: ./.github/actions/setup-deps
with:
gcc: '14'
- name: Install LLVM
run: |
sudo apt-get update
# clang-N ships ClangConfig.cmake, clang-tools-N the executables
# it imports, llvm-N-tools FileCheck
sudo apt-get install -y --no-install-recommends \
llvm-${{ matrix.llvm }}-dev llvm-${{ matrix.llvm }}-tools \
clang-${{ matrix.llvm }} clang-tools-${{ matrix.llvm }} \
libclang-${{ matrix.llvm }}-dev libclang-cpp${{ matrix.llvm }}-dev \
libzstd-dev libedit-dev libcurl4-openssl-dev
- name: ccache
uses: hendrikmuhs/ccache-action@d62db5f07c26379fc4b4e0916f098a92573c3b03 # v1.2.23
with:
key: ${{ github.job }}-llvm${{ matrix.llvm }}
max-size: 500M
- name: Configure
run: |
cmake -S . -B build -G Ninja \
-DCMAKE_BUILD_TYPE=RelWithDebInfo \
-DBUILD_TESTING=ON \
-DBUILD_EXAMPLES=OFF \
-DBUILD_TIDY_TOOL=ON \
-DLLVM_DIR=/usr/lib/llvm-${{ matrix.llvm }}/lib/cmake/llvm \
-DClang_DIR=/usr/lib/llvm-${{ matrix.llvm }}/lib/cmake/clang \
-DCMAKE_C_COMPILER_LAUNCHER=ccache \
-DCMAKE_CXX_COMPILER_LAUNCHER=ccache
- name: Build
run: cmake --build build --target fairmq-tidy
- name: Test
run: ctest --test-dir build --output-on-failure --no-tests=error -R '^tidy\.'
static-analysis:
if: github.repository == 'FairRootGroup/FairMQ'
name: static-analysis