Skip to content

Commit b8c4da1

Browse files
committed
Various CMake CI adjustments
Signed-off-by: Cristian Le <git@lecris.dev>
1 parent 41ac62c commit b8c4da1

File tree

1 file changed

+21
-15
lines changed

1 file changed

+21
-15
lines changed

.github/workflows/cmake.yml

Lines changed: 21 additions & 15 deletions
Original file line numberDiff line numberDiff line change
@@ -23,7 +23,7 @@ on:
2323
env:
2424
CFLAGS: "-Wall -pedantic"
2525
FFLAGS: "-fcheck=all,no-bounds"
26-
BUILD_TYPE: Release
26+
CMAKE_BUILD_TYPE: Release
2727
MPIEXEC_PREFLAGS: "--oversubscribe"
2828

2929
defaults:
@@ -48,10 +48,7 @@ jobs:
4848
steps:
4949

5050
- name: Checkout ScaLAPACK
51-
uses: actions/checkout@v2
52-
53-
- name: Install ninja-build tool
54-
uses: seanmiddleditch/gha-setup-ninja@v3
51+
uses: actions/checkout@v4
5552

5653
- name: Setup MPI
5754
# uses: mpi4py/setup-mpi@v1
@@ -68,14 +65,18 @@ jobs:
6865
cmake-version: ${{ matrix.cmake }}
6966

7067
- name: CMake configuration
71-
run: >
72-
cmake -B build
73-
-G Ninja
74-
-D CMAKE_BUILD_TYPE=${{env.BUILD_TYPE}}
75-
-D CMAKE_INSTALL_PREFIX=${{github.workspace}}/scalapack_install
76-
-D BUILD_SHARED_LIBS=ON
77-
-D SCALAPACK_BUILD_TESTS=ON
78-
-D MPIEXEC_PREFLAGS=${{env.MPIEXEC_PREFLAGS}}
68+
# TODO: Use cmake presets for newer versions
69+
# TODO: Simplify the defaults to not require configuration
70+
run: |
71+
# CMake<3.13 does not have -B option
72+
mkdir build
73+
cd build
74+
cmake .. \
75+
-G Ninja \
76+
-DCMAKE_BUILD_TYPE=${{env.CMAKE_BUILD_TYPE}} \
77+
-DBUILD_SHARED_LIBS=ON \
78+
-DSCALAPACK_BUILD_TESTS=ON \
79+
-DMPIEXEC_PREFLAGS=${{env.MPIEXEC_PREFLAGS}}
7980
8081
- name: Build
8182
working-directory: ${{github.workspace}}/build
@@ -90,5 +91,10 @@ jobs:
9091
ctest -D ExperimentalTest --schedule-random --output-on-failure --timeout 180
9192
ctest -D ExperimentalSubmit
9293
93-
- name: Install
94-
run: cmake --build build --target install
94+
- name: Install (CMake < 3.15)
95+
run: DESTDIR=scalapack_install cmake --build build --target install
96+
if: ${{ matrix.cmake == '3.9' }}
97+
- name: Install (CMake >= 3.15)
98+
run: cmake --install build --prefix scalapack_install
99+
if: ${{ matrix.cmake != '3.9' }}
100+
# TODO: Separate the test suite to be able to test the actual install package

0 commit comments

Comments
 (0)