Skip to content

Commit 5181285

Browse files
authored
Update cmake-multi-platform.yml
1 parent c2a6cf5 commit 5181285

File tree

1 file changed

+22
-11
lines changed

1 file changed

+22
-11
lines changed

.github/workflows/cmake-multi-platform.yml

+22-11
Original file line numberDiff line numberDiff line change
@@ -15,43 +15,54 @@ jobs:
1515
strategy:
1616
fail-fast: false
1717
matrix:
18-
# ------- preset ↔ runner pairs -------------
1918
include:
20-
- os: ubuntu-latest # GCC / Ninja (from linux-release preset)
19+
# -------- Linux (Clang) ------------
20+
- os: ubuntu-latest
2121
preset: linux-release
22-
- os: macos-latest # Clang / Ninja (from darwin-release preset)
22+
# -------- macOS (Clang) ------------
23+
- os: macos-latest
2324
preset: darwin-release
24-
- os: windows-latest # MSVC / Ninja (from windows-release preset)
25+
# -------- Windows (MSVC) -----------
26+
- os: windows-latest
2527
preset: windows-release
2628

2729
runs-on: ${{ matrix.os }}
2830

2931
steps:
30-
# 1) checkout (incl. GoogleTest sub-module)
32+
# 1) Source checkout (incl. any sub-modules such as GoogleTest)
3133
- name: Checkout repository
3234
uses: actions/checkout@v4
3335
with:
3436
submodules: recursive
3537

36-
# 2) Ninja (needed only on Windows images)
38+
# 2) Ninja is the generator in every preset
3739
- name: Install Ninja
3840
uses: seanmiddleditch/gha-setup-ninja@v4
3941

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
4150
- name: Set up MSVC developer command-prompt
4251
if: runner.os == 'Windows'
4352
uses: ilammy/msvc-dev-cmd@v1
4453

45-
# 4) Configure with the selected CMake preset
54+
# 5) Configure with the selected CMake preset
4655
- name: Configure (cmake --preset)
56+
shell: bash
4757
run: cmake --preset ${{ matrix.preset }} -DOMATH_BUILD_TESTS=ON
4858

49-
# 5) Build
59+
# 6) Build all targets
5060
- name: Build
51-
# All configure presets put the binary dir in cmake-build/build/${presetName}
61+
shell: bash
5262
run: cmake --build cmake-build/build/${{ matrix.preset }}
5363

54-
# 6) Run unit-tests
64+
# 7) Run the unit-tests
5565
- name: Test
66+
shell: bash
5667
working-directory: cmake-build/build/${{ matrix.preset }}
5768
run: ctest --output-on-failure

0 commit comments

Comments
 (0)