Skip to content

Commit 339dd43

Browse files
committed
use presets more
1 parent f54b953 commit 339dd43

File tree

6 files changed

+41
-49
lines changed

6 files changed

+41
-49
lines changed

.github/workflows/ci.yml

Lines changed: 0 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -2,11 +2,6 @@ name: ci
22

33
env:
44
HOMEBREW_NO_INSTALL_CLEANUP: 1
5-
CTEST_NO_TESTS_ACTION: error
6-
CTEST_PARALLEL_LEVEL: 0
7-
CMAKE_INSTALL_PREFIX: ~/local
8-
CMAKE_PREFIX_PATH: ~/local
9-
CMAKE_GENERATOR: Ninja
105

116
on:
127
push:

.github/workflows/ci_build.yml

Lines changed: 0 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -1,10 +1,5 @@
11
name: ci_build
22

3-
env:
4-
CMAKE_INSTALL_PREFIX: ~/libs
5-
CMAKE_PREFIX_PATH: ~/libs
6-
CMAKE_GENERATOR: Ninja
7-
83
on:
94
push:
105
paths:

.github/workflows/ci_windows.yml

Lines changed: 5 additions & 16 deletions
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,6 @@ name: ci_windows
22

33
env:
44
CMAKE_GENERATOR: Ninja
5-
CTEST_NO_TESTS_ACTION: error
65

76
on:
87
push:
@@ -39,35 +38,25 @@ jobs:
3938
- &checkout
4039
uses: actions/checkout@v6
4140

42-
- name: config
43-
run: cmake --preset default -DMUMPS_parallel=false --install-prefix=${{ runner.temp }}
41+
- name: build & test no-MPI
42+
run: cmake --workflow serial
4443
env: &lapack
4544
LAPACK_ROOT: ${{ steps.msys2.outputs.msys2-location }}/ucrt64
4645

47-
- name: build, test
48-
run: cmake --workflow default
49-
5046
- name: install package
5147
run: cmake --install build
5248

53-
- name: configure example
54-
run: cmake -S example -B example/build -DCMAKE_PREFIX_PATH=${{ runner.temp }}
55-
env: *lapack
49+
- name: example workflow
50+
working-directory: example
51+
run: cmake --workflow default
5652

5753
- name: Upload log failure
5854
if: failure()
5955
uses: actions/upload-artifact@v7
6056
with:
61-
archive: false
6257
name: example-${{ runner.os }}-CMakeConfigureLog.yaml
6358
path: example/build/CMakeFiles/CMakeConfigureLog.yaml
6459

65-
- name: build example
66-
run: cmake --build example/build
67-
68-
- name: test example
69-
run: ctest --test-dir example/build -V
70-
7160

7261
wsl:
7362
runs-on: windows-latest

.github/workflows/oneapi-linux.yml

Lines changed: 6 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -5,11 +5,6 @@ env:
55
CXX: icpx
66
FC: ifx
77
# https://github.com/oneapi-src/oneapi-ci/blob/master/.github/workflows/build_all.yml
8-
CTEST_NO_TESTS_ACTION: error
9-
CMAKE_BUILD_TYPE: Release
10-
CMAKE_INSTALL_PREFIX: ~/libs
11-
CMAKE_PREFIX_PATH: ~/libs
12-
CMAKE_GENERATOR: Ninja
138
# don't need Ninja but it prints the command lines by default which is good for debugging
149

1510
# debug triggers asan build errors, peculiar to GitHub Actions
@@ -107,17 +102,17 @@ jobs:
107102
run: cmake --install build
108103

109104
- name: configure example
110-
run: >-
111-
cmake
112-
-S example
113-
-B example/build
105+
working-directory: example
106+
run: cmake --preset default
114107

115108
- name: build example
116-
run: cmake --build example/build
109+
working-directory: example
110+
run: cmake --build --preset default
117111

118112
- name: test example
119113
if: ${{ matrix.int64 == 'false' }}
120-
run: ctest --test-dir example/build -V
114+
working-directory: example
115+
run: ctest --preset default
121116

122117

123118
- name: exclude unused files from cache

.github/workflows/oneapi_run_windows.bat

Lines changed: 2 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -7,22 +7,17 @@ if %errorlevel% neq 0 exit /b %errorlevel%
77
echo "MKLROOT: %MKLROOT%"
88
echo "I_MPI_ROOT: %I_MPI_ROOT%"
99

10-
echo "configure %GITHUB_REPOSITORY%"
11-
cmake --preset default --install-prefix %RUNNER_TEMP%
10+
echo "workflow %GITHUB_REPOSITORY%"
11+
cmake --workflow default
1212
if %errorlevel% neq 0 (
1313
type build\CMakeFiles\CMakeConfigureLog.yaml & exit /b %errorlevel%
1414
)
1515

16-
echo "workflow %GITHUB_REPOSITORY%"
17-
cmake --workflow default
18-
if %errorlevel% neq 0 exit /b %errorlevel%
19-
2016
echo "install project"
2117
cmake --install build
2218
if %errorlevel% neq 0 exit /b %errorlevel%
2319

2420
echo "Example config, build, test"
2521
cd example
26-
set CMAKE_PREFIX_PATH=%RUNNER_TEMP%
2722
cmake --workflow default
2823
if %errorlevel% neq 0 exit /b %errorlevel%

CMakePresets.json

Lines changed: 28 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -5,34 +5,48 @@
55
{
66
"name": "default",
77
"binaryDir": "build",
8+
"installDir": "${fileDir}/build/local",
89
"cacheVariables": {
910
"BUILD_SINGLE": false,
1011
"BUILD_DOUBLE": true,
1112
"BUILD_COMPLEX": false,
1213
"BUILD_COMPLEX16": false,
13-
"CMAKE_BUILD_TYPE": "Release"
14+
"CMAKE_BUILD_TYPE": "Release",
15+
"MUMPS_parallel": true,
16+
"MUMPS_scotch": false
1417
}
1518
},
1619
{
1720
"name": "shared", "inherits": "default",
1821
"binaryDir": "build-shared",
22+
"installDir": "${fileDir}/build-shared/local",
1923
"cacheVariables": {
2024
"BUILD_SHARED_LIBS": true,
2125
"MUMPS_ENABLE_RPATH": true
2226
}
2327
},
28+
{
29+
"name": "serial", "inherits": "default",
30+
"binaryDir": "build-serial",
31+
"installDir": "${fileDir}/build-serial/local",
32+
"cacheVariables": {
33+
"MUMPS_parallel": false
34+
}
35+
},
2436
{
2537
"name": "scotch", "inherits": "default",
2638
"binaryDir": "build-scotch",
39+
"installDir": "${fileDir}/build-scotch/local",
2740
"cacheVariables": {
2841
"MUMPS_scotch": true
2942
}
3043
}
3144
],
3245
"buildPresets": [
33-
{ "name": "default", "configurePreset": "default", "jobs": 0 },
46+
{ "name": "default", "configurePreset": "default", "jobs": 4 },
3447
{ "name": "shared", "configurePreset": "shared", "inherits": "default" },
35-
{ "name": "scotch", "configurePreset": "scotch", "inherits": "default" }
48+
{ "name": "scotch", "configurePreset": "scotch", "inherits": "default" },
49+
{ "name": "serial", "configurePreset": "serial", "inherits": "default" }
3650
],
3751
"testPresets": [
3852
{
@@ -46,11 +60,12 @@
4660
"noTestsAction": "error",
4761
"scheduleRandom": true,
4862
"stopOnFailure": false,
49-
"timeout": 60
63+
"jobs": 4
5064
}
5165
},
5266
{ "name": "shared", "configurePreset": "shared", "inherits": "default" },
53-
{ "name": "scotch", "configurePreset": "scotch", "inherits": "default" }
67+
{ "name": "scotch", "configurePreset": "scotch", "inherits": "default" },
68+
{ "name": "serial", "configurePreset": "serial", "inherits": "default" }
5469
],
5570
"workflowPresets": [
5671
{
@@ -76,6 +91,14 @@
7691
{ "type": "build", "name": "scotch" },
7792
{ "type": "test", "name": "scotch"}
7893
]
94+
},
95+
{
96+
"name": "serial",
97+
"steps": [
98+
{ "type": "configure", "name": "serial" },
99+
{ "type": "build", "name": "serial" },
100+
{ "type": "test", "name": "serial"}
101+
]
79102
}
80103
]
81104
}

0 commit comments

Comments
 (0)