-
-
Notifications
You must be signed in to change notification settings - Fork 257
79 lines (67 loc) · 3 KB
/
ci.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
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
name: CI
on: [push, pull_request]
jobs:
build:
strategy:
fail-fast: false
matrix:
job:
# Linux
- { os: ubuntu-22.04, compiler: "g++", cpp_standard: "11", build_type: "Debug" }
- { os: ubuntu-22.04, compiler: "g++", cpp_standard: "14", build_type: "Debug" }
- { os: ubuntu-22.04, compiler: "g++", cpp_standard: "17", build_type: "Debug" }
- { os: ubuntu-22.04, compiler: "g++", cpp_standard: "17", build_type: "RelWithDebInfo" }
- { os: ubuntu-22.04, compiler: "clang++", cpp_standard: "11", build_type: "Debug" }
- { os: ubuntu-22.04, compiler: "clang++", cpp_standard: "14", build_type: "Debug" }
- { os: ubuntu-22.04, compiler: "clang++", cpp_standard: "17", build_type: "Debug" }
- { os: ubuntu-22.04, compiler: "clang++", cpp_standard: "17", build_type: "RelWithDebInfo" }
# MacOS
- { os: macos-latest, compiler: "clang++", cpp_standard: "17", build_type: "Debug" }
# Windows
# Note: we do not test for C++11 as MSVC does not support a C++11 version switch, see:
# https://devblogs.microsoft.com/cppblog/msvc-now-correctly-reports-__cplusplus/
- { os: windows-2019, compiler: "cl", cpp_standard: "14", build_type: "Debug" }
- { os: windows-2019, compiler: "cl", cpp_standard: "17", build_type: "Debug" }
- { os: windows-2019, compiler: "cl", cpp_standard: "17", build_type: "RelWithDebInfo" }
runs-on: ${{ matrix.job.os }}
steps:
- uses: actions/checkout@v2
with:
submodules: true
- name: Create Build Environment
run: cmake -E make_directory ${{runner.workspace}}/build
- name: Configure CMake
shell: bash
working-directory: ${{runner.workspace}}/build
run: |
cmake \
$GITHUB_WORKSPACE \
-DCMAKE_CXX_COMPILER=${{matrix.job.compiler}} \
-DCMAKE_CXX_STANDARD=${{matrix.job.cpp_standard}} \
-DCMAKE_CXX_STANDARD_REQUIRED=ON \
-DCMAKE_BUILD_TYPE=${{matrix.job.build_type}}
- name: Build
working-directory: ${{runner.workspace}}/build
shell: bash
run: cmake --build . --config ${{matrix.job.build_type}}
- name: "Copy executables"
if: runner.os == 'Windows'
working-directory: ${{runner.workspace}}/build
shell: bash
run: cp ${{matrix.job.build_type}}/*.exe .
- name: Run example
working-directory: ${{runner.workspace}}/build
shell: bash
run: ./dbg_macro-example
- name: Run demo
working-directory: ${{runner.workspace}}/build
shell: bash
run: ./dbg_macro-demo
- name: Run tests
working-directory: ${{runner.workspace}}/build
shell: bash
run: ./dbg_macro-tests
- name: Run tests (macro disabled)
working-directory: ${{runner.workspace}}/build
shell: bash
run: ./dbg_macro-tests-macro_disabled