From ea0c1665d7bb59d328a55f132acd1b08abed74f8 Mon Sep 17 00:00:00 2001 From: Gereon Kremer Date: Thu, 14 Oct 2021 11:50:13 -0700 Subject: [PATCH] Also test older cmake versions (#7347) This PR generally improves the new CI job to test different cmake versions. It extends the tested versions back to 3.8 and also sets the minimum required version (cmake_minimum_required) to the version that is tested. This allows to check compatibility with changing cmake policies. It also modifies the run-tests action to get the regression options from explicit inputs instead of the build matrix. As the cmake job had no build matrix, it used to build regress3-4 as well. --- .github/actions/run-tests/action.yml | 8 ++++++-- .github/workflows/ci.yml | 2 ++ .github/workflows/cmake-version.yml | 6 +++++- 3 files changed, 13 insertions(+), 3 deletions(-) diff --git a/.github/actions/run-tests/action.yml b/.github/actions/run-tests/action.yml index e5557bb2d..2b2326699 100644 --- a/.github/actions/run-tests/action.yml +++ b/.github/actions/run-tests/action.yml @@ -7,6 +7,10 @@ inputs: default: false check-unit-tests: default: true + regressions-args: + default: "--no-check-unsat-cores --no-check-proofs" + regressions-exclude: + default: "3-4" runs: using: composite steps: @@ -15,9 +19,9 @@ runs: run: | make -j${{ env.num_proc }} check env: - ARGS: --output-on-failure -LE regress[${{ matrix.exclude_regress }}] + ARGS: --output-on-failure -LE regress[${{ inputs.regressions-exclude }}] CVC5_REGRESSION_ARGS: --no-early-exit - RUN_REGRESSION_ARGS: ${{ matrix.run_regression_args }} + RUN_REGRESSION_ARGS: ${{ inputs.regressions-args }} working-directory: build - name: Run Unit Tests diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml index 8d88cad49..b8ee51837 100644 --- a/.github/workflows/ci.yml +++ b/.github/workflows/ci.yml @@ -89,6 +89,8 @@ jobs: check-examples: ${{ matrix.check-examples }} check-python-bindings: ${{ matrix.python-bindings }} check-unit-tests: ${{ matrix.check-units }} + regressions-args: ${{ matrix.run_regression_args }} + regressions-exclude: ${{ matrix.exclude_regress }} - name: Build documentation if: matrix.build-documentation diff --git a/.github/workflows/cmake-version.yml b/.github/workflows/cmake-version.yml index d61c59088..24d87ba3b 100644 --- a/.github/workflows/cmake-version.yml +++ b/.github/workflows/cmake-version.yml @@ -9,7 +9,7 @@ jobs: strategy: matrix: cmake_version: [ - "3.12", "3.13", "3.14", "3.15", "3.16", + "3.8", "3.9", "3.10", "3.11", "3.12", "3.13", "3.14", "3.15", "3.16", "3.17", "3.18", "3.19", "3.20", "3.21" ] @@ -21,6 +21,10 @@ jobs: - uses: actions/checkout@v2 + - name: Adapt cmake version checks + run: | + sed -i'orig' -E 's/cmake_minimum_required\(VERSION [0-9.]+\)/cmake_minimum_required(VERSION ${{ matrix.cmake_version }})/' CMakeLists.txt + - name: Install dependencies uses: ./.github/actions/install-dependencies with: -- 2.30.2