@@ -15,43 +15,54 @@ jobs:
15
15
strategy :
16
16
fail-fast : false
17
17
matrix :
18
- # ------- preset ↔ runner pairs -------------
19
18
include :
20
- - os : ubuntu-latest # GCC / Ninja (from linux-release preset)
19
+ # -------- Linux (Clang) ------------
20
+ - os : ubuntu-latest
21
21
preset : linux-release
22
- - os : macos-latest # Clang / Ninja (from darwin-release preset)
22
+ # -------- macOS (Clang) ------------
23
+ - os : macos-latest
23
24
preset : darwin-release
24
- - os : windows-latest # MSVC / Ninja (from windows-release preset)
25
+ # -------- Windows (MSVC) -----------
26
+ - os : windows-latest
25
27
preset : windows-release
26
28
27
29
runs-on : ${{ matrix.os }}
28
30
29
31
steps :
30
- # 1) checkout (incl. GoogleTest sub-module )
32
+ # 1) Source checkout (incl. any sub-modules such as GoogleTest )
31
33
- name : Checkout repository
32
34
uses : actions/checkout@v4
33
35
with :
34
36
submodules : recursive
35
37
36
- # 2) Ninja (needed only on Windows images)
38
+ # 2) Ninja is the generator in every preset
37
39
- name : Install Ninja
38
40
uses : seanmiddleditch/gha-setup-ninja@v4
39
41
40
- # 3) MSVC environment
42
+ # 3) Ensure Clang is present on Ubuntu
43
+ - name : Install Clang (Linux only)
44
+ if : runner.os == 'Linux'
45
+ run : |
46
+ sudo apt-get update
47
+ sudo apt-get install -y clang
48
+
49
+ # 4) Set up MSVC environment for cl.exe on Windows
41
50
- name : Set up MSVC developer command-prompt
42
51
if : runner.os == 'Windows'
43
52
uses : ilammy/msvc-dev-cmd@v1
44
53
45
- # 4 ) Configure with the selected CMake preset
54
+ # 5 ) Configure with the selected CMake preset
46
55
- name : Configure (cmake --preset)
56
+ shell : bash
47
57
run : cmake --preset ${{ matrix.preset }} -DOMATH_BUILD_TESTS=ON
48
58
49
- # 5 ) Build
59
+ # 6 ) Build all targets
50
60
- name : Build
51
- # All configure presets put the binary dir in cmake-build/build/${presetName}
61
+ shell : bash
52
62
run : cmake --build cmake-build/build/${{ matrix.preset }}
53
63
54
- # 6 ) Run unit-tests
64
+ # 7 ) Run the unit-tests
55
65
- name : Test
66
+ shell : bash
56
67
working-directory : cmake-build/build/${{ matrix.preset }}
57
68
run : ctest --output-on-failure
0 commit comments