Skip to content

Commit b0d4f8e

Browse files
committed
Various CMake CI adjustments
Signed-off-by: Cristian Le <[email protected]>
1 parent 11c873e commit b0d4f8e

File tree

1 file changed

+20
-11
lines changed

1 file changed

+20
-11
lines changed

.github/workflows/cmake.yml

Lines changed: 20 additions & 11 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:
@@ -67,14 +67,18 @@ jobs:
6767
cmake-version: ${{ matrix.cmake }}
6868

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

0 commit comments

Comments
 (0)