From 6afa1b7aa1a346ef518dced2246199a105add3ec Mon Sep 17 00:00:00 2001 From: Claude Date: Mon, 9 Nov 2026 22:40:43 +0000 Subject: [PATCH] ci: test the minimum CMake version - Build, test and check the installation with CMake 3.25.0 from PyPI Co-Authored-By: Claude Sonnet 5.5 --- .github/workflows/ci.yml | 48 ++++++++++++++++++++++++++++++++++++++++ 1 file changed, 48 insertions(+) diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml index 4ae071ed..aea49bd0 100644 --- a/.github/workflows/ci.yml +++ b/.github/workflows/ci.yml @@ -67,6 +67,54 @@ jobs: - name: Check installation with a downstream project run: test/consumer/check-install.sh build + min-cmake: + if: github.repository == 'FairRootGroup/FairMQ' + name: min-cmake-3.25 + runs-on: ubuntu-24.04 + + 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: ccache + uses: hendrikmuhs/ccache-action@d62db5f07c26379fc4b4e0916f098a92573c3b03 # v1.2.23 + with: + key: ${{ github.job }} + max-size: 500M + + - name: Install the minimum CMake version + # Must match cmake_minimum_required() in CMakeLists.txt + run: | + python3 -m venv "$RUNNER_TEMP/min-cmake" + "$RUNNER_TEMP/min-cmake/bin/pip" install --only-binary :all: cmake==3.25.0 + echo "$RUNNER_TEMP/min-cmake/bin" >> "$GITHUB_PATH" + + - name: Configure and Build + run: | + cmake --version + cmake -S . -B build -G Ninja \ + -DCMAKE_BUILD_TYPE=RelWithDebInfo \ + -DBUILD_TESTING=ON \ + -DCMAKE_C_COMPILER_LAUNCHER=ccache \ + -DCMAKE_CXX_COMPILER_LAUNCHER=ccache + cmake --build build + + - name: Test + run: | + sudo prlimit --pid $$ --memlock=unlimited:unlimited + ctest --test-dir build --output-on-failure --no-tests=error + + - name: Check installation with a downstream project + run: test/consumer/check-install.sh build + sanitizers: if: github.repository == 'FairRootGroup/FairMQ' name: ${{ matrix.sanitizer.name }}