2
0
mirror of https://github.com/boostorg/cmake.git synced 2026-01-19 04:02:15 +00:00

Test Boost configure with different CMake versions

Add a configure-only test with different CMake versions.
Use especially those that are tested for in CMake files.
This commit is contained in:
Alexander Grund
2025-09-29 11:21:38 +02:00
parent 342fcb64f8
commit 7b0a0b374d

View File

@@ -386,6 +386,7 @@ jobs:
strategy:
matrix:
enable_test: [ON, OFF]
cmake_version: [default, 3.5.0, 3.6.0, 3.8.0, 3.10.0, 3.13.0, 3.14.0, 3.16.0, 3.19.0, 3.31.0, 4.0.0, 4.1.0]
fail-fast: false
runs-on: ubuntu-latest
@@ -406,10 +407,11 @@ jobs:
rm -rf tools/cmake/*
cp -r $GITHUB_WORKSPACE/* tools/cmake
- name: Configure each library independently
working-directory: ../boost-root
if: matrix.cmake_version == 'default'
run: |
failed_libs=""
failed_outputs=()
cd ../boost-root
for cml in libs/*/CMakeLists.txt; do
lib=$(dirname "${cml#*libs/}")
echo "====================================================================="
@@ -436,6 +438,33 @@ jobs:
exit 1
fi
- name: Cache CMake
if: matrix.cmake_version != 'default'
id: cache-cmake
uses: actions/cache@v4
with:
path: /tmp/cmake
key: ${{ runner.os }}-cmake-${{matrix.cmake_version}}
- name: Build CMake
if: matrix.cmake_version != 'default' && steps.cache-cmake.outputs.cache-hit != 'true'
run: |
version=${{matrix.cmake_version}}
filename="cmake-$version.tar.gz"
cd "$(mktemp -d)"
wget https://cmake.org/files/v${version%.*}/$filename
tar -xf $filename --strip-components=1
cmake -B __build -DCMAKE_BUILD_TYPE=Release -DCMAKE_INSTALL_PREFIX=/tmp/cmake .
cmake --build __build -- -j 3
cmake --build __build --target install
- name: Configure Boost with CMake ${{matrix.cmake_version}}
working-directory: ../boost-root
if: matrix.cmake_version != 'default'
run: |
/tmp/cmake/bin/cmake --version
/tmp/cmake/bin/cmake -DBUILD_TESTING=${{matrix.enable_test}} -B "__build_cmake-$version" .
BoostTest:
strategy:
fail-fast: false