-
Notifications
You must be signed in to change notification settings - Fork 260
42 lines (34 loc) · 1.2 KB
/
cmake.yml
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
name: CMake
on:
push:
pull_request:
jobs:
build:
# The CMake configure and build commands are platform agnostic and should work equally well on Windows or Mac.
# You can convert this to a matrix build if you need cross-platform coverage.
# See: https://docs.github.com/en/free-pro-team@latest/actions/learn-github-actions/managing-complex-workflows#using-a-build-matrix
runs-on: ${{ matrix.os }}
strategy:
matrix:
os: [
ubuntu-20.04,
ubuntu-22.04,
macos-12,
macos-13,
macos-14,
#windows-2019,
#windows-2022,
]
cpp_version: [11, 14, 17, 20]
build_type: [Release, Debug]
steps:
- uses: actions/checkout@v2
with:
submodules: recursive
- name: Configure CMake
run: cmake -B ${{github.workspace}}/build -DBUILD_TESTING=ON -DCMAKE_CXX_STANDARD=${{matrix.cpp_version}} -DCMAKE_BUILD_TYPE=${{matrix.build_type}}
- name: Build
run: cmake --build ${{github.workspace}}/build --config ${{matrix.build_type}}
- name: Test
working-directory: ${{github.workspace}}/build
run: ctest -C ${{matrix.build_type}} --output-on-failure --verbose