-
-
Notifications
You must be signed in to change notification settings - Fork 3
165 lines (141 loc) · 4.66 KB
/
build.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
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
name: build
on: [push, pull_request]
jobs:
linux:
timeout-minutes: 10
strategy:
matrix:
compiler:
- pkg: g++-7
exe: g++-7
- pkg: g++-8
exe: g++-8
- pkg: g++-9
exe: g++-9
- pkg: g++
exe: g++
- pkg: clang-7
exe: clang++-7
- pkg: clang-8
exe: clang++-8
- pkg: clang-9
exe: clang++-9
- pkg: clang-10
exe: clang++-10
- pkg: clang-11
exe: clang++-11
- pkg: clang
exe: clang++
build_type: [Release, Debug]
runs-on: ubuntu-20.04
steps:
- uses: actions/checkout@v4
- name: Install compiler
run: |
echo "deb [arch=amd64] http://archive.ubuntu.com/ubuntu focal main universe" | sudo tee /etc/apt/sources.list
sudo apt update
sudo apt install -y software-properties-common ${{matrix.compiler.pkg}}
- name: Configure CMake
env:
CXX: ${{matrix.compiler.exe}}
run: |
cmake -DCMAKE_BUILD_TYPE=${{matrix.build_type}} -DGAIA_BUILD_UNITTEST=ON -DGAIA_BUILD_EXAMPLES=ON -DGAIA_BUILD_BENCHMARK=OFF -DGAIA_GENERATE_CC=OFF -S . -B ${{github.workspace}}/build
- name: Build
env:
CXX: ${{matrix.compiler.exe}}
run: |
cmake --build ${{github.workspace}}/build --config ${{matrix.build_type}}
- name: Test
working-directory:
run: |
${{github.workspace}}/build/src/test/gaia_test
linux-libcpp:
timeout-minutes: 10
strategy:
matrix:
compiler:
- pkg: clang-7
exe: clang++-7
- pkg: clang-8
exe: clang++-8
- pkg: clang-9
exe: clang++-9
- pkg: clang-10
exe: clang++-10
- pkg: clang-11
exe: clang++-11
- pkg: clang
exe: clang++
build_type: [Release, Debug]
runs-on: ubuntu-20.04
steps:
- uses: actions/checkout@v4
- name: Install compiler
run: |
echo "deb [arch=amd64] http://archive.ubuntu.com/ubuntu focal main universe" | sudo tee /etc/apt/sources.list
sudo apt update
sudo apt install -y software-properties-common ${{matrix.compiler.pkg}}
- name: Configure CMake
env:
CXX: ${{matrix.compiler.exe}}
run: |
cmake -DCMAKE_BUILD_TYPE=${{matrix.build_type}} -DGAIA_BUILD_UNITTEST=ON -DGAIA_BUILD_EXAMPLES=ON -DGAIA_BUILD_BENCHMARK=OFF -DGAIA_GENERATE_CC=OFF -S . -B ${{github.workspace}}/build
- name: Build
env:
CXX: ${{matrix.compiler.exe}}
run: |
cmake --build ${{github.workspace}}/build --config ${{matrix.build_type}}
- name: Test
working-directory:
run: |
${{github.workspace}}/build/src/test/gaia_test
windows:
timeout-minutes: 10
strategy:
matrix:
toolset: [clang-cl, default, v141, v142]
include:
- toolset: clang-cl
toolset_option: -T"ClangCl"
- toolset: v141
toolset_option: -T"v141"
- toolset: v142
toolset_option: -T"v142"
build_type: [Release, Debug]
runs-on: windows-latest
steps:
- uses: actions/checkout@v4
- name: Configure CMake
run: |
cmake -DCMAKE_BUILD_TYPE=${{matrix.build_type}} -DGAIA_BUILD_UNITTEST=OFF -DGAIA_BUILD_EXAMPLES=ON -DGAIA_BUILD_BENCHMARK=OFF -DGAIA_GENERATE_CC=OFF -S . -B ${{github.workspace}}/build
- name: Build
run: |
cmake --build ${{github.workspace}}/build --config ${{matrix.build_type}}
# Catch2 doesn't build with certain versions of MSVC in debug mode due to linker issues.
# I'm not going to mess with it now so let's just disable tests for WIN for the time being.
# - name: Test
# working-directory:
# run: |
# ${{github.workspace}}/build/src/test/${{matrix.build_type}}/gaia_test.exe
macos:
timeout-minutes: 10
strategy:
matrix:
build_type: [Release, Debug]
runs-on: macOS-latest
steps:
- uses: actions/checkout@v4
- name: Configure CMake
run: |
cmake -DCMAKE_BUILD_TYPE=${{matrix.build_type}} -DGAIA_BUILD_UNITTEST=ON -DGAIA_BUILD_EXAMPLES=ON -DGAIA_BUILD_BENCHMARK=OFF -DGAIA_GENERATE_CC=OFF -S . -B ${{github.workspace}}/build
- name: Build
run: |
cmake --build ${{github.workspace}}/build --config ${{matrix.build_type}}
- name: Test
working-directory:
run: |
${{github.workspace}}/build/src/test/gaia_test
- name: Upload coverage reports to Codecov
uses: codecov/codecov-action@v3
env:
CODECOV_TOKEN: ${{ secrets.CODECOV_TOKEN }}