File tree Expand file tree Collapse file tree 1 file changed +57
-0
lines changed Expand file tree Collapse file tree 1 file changed +57
-0
lines changed Original file line number Diff line number Diff line change
1
+ name : Omath CI (presets)
2
+
3
+ on :
4
+ push :
5
+ branches : [ main ]
6
+ pull_request :
7
+ branches : [ main ]
8
+
9
+ concurrency :
10
+ group : ci-${{ github.ref }}
11
+ cancel-in-progress : true
12
+
13
+ jobs :
14
+ build-and-test :
15
+ strategy :
16
+ fail-fast : false
17
+ matrix :
18
+ # ------- preset ↔ runner pairs -------------
19
+ include :
20
+ - os : ubuntu-latest # GCC / Ninja (from linux-release preset)
21
+ preset : linux-release
22
+ - os : macos-latest # Clang / Ninja (from darwin-release preset)
23
+ preset : darwin-release
24
+ - os : windows-latest # MSVC / Ninja (from windows-release preset)
25
+ preset : windows-release
26
+
27
+ runs-on : ${{ matrix.os }}
28
+
29
+ steps :
30
+ # 1) checkout (incl. GoogleTest sub-module)
31
+ - name : Checkout repository
32
+ uses : actions/checkout@v4
33
+ with :
34
+ submodules : recursive
35
+
36
+ # 2) Ninja (needed only on Windows images)
37
+ - name : Install Ninja
38
+ uses : seanmiddleditch/gha-setup-ninja@v4
39
+
40
+ # 3) MSVC environment
41
+ - name : Set up MSVC developer command-prompt
42
+ if : runner.os == 'Windows'
43
+ uses : ilammy/msvc-dev-cmd@v1
44
+
45
+ # 4) Configure with the selected CMake preset
46
+ - name : Configure (cmake --preset)
47
+ run : cmake --preset ${{ matrix.preset }} -DOMATH_BUILD_TESTS=ON
48
+
49
+ # 5) Build
50
+ - name : Build
51
+ # All configure presets put the binary dir in cmake-build/build/${presetName}
52
+ run : cmake --build cmake-build/build/${{ matrix.preset }}
53
+
54
+ # 6) Run unit-tests
55
+ - name : Test
56
+ working-directory : cmake-build/build/${{ matrix.preset }}
57
+ run : ctest --output-on-failure
You can’t perform that action at this time.
0 commit comments