-
Notifications
You must be signed in to change notification settings - Fork 15
117 lines (94 loc) · 3.27 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
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
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
name: CMake
on: [push]
jobs:
# Job for building on Ubuntu
Ubuntu:
name: ${{matrix.config.name}}
runs-on: ${{matrix.config.os}}
strategy:
matrix:
config:
- name: Ubuntu gcc Debug
os: ubuntu-latest
build_type: Debug
compiler_cc: /usr/bin/gcc
compiler_cxx: /usr/bin/g++
- name: Ubuntu gcc Release
os: ubuntu-latest
build_type: Release
compiler_cc: /usr/bin/gcc
compiler_cxx: /usr/bin/g++
- name: Ubuntu clang Debug
os: ubuntu-latest
build_type: Debug
compiler_cc: /usr/bin/clang
compiler_cxx: /usr/bin/clang++
- name: Ubuntu clang Release
os: ubuntu-latest
build_type: Release
compiler_cc: /usr/bin/clang
compiler_cxx: /usr/bin/clang++
steps:
- uses: actions/checkout@v2
- name: Checkout submodules
run: git submodule update --init --recursive
- name: Create Build Environment
run: cmake -E make_directory ${{github.workspace}}/out
- name: Configure CMake
run: cmake -S . -B ${{github.workspace}}/out -DCMAKE_BUILD_TYPE=${{matrix.config.build_type}} -DBUILD_TESTS=ON -DBUILD_EXAMPLES=ON
- name: Build
run: cmake --build ${{github.workspace}}/out
- name: Test
run: ${{github.workspace}}/out/tests/unittests
- name: Install
run: sudo cmake --install ${{github.workspace}}/out
# Job for building on macOS
macOS:
name: ${{matrix.config.name}}
runs-on: ${{matrix.config.os}}
strategy:
matrix:
config:
- name: macOS clang Debug
os: macos-latest
build_type: Debug
- name: macOS clang Release
os: macos-latest
build_type: Release
steps:
- uses: actions/checkout@v2
- name: Checkout submodules
run: git submodule update --init --recursive
- name: Create Build Environment
run: cmake -E make_directory ${{github.workspace}}/out
- name: Configure CMake
run: cmake -S . -B ${{github.workspace}}/out -DCMAKE_BUILD_TYPE=${{matrix.config.build_type}} -DBUILD_TESTS=ON -DBUILD_EXAMPLES=ON
- name: Build
run: cmake --build ${{github.workspace}}/out
- name: Test
run: ${{github.workspace}}/out/tests/unittests
# Job for building on Windows
Windows:
name: ${{matrix.config.name}}
runs-on: ${{matrix.config.os}}
strategy:
matrix:
config:
- name: Windows vc++ Debug
os: windows-latest
build_type: Debug
- name: Windows vc++ Release
os: windows-latest
build_type: Release
steps:
- uses: actions/checkout@v2
- name: Checkout submodules
run: git submodule update --init --recursive
- name: Create Build Environment
run: cmake -E make_directory ${{github.workspace}}/out
- name: Configure CMake
run: cmake -DCMAKE_BUILD_TYPE=${{matrix.config.build_type}} -DBUILD_TESTS=ON -S . -B ${{github.workspace}}/out
- name: Build
run: cmake --build ${{github.workspace}}/out --config ${{matrix.config.build_type}}
- name: Test
run: ${{github.workspace}}/out/tests/${{matrix.config.build_type}}/unittests.exe