Skip to content

Commit

Permalink
CMake >= 3.20 required & CI enabled
Browse files Browse the repository at this point in the history
  • Loading branch information
scivision committed Aug 1, 2024
1 parent 0625c2a commit 8a0889e
Show file tree
Hide file tree
Showing 3 changed files with 60 additions and 1 deletion.
33 changes: 33 additions & 0 deletions .github/workflows/ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -125,3 +125,36 @@ jobs:
with:
name: coverage-report-html
path: build-coverage/coverage/


cmake-older:
timeout-minutes: 30

runs-on: ubuntu-latest

strategy:
matrix:
cmake_version: ["3.20.6"]

steps:

- uses: actions/checkout@v4

- name: prereqs
run: |
sudo apt-get update
sudo apt install --no-install-recommends libhdf5-dev
- uses: ./.github/workflows/composite-cmake

- name: configure
run: $CMAKE -Bbuild -DCMAKE_INSTALL_PREFIX:PATH=$(pwd)/build/local

- name: build
run: $CMAKE --build build

- name: test
run: $CTEST --test-dir build

- name: install package
run: $CMAKE --install build
26 changes: 26 additions & 0 deletions .github/workflows/composite-cmake/action.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,26 @@
runs:

using: "composite"

steps:
- name: environment
shell: bash
run: |
echo "osarch=linux-x86_64" >> $GITHUB_ENV
echo "archive=linux-x86_64.tar.gz" >> $GITHUB_ENV
- name: Install CMake ${{ matrix.cmake_version }}
shell: bash
run: |
curl -LO "https://github.com/Kitware/CMake/releases/download/v${{ matrix.cmake_version }}/cmake-${{ matrix.cmake_version }}-$archive"
tar -xf cmake-${{ matrix.cmake_version }}-$archive
- name: CMake path
shell: bash
run: |
echo "CMAKE=$GITHUB_WORKSPACE/cmake-${{ matrix.cmake_version }}-$osarch/bin/cmake" >> $GITHUB_ENV
echo "CTEST=$GITHUB_WORKSPACE/cmake-${{ matrix.cmake_version }}-$osarch/bin/ctest" >> $GITHUB_ENV
- name: echo CMake version
shell: bash
run: $CMAKE --version
2 changes: 1 addition & 1 deletion CMakeLists.txt
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
cmake_minimum_required(VERSION 3.19...3.30)
cmake_minimum_required(VERSION 3.20...3.30)

if(CMAKE_SOURCE_DIR STREQUAL CMAKE_BINARY_DIR)
message(FATAL_ERROR "Please do out of source build like
Expand Down

0 comments on commit 8a0889e

Please sign in to comment.