1- name : Omath CI (presets )
1+ name : Omath CI (Arch Linux / Windows )
22
33on :
44 push :
@@ -10,48 +10,70 @@ concurrency:
1010 group : ci-${{ github.ref }}
1111 cancel-in-progress : true
1212
13+
14+ # #############################################################################
15+ # 1) ARCH LINUX – Clang / Ninja
16+ # #############################################################################
1317jobs :
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
2856
2957 steps :
30- # 1) checkout (incl. GoogleTest sub-module)
31- - name : Checkout repository
58+ - name : Checkout repository (with sub-modules)
3259 uses : actions/checkout@v4
3360 with :
3461 submodules : recursive
3562
36- # 2) Ninja (needed only on Windows images)
3763 - name : Install Ninja
3864 uses : seanmiddleditch/gha-setup-ninja@v4
3965
40- # 3) MSVC environment
4166 - name : Set up MSVC developer command-prompt
42- if : runner.os == 'Windows'
4367 uses : ilammy/msvc-dev-cmd@v1
4468
45- # 4) Configure with the selected CMake preset
4669 - 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
4872
49- # 5) Build
5073 - 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
5376
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