@@ -2,16 +2,9 @@ name: CMake CI
22
33on :
44 push :
5- paths-exclude :
6- - ' .github/workflows/make.yml'
7- - ' .gitignore'
8- - ' README'
9- - ' **README'
10- - ' LICENSE'
11- - ' **Makefile'
12- - ' SLmake.inc.example'
5+ branches : [master]
136 pull_request :
14- paths-exclude :
7+ paths-ignore :
158 - ' .github/workflows/make.yml'
169 - ' .gitignore'
1710 - ' README'
2013 - ' **Makefile'
2114 - ' SLmake.inc.example'
2215
16+ concurrency :
17+ group : ${{ github.workflow }}-${{ github.ref }}
18+ cancel-in-progress : true
19+
2320env :
2421 CFLAGS : " -Wall -pedantic"
2522 FFLAGS : " -fcheck=all,no-bounds"
26- BUILD_TYPE : Release
23+ CMAKE_BUILD_TYPE : Release
2724 MPIEXEC_PREFLAGS : " --oversubscribe"
2825
2926defaults :
@@ -33,15 +30,22 @@ defaults:
3330jobs :
3431
3532 build-all :
33+ name : >
34+ CMake ${{ matrix.cmake }}
3635 runs-on : ubuntu-latest
37-
36+ strategy :
37+ matrix :
38+ # CMake versions to test:
39+ # - minimum and maximum in the `cmake_minimum_required`
40+ # (if needed expand this to add all intermediate values
41+ # for *temporary* CI testing)
42+ # - latest version
43+ cmake : ["3.26", "4.0", latest]
44+ fail-fast : false
3845 steps :
3946
4047 - name : Checkout ScaLAPACK
41- uses : actions/checkout@v2
42-
43- - name : Install ninja-build tool
44- uses : seanmiddleditch/gha-setup-ninja@v3
48+ uses : actions/checkout@v4
4549
4650 - name : Setup MPI
4751 # uses: mpi4py/setup-mpi@v1
@@ -51,29 +55,32 @@ jobs:
5155
5256 - name : Install BLAS and LAPACK
5357 run : sudo apt -y install libblas-dev liblapack-dev
54-
58+
59+ - name : Setup CMake
60+ uses : jwlawson/actions-setup-cmake@v2
61+ with :
62+ cmake-version : ${{ matrix.cmake }}
63+
5564 - name : CMake configuration
65+ # TODO: Use cmake presets for newer versions
66+ # TODO: Simplify the defaults to not require configuration
5667 run : >
57- cmake -B build
58- -G Ninja
59- -D CMAKE_BUILD_TYPE=${{env.BUILD_TYPE}}
60- -D CMAKE_INSTALL_PREFIX=${{github.workspace}}/scalapack_install
61- -D BUILD_SHARED_LIBS=ON
62- -D SCALAPACK_BUILD_TESTS=ON
63- -D MPIEXEC_PREFLAGS=${{env.MPIEXEC_PREFLAGS}}
64-
68+ cmake -B build \
69+ -G Ninja \
70+ -DCMAKE_BUILD_TYPE=${{env.CMAKE_BUILD_TYPE}} \
71+ -DBUILD_SHARED_LIBS=ON \
72+ -DSCALAPACK_BUILD_TESTS=ON \
73+ -DMPIEXEC_PREFLAGS=${{env.MPIEXEC_PREFLAGS}}
74+
6575 - name : Build
66- working-directory : ${{github.workspace}}/build
67- run : |
68- ctest -D ExperimentalStart
69- ctest -D ExperimentalConfigure
70- ctest -D ExperimentalBuild
76+ run : >
77+ cmake --build build
7178
7279 - name : Test
80+ # CMake<3.20 does not have -B option
7381 working-directory : ${{github.workspace}}/build
74- run : |
75- ctest -D ExperimentalTest --schedule-random --output-on-failure --timeout 180
76- ctest -D ExperimentalSubmit
77-
82+ run : >
83+ ctest --output-on-failure
84+
7885 - name : Install
79- run : cmake --build build --target install
86+ run : cmake --install build --prefix scalapack_install
0 commit comments