@@ -2,10 +2,6 @@ name: CMake
2
2
3
3
on : [push, pull_request]
4
4
5
- env :
6
- # Customize the CMake build type here (Release, Debug, RelWithDebInfo, etc.)
7
- BUILD_TYPE : Release
8
-
9
5
jobs :
10
6
build :
11
7
# The CMake configure and build commands are platform agnostic and should work equally
@@ -22,30 +18,49 @@ jobs:
22
18
- {
23
19
name : " Linux g++ 10.2 C++17" ,
24
20
os : ubuntu-20.04,
21
+ buildtype : Release,
25
22
cxx : " g++-10" ,
26
23
cxxver : 17,
27
24
}
28
25
- {
29
26
name : " Linux g++ 10.2 C++20" ,
30
27
os : ubuntu-20.04,
28
+ buildtype : Release,
31
29
cxx : " g++-10" ,
32
30
cxxver : 20,
33
31
}
32
+ - {
33
+ name : " Linux g++ 11 C++17 Debug" ,
34
+ os : ubuntu-20.04,
35
+ buildtype : Debug,
36
+ cxx : " g++-11" ,
37
+ cxxver : 17,
38
+ }
39
+ - {
40
+ name : " Linux g++ 11 C++20 Debug" ,
41
+ os : ubuntu-20.04,
42
+ buildtype : Release,
43
+ cxx : " g++-11" ,
44
+ cxxver : 20,
45
+ }
34
46
- {
35
47
name : " Linux g++ 11 C++17" ,
36
48
os : ubuntu-20.04,
49
+ buildtype : Debug,
37
50
cxx : " g++-11" ,
38
51
cxxver : 17,
39
52
}
40
53
- {
41
54
name : " Linux g++ 11 C++20" ,
42
55
os : ubuntu-20.04,
56
+ buildtype : Release,
43
57
cxx : " g++-11" ,
44
58
cxxver : 20,
45
59
}
46
60
- {
47
61
name : " Linux clang-10 C++17" ,
48
62
os : ubuntu-20.04,
63
+ buildtype : Release,
49
64
cxx : " clang++-10" ,
50
65
cxx_flags : -stdlib=libc++,
51
66
exe_linker_flags : -lc++,
54
69
- {
55
70
name : " Linux clang-10 C++20" ,
56
71
os : ubuntu-20.04,
72
+ buildtype : Release,
57
73
cxx : " clang++-10" ,
58
74
cxx_flags : -stdlib=libc++,
59
75
exe_linker_flags : -lc++,
62
78
- {
63
79
name : " Linux clang-11 C++17" ,
64
80
os : ubuntu-20.04,
81
+ buildtype : Release,
65
82
cxx : " clang++-11" ,
66
83
cxx_flags : -stdlib=libc++,
67
84
exe_linker_flags : -lc++,
70
87
- {
71
88
name : " Linux clang-11 C++20" ,
72
89
os : ubuntu-20.04,
90
+ buildtype : Release,
73
91
cxx : " clang++-11" ,
74
92
cxx_flags : -stdlib=libc++,
75
93
exe_linker_flags : -lc++,
78
96
- {
79
97
name : " Linux clang-12 C++17" ,
80
98
os : ubuntu-20.04,
99
+ buildtype : Release,
81
100
cxx : " clang++-12" ,
82
101
cxx_flags : -stdlib=libc++,
83
102
exe_linker_flags : -lc++,
86
105
- {
87
106
name : " Linux clang-12 C++20" ,
88
107
os : ubuntu-20.04,
108
+ buildtype : Release,
89
109
cxx : " clang++-12" ,
90
110
cxx_flags : -stdlib=libc++,
91
111
exe_linker_flags : -lc++,
94
114
- {
95
115
name : " Linux clang-13 C++17" ,
96
116
os : ubuntu-20.04,
117
+ buildtype : Release,
97
118
cxx : " clang++-13" ,
98
119
cxx_flags : -stdlib=libc++,
99
120
exe_linker_flags : -lc++,
@@ -102,6 +123,7 @@ jobs:
102
123
- {
103
124
name : " Linux clang-13 C++20" ,
104
125
os : ubuntu-20.04,
126
+ buildtype : Release,
105
127
cxx : " clang++-13" ,
106
128
cxx_flags : -stdlib=libc++,
107
129
exe_linker_flags : -lc++,
@@ -110,6 +132,7 @@ jobs:
110
132
- {
111
133
name : " Linux clang-14 C++17" ,
112
134
os : ubuntu-20.04,
135
+ buildtype : Release,
113
136
cxx : " clang++-14" ,
114
137
cxx_flags : -stdlib=libc++,
115
138
exe_linker_flags : -lc++,
@@ -118,14 +141,34 @@ jobs:
118
141
- {
119
142
name : " Linux clang-14 C++20" ,
120
143
os : ubuntu-20.04,
144
+ buildtype : Release,
121
145
cxx : " clang++-14" ,
122
146
cxx_flags : -stdlib=libc++,
123
147
exe_linker_flags : -lc++,
124
148
cxxver : 20,
125
149
}
150
+ - {
151
+ name : " Linux clang-15 C++17 Debug" ,
152
+ os : ubuntu-20.04,
153
+ buildtype : Debug,
154
+ cxx : " clang++-15" ,
155
+ cxx_flags : -stdlib=libc++,
156
+ exe_linker_flags : -lc++,
157
+ cxxver : 17,
158
+ }
159
+ - {
160
+ name : " Linux clang-15 C++20 Debug" ,
161
+ os : ubuntu-20.04,
162
+ buildtype : Debug,
163
+ cxx : " clang++-15" ,
164
+ cxx_flags : -stdlib=libc++,
165
+ exe_linker_flags : -lc++,
166
+ cxxver : 20,
167
+ }
126
168
- {
127
169
name : " Linux clang-15 C++17" ,
128
170
os : ubuntu-20.04,
171
+ buildtype : Release,
129
172
cxx : " clang++-15" ,
130
173
cxx_flags : -stdlib=libc++,
131
174
exe_linker_flags : -lc++,
@@ -134,6 +177,7 @@ jobs:
134
177
- {
135
178
name : " Linux clang-15 C++20" ,
136
179
os : ubuntu-20.04,
180
+ buildtype : Release,
137
181
cxx : " clang++-15" ,
138
182
cxx_flags : -stdlib=libc++,
139
183
exe_linker_flags : -lc++,
@@ -142,6 +186,7 @@ jobs:
142
186
- {
143
187
name : " Windows MSVC 2017 (x64) C++17" ,
144
188
os : windows-2019,
189
+ buildtype : Release,
145
190
cxx : " cl" ,
146
191
environment_script : " C:/Program Files (x86)/Microsoft Visual Studio/2017/Community/VC/Auxiliary/Build/vcvars64.bat" ,
147
192
cxxver : 17,
@@ -150,6 +195,7 @@ jobs:
150
195
- {
151
196
name : " Windows MSVC 2017 (x64) C++20" ,
152
197
os : windows-2019,
198
+ buildtype : Release,
153
199
cxx : " cl" ,
154
200
environment_script : " C:/Program Files (x86)/Microsoft Visual Studio/2017/Community/VC/Auxiliary/Build/vcvars64.bat" ,
155
201
cxxver : 20,
@@ -158,27 +204,31 @@ jobs:
158
204
- {
159
205
name : " Windows MSVC 2019 (x64) C++17" ,
160
206
os : windows-2019,
207
+ buildtype : Release,
161
208
cxx : " cl" ,
162
209
environment_script : " C:/Program Files (x86)/Microsoft Visual Studio/2019/Enterprise/VC/Auxiliary/Build/vcvars64.bat" ,
163
210
cxxver : 17,
164
211
}
165
212
- {
166
213
name : " Windows MSVC 2019 (x64) C++20" ,
167
214
os : windows-2019,
215
+ buildtype : Release,
168
216
cxx : " cl" ,
169
217
environment_script : " C:/Program Files (x86)/Microsoft Visual Studio/2019/Enterprise/VC/Auxiliary/Build/vcvars64.bat" ,
170
218
cxxver : 20,
171
219
}
172
220
- {
173
221
name : " Windows MSVC 2022 (x64) C++17" ,
174
222
os : windows-2022,
223
+ buildtype : Release,
175
224
cxx : " cl" ,
176
225
environment_script : " C:/Program Files/Microsoft Visual Studio/2022/Enterprise/VC/Auxiliary/Build/vcvars64.bat" ,
177
226
cxxver : 17,
178
227
}
179
228
- {
180
229
name : " Windows MSVC 2022 (x64) C++20" ,
181
230
os : windows-2022,
231
+ buildtype : Release,
182
232
cxx : " cl" ,
183
233
environment_script : " C:/Program Files/Microsoft Visual Studio/2022/Enterprise/VC/Auxiliary/Build/vcvars64.bat" ,
184
234
cxxver : 20,
@@ -301,7 +351,7 @@ jobs:
301
351
[ -n "${{ matrix.config.environment_script }}" ] && "${{ matrix.config.environment_script }}"
302
352
303
353
cmake $GITHUB_WORKSPACE \
304
- -DCMAKE_BUILD_TYPE=$BUILD_TYPE \
354
+ -DCMAKE_BUILD_TYPE=${{ matrix.config.buildtype }} \
305
355
-DCMAKE_CXX_STANDARD=${{ matrix.config.cxxver }} \
306
356
-DBUILD_TESTING=ON \
307
357
-DCMAKE_CXX_FLAGS=${{ matrix.config.cxx_flags }} \
@@ -312,11 +362,11 @@ jobs:
312
362
working-directory : ${{runner.workspace}}/build
313
363
shell : bash
314
364
# Execute the build. You can specify a specific target with "--target <NAME>"
315
- run : cmake --build . --config $BUILD_TYPE
365
+ run : cmake --build . --config ${{ matrix.config.buildtype }}
316
366
317
367
- name : Test
318
368
working-directory : ${{runner.workspace}}/build
319
369
shell : bash
320
370
# Execute tests defined by the CMake configuration.
321
371
# See https://cmake.org/cmake/help/latest/manual/ctest.1.html for more detail
322
- run : ctest --output-on-failure -C $BUILD_TYPE
372
+ run : ctest --output-on-failure -C ${{ matrix.config.buildtype }}
0 commit comments