1
- name : Omath CI (presets )
1
+ name : Omath CI (Arch Linux / Windows )
2
2
3
3
on :
4
4
push :
@@ -10,48 +10,70 @@ concurrency:
10
10
group : ci-${{ github.ref }}
11
11
cancel-in-progress : true
12
12
13
+
14
+ # #############################################################################
15
+ # 1) ARCH LINUX – Clang / Ninja
16
+ # #############################################################################
13
17
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 }}
18
+ arch-build-and-test :
19
+ name : Arch Linux (Clang)
20
+ runs-on : ubuntu-latest
21
+ container : archlinux:latest
22
+
23
+ steps :
24
+ - name : Install basic tool-chain with pacman
25
+ shell : bash
26
+ run : |
27
+ pacman -Sy --noconfirm archlinux-keyring
28
+ pacman -Syu --noconfirm --needed \
29
+ git base-devel clang cmake ninja
30
+
31
+ - name : Checkout repository (with sub-modules)
32
+ uses : actions/checkout@v4
33
+ with :
34
+ submodules : recursive
35
+
36
+ - name : Configure (cmake --preset)
37
+ shell : bash
38
+ run : cmake --preset linux-release -DOMATH_BUILD_TESTS=ON
39
+
40
+ - name : Build
41
+ shell : bash
42
+ run : cmake --build cmake-build/build/linux-release --target all
43
+
44
+ - name : Run unit_tests
45
+ shell : bash
46
+ run : ./out/Release/unit_tests
47
+
48
+
49
+
50
+ # #############################################################################
51
+ # 2) Windows – MSVC / Ninja
52
+ # #############################################################################
53
+ windows-build-and-test :
54
+ name : Windows (MSVC)
55
+ runs-on : windows-latest
28
56
29
57
steps :
30
- # 1) checkout (incl. GoogleTest sub-module)
31
- - name : Checkout repository
58
+ - name : Checkout repository (with sub-modules)
32
59
uses : actions/checkout@v4
33
60
with :
34
61
submodules : recursive
35
62
36
- # 2) Ninja (needed only on Windows images)
37
63
- name : Install Ninja
38
64
uses : seanmiddleditch/gha-setup-ninja@v4
39
65
40
- # 3) MSVC environment
41
66
- name : Set up MSVC developer command-prompt
42
- if : runner.os == 'Windows'
43
67
uses : ilammy/msvc-dev-cmd@v1
44
68
45
- # 4) Configure with the selected CMake preset
46
69
- name : Configure (cmake --preset)
47
- run : cmake --preset ${{ matrix.preset }} -DOMATH_BUILD_TESTS=ON
70
+ shell : bash
71
+ run : cmake --preset windows-release -DOMATH_BUILD_TESTS=ON
48
72
49
- # 5) Build
50
73
- name : Build
51
- # All configure presets put the binary dir in cmake-build/build/${presetName}
52
- run : cmake --build cmake-build/build/${{ matrix.preset }}
74
+ shell : bash
75
+ run : cmake --build cmake-build/build/windows-release --target all
53
76
54
- # 6) Run unit-tests
55
- - name : Test
56
- working-directory : cmake-build/build/${{ matrix.preset }}
57
- run : ctest --output-on-failure
77
+ - name : Run unit_tests.exe
78
+ shell : bash
79
+ run : ./out/Release/unit_tests.exe
0 commit comments