@@ -2,16 +2,9 @@ name: CMake CI
2
2
3
3
on :
4
4
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]
13
6
pull_request :
14
- paths-exclude :
7
+ paths-ignore :
15
8
- ' .github/workflows/make.yml'
16
9
- ' .gitignore'
17
10
- ' README'
20
13
- ' **Makefile'
21
14
- ' SLmake.inc.example'
22
15
16
+ concurrency :
17
+ group : ${{ github.workflow }}-${{ github.ref }}
18
+ cancel-in-progress : true
19
+
23
20
env :
24
21
CFLAGS : " -Wall -pedantic"
25
22
FFLAGS : " -fcheck=all,no-bounds"
26
- BUILD_TYPE : Release
23
+ CMAKE_BUILD_TYPE : Release
27
24
MPIEXEC_PREFLAGS : " --oversubscribe"
28
25
29
26
defaults :
@@ -33,15 +30,22 @@ defaults:
33
30
jobs :
34
31
35
32
build-all :
33
+ name : >
34
+ CMake ${{ matrix.cmake }}
36
35
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
38
45
steps :
39
46
40
47
- 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
45
49
46
50
- name : Setup MPI
47
51
# uses: mpi4py/setup-mpi@v1
@@ -51,29 +55,32 @@ jobs:
51
55
52
56
- name : Install BLAS and LAPACK
53
57
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
+
55
64
- name : CMake configuration
65
+ # TODO: Use cmake presets for newer versions
66
+ # TODO: Simplify the defaults to not require configuration
56
67
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
+
65
75
- 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
71
78
72
79
- name : Test
80
+ # CMake<3.20 does not have -B option
73
81
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
+
78
85
- name : Install
79
- run : cmake --build build --target install
86
+ run : cmake --install build --prefix scalapack_install
0 commit comments