Skip to content

Commit e6c1914

Browse files
authored
[CI-CD] Fixing CICD, macos-13 is not supported
1 parent c2d5472 commit e6c1914

1 file changed

Lines changed: 22 additions & 26 deletions

File tree

Lines changed: 22 additions & 26 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,3 @@
1-
# This starter workflow is for a CMake project running on multiple platforms. There is a different starter workflow if you just want a single platform.
2-
# See: https://github.com/actions/starter-workflows/blob/main/ci/cmake-single-platform.yml
31
name: CMake on multiple platforms
42

53
on:
@@ -9,67 +7,65 @@ on:
97
pull_request:
108
branches: [ "main" ]
119

12-
13-
1410
jobs:
1511
build:
1612
runs-on: ${{ matrix.os }}
1713

1814
strategy:
19-
# Set fail-fast to false to ensure that feedback is delivered for all matrix combinations. Consider changing this to true when your workflow is stable.
2015
fail-fast: false
2116

22-
# Set up a matrix to run the following 3 configurations:
23-
# 1. <Windows, Release, latest MSVC compiler toolchain on the default runner image, default generator>
24-
# 2. <Linux, Release, latest GCC compiler toolchain on the default runner image, default generator>
25-
# 3. <Linux, Release, latest Clang compiler toolchain on the default runner image, default generator>
26-
#
27-
# To add more build types (Release, Debug, RelWithDebInfo, etc.) customize the build_type list.
17+
# Explicitly defining the matrix combinations ensures we get Linux/macOS cross x86/ARM
2818
matrix:
29-
os: [ubuntu-latest, macos-13]
30-
build_type: [Release]
31-
c_compiler: [gcc, clang]
3219
include:
20+
# --- Linux (Ubuntu) ---
3321
- os: ubuntu-latest
22+
arch: x86_64
3423
c_compiler: gcc
3524
cpp_compiler: g++
3625
- os: ubuntu-latest
26+
arch: x86_64
3727
c_compiler: clang
3828
cpp_compiler: clang++
39-
- os: macos-13
29+
- os: ubuntu-24.04-arm
30+
arch: arm64
4031
c_compiler: gcc
41-
cpp_compiler: c++
42-
- os: macos-13
32+
cpp_compiler: g++
33+
- os: ubuntu-24.04-arm
34+
arch: arm64
35+
c_compiler: clang
36+
cpp_compiler: clang++
37+
38+
# --- macOS ---
39+
- os: macos-15-intel # Intel x86_64 runner
40+
arch: x86_64
41+
c_compiler: clang
42+
cpp_compiler: clang++
43+
- os: macos-latest # Apple Silicon M1/M2/M3 ARM64 runner
44+
arch: arm64
4345
c_compiler: clang
4446
cpp_compiler: clang++
4547

4648
steps:
4749
- uses: actions/checkout@v4
4850

4951
- name: Set reusable strings
50-
# Turn repeated input strings (such as the build output directory) into step outputs. These step outputs can be used throughout the workflow file.
5152
id: strings
5253
shell: bash
5354
run: |
5455
echo "build-output-dir=${{ github.workspace }}/build" >> "$GITHUB_OUTPUT"
5556
5657
- name: Configure CMake
57-
# Configure CMake in a 'build' subdirectory. `CMAKE_BUILD_TYPE` is only required if you are using a single-configuration generator such as make.
58-
# See https://cmake.org/cmake/help/latest/variable/CMAKE_BUILD_TYPE.html?highlight=cmake_build_type
5958
run: >
6059
cmake -B ${{ steps.strings.outputs.build-output-dir }}
6160
-DCMAKE_CXX_COMPILER=${{ matrix.cpp_compiler }}
6261
-DCMAKE_C_COMPILER=${{ matrix.c_compiler }}
63-
-DCMAKE_BUILD_TYPE=${{ matrix.build_type }}
62+
-DCMAKE_BUILD_TYPE=Release
6463
-DSIPM_ENABLE_TEST=ON
6564
-S ${{ github.workspace }}
6665
6766
- name: Build
68-
# Build your program with the given configuration. Note that --config is needed because the default Windows generator is a multi-config generator (Visual Studio generator).
69-
run: cmake --build ${{ steps.strings.outputs.build-output-dir }} --config ${{ matrix.build_type }}
67+
run: cmake --build ${{ steps.strings.outputs.build-output-dir }} --config Release
7068

7169
- name: Test
7270
working-directory: ${{ steps.strings.outputs.build-output-dir }}
73-
# Execute tests defined by the CMake configuration. Note that --build-config is needed because the default Windows generator is a multi-config generator (Visual Studio generator).
74-
# See https://cmake.org/cmake/help/latest/manual/ctest.1.html for more detail
75-
run: ctest --build-config ${{ matrix.build_type }} --test-dir tests
71+
run: ctest --build-config Release

0 commit comments

Comments
 (0)