From 78d764bcd3aae4c6092c2971659936f57306bb03 Mon Sep 17 00:00:00 2001 From: Claude Date: Mon, 9 Nov 2026 22:39:03 +0000 Subject: [PATCH] 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 --- .github/workflows/ci.yml | 57 ++++++++++++++++++++++++++++++++++++++++ 1 file changed, 57 insertions(+) diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml index aea49bd0..f3df4805 100644 --- a/.github/workflows/ci.yml +++ b/.github/workflows/ci.yml @@ -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