Skip to content

Commit b5f2d87

Browse files
authored
Update cmake-multi-platform.yml
Adding macos and debug build
1 parent ebb991a commit b5f2d87

File tree

1 file changed

+14
-13
lines changed

1 file changed

+14
-13
lines changed

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

Lines changed: 14 additions & 13 deletions
Original file line numberDiff line numberDiff line change
@@ -1,12 +1,9 @@
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:
64
push:
7-
branches: [ "main" ]
85
pull_request:
9-
branches: [ "main" ]
6+
workflow_dispatch:
107

118
jobs:
129
build:
@@ -16,15 +13,9 @@ jobs:
1613
# 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.
1714
fail-fast: false
1815

19-
# Set up a matrix to run the following 3 configurations:
20-
# 1. <Windows, Release, latest MSVC compiler toolchain on the default runner image, default generator>
21-
# 2. <Linux, Release, latest GCC compiler toolchain on the default runner image, default generator>
22-
# 3. <Linux, Release, latest Clang compiler toolchain on the default runner image, default generator>
23-
#
24-
# To add more build types (Release, Debug, RelWithDebInfo, etc.) customize the build_type list.
2516
matrix:
26-
os: [ubuntu-latest, windows-latest]
27-
build_type: [Release]
17+
os: [ubuntu-latest, windows-latest, macos-latest]
18+
build_type: [Release, Debug]
2819
c_compiler: [gcc, clang, cl]
2920
include:
3021
- os: windows-latest
@@ -36,16 +27,26 @@ jobs:
3627
- os: ubuntu-latest
3728
c_compiler: clang
3829
cpp_compiler: clang++
30+
- os: macos-latest
31+
c_compiler: gcc
32+
cpp_compiler: g++
33+
- os: macos-latest
34+
c_compiler: clang
35+
cpp_compiler: clang++
3936
exclude:
4037
- os: windows-latest
4138
c_compiler: gcc
4239
- os: windows-latest
4340
c_compiler: clang
4441
- os: ubuntu-latest
4542
c_compiler: cl
43+
- os: macos-latest
44+
c_compiler: cl
4645

4746
steps:
4847
- uses: actions/checkout@v4
48+
with:
49+
submodules: 'recursive'
4950

5051
- name: Set reusable strings
5152
# Turn repeated input strings (such as the build output directory) into step outputs. These step outputs can be used throughout the workflow file.
@@ -66,4 +67,4 @@ jobs:
6667
6768
- name: Build
6869
# 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 }}
70+
run: cmake --build ${{ steps.st

0 commit comments

Comments
 (0)