@@ -2,10 +2,6 @@ name: CMake
22
33on : [push, pull_request]
44
5- env :
6- # Customize the CMake build type here (Release, Debug, RelWithDebInfo, etc.)
7- BUILD_TYPE : Release
8-
95jobs :
106 build :
117 # The CMake configure and build commands are platform agnostic and should work equally
@@ -22,30 +18,49 @@ jobs:
2218 - {
2319 name : " Linux g++ 10.2 C++17" ,
2420 os : ubuntu-20.04,
21+ buildtype : Release,
2522 cxx : " g++-10" ,
2623 cxxver : 17,
2724 }
2825 - {
2926 name : " Linux g++ 10.2 C++20" ,
3027 os : ubuntu-20.04,
28+ buildtype : Release,
3129 cxx : " g++-10" ,
3230 cxxver : 20,
3331 }
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+ }
3446 - {
3547 name : " Linux g++ 11 C++17" ,
3648 os : ubuntu-20.04,
49+ buildtype : Debug,
3750 cxx : " g++-11" ,
3851 cxxver : 17,
3952 }
4053 - {
4154 name : " Linux g++ 11 C++20" ,
4255 os : ubuntu-20.04,
56+ buildtype : Release,
4357 cxx : " g++-11" ,
4458 cxxver : 20,
4559 }
4660 - {
4761 name : " Linux clang-10 C++17" ,
4862 os : ubuntu-20.04,
63+ buildtype : Release,
4964 cxx : " clang++-10" ,
5065 cxx_flags : -stdlib=libc++,
5166 exe_linker_flags : -lc++,
5469 - {
5570 name : " Linux clang-10 C++20" ,
5671 os : ubuntu-20.04,
72+ buildtype : Release,
5773 cxx : " clang++-10" ,
5874 cxx_flags : -stdlib=libc++,
5975 exe_linker_flags : -lc++,
6278 - {
6379 name : " Linux clang-11 C++17" ,
6480 os : ubuntu-20.04,
81+ buildtype : Release,
6582 cxx : " clang++-11" ,
6683 cxx_flags : -stdlib=libc++,
6784 exe_linker_flags : -lc++,
7087 - {
7188 name : " Linux clang-11 C++20" ,
7289 os : ubuntu-20.04,
90+ buildtype : Release,
7391 cxx : " clang++-11" ,
7492 cxx_flags : -stdlib=libc++,
7593 exe_linker_flags : -lc++,
7896 - {
7997 name : " Linux clang-12 C++17" ,
8098 os : ubuntu-20.04,
99+ buildtype : Release,
81100 cxx : " clang++-12" ,
82101 cxx_flags : -stdlib=libc++,
83102 exe_linker_flags : -lc++,
86105 - {
87106 name : " Linux clang-12 C++20" ,
88107 os : ubuntu-20.04,
108+ buildtype : Release,
89109 cxx : " clang++-12" ,
90110 cxx_flags : -stdlib=libc++,
91111 exe_linker_flags : -lc++,
94114 - {
95115 name : " Linux clang-13 C++17" ,
96116 os : ubuntu-20.04,
117+ buildtype : Release,
97118 cxx : " clang++-13" ,
98119 cxx_flags : -stdlib=libc++,
99120 exe_linker_flags : -lc++,
@@ -102,6 +123,7 @@ jobs:
102123 - {
103124 name : " Linux clang-13 C++20" ,
104125 os : ubuntu-20.04,
126+ buildtype : Release,
105127 cxx : " clang++-13" ,
106128 cxx_flags : -stdlib=libc++,
107129 exe_linker_flags : -lc++,
@@ -110,6 +132,7 @@ jobs:
110132 - {
111133 name : " Linux clang-14 C++17" ,
112134 os : ubuntu-20.04,
135+ buildtype : Release,
113136 cxx : " clang++-14" ,
114137 cxx_flags : -stdlib=libc++,
115138 exe_linker_flags : -lc++,
@@ -118,14 +141,34 @@ jobs:
118141 - {
119142 name : " Linux clang-14 C++20" ,
120143 os : ubuntu-20.04,
144+ buildtype : Release,
121145 cxx : " clang++-14" ,
122146 cxx_flags : -stdlib=libc++,
123147 exe_linker_flags : -lc++,
124148 cxxver : 20,
125149 }
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+ }
126168 - {
127169 name : " Linux clang-15 C++17" ,
128170 os : ubuntu-20.04,
171+ buildtype : Release,
129172 cxx : " clang++-15" ,
130173 cxx_flags : -stdlib=libc++,
131174 exe_linker_flags : -lc++,
@@ -134,6 +177,7 @@ jobs:
134177 - {
135178 name : " Linux clang-15 C++20" ,
136179 os : ubuntu-20.04,
180+ buildtype : Release,
137181 cxx : " clang++-15" ,
138182 cxx_flags : -stdlib=libc++,
139183 exe_linker_flags : -lc++,
@@ -142,6 +186,7 @@ jobs:
142186 - {
143187 name : " Windows MSVC 2017 (x64) C++17" ,
144188 os : windows-2019,
189+ buildtype : Release,
145190 cxx : " cl" ,
146191 environment_script : " C:/Program Files (x86)/Microsoft Visual Studio/2017/Community/VC/Auxiliary/Build/vcvars64.bat" ,
147192 cxxver : 17,
@@ -150,6 +195,7 @@ jobs:
150195 - {
151196 name : " Windows MSVC 2017 (x64) C++20" ,
152197 os : windows-2019,
198+ buildtype : Release,
153199 cxx : " cl" ,
154200 environment_script : " C:/Program Files (x86)/Microsoft Visual Studio/2017/Community/VC/Auxiliary/Build/vcvars64.bat" ,
155201 cxxver : 20,
@@ -158,27 +204,31 @@ jobs:
158204 - {
159205 name : " Windows MSVC 2019 (x64) C++17" ,
160206 os : windows-2019,
207+ buildtype : Release,
161208 cxx : " cl" ,
162209 environment_script : " C:/Program Files (x86)/Microsoft Visual Studio/2019/Enterprise/VC/Auxiliary/Build/vcvars64.bat" ,
163210 cxxver : 17,
164211 }
165212 - {
166213 name : " Windows MSVC 2019 (x64) C++20" ,
167214 os : windows-2019,
215+ buildtype : Release,
168216 cxx : " cl" ,
169217 environment_script : " C:/Program Files (x86)/Microsoft Visual Studio/2019/Enterprise/VC/Auxiliary/Build/vcvars64.bat" ,
170218 cxxver : 20,
171219 }
172220 - {
173221 name : " Windows MSVC 2022 (x64) C++17" ,
174222 os : windows-2022,
223+ buildtype : Release,
175224 cxx : " cl" ,
176225 environment_script : " C:/Program Files/Microsoft Visual Studio/2022/Enterprise/VC/Auxiliary/Build/vcvars64.bat" ,
177226 cxxver : 17,
178227 }
179228 - {
180229 name : " Windows MSVC 2022 (x64) C++20" ,
181230 os : windows-2022,
231+ buildtype : Release,
182232 cxx : " cl" ,
183233 environment_script : " C:/Program Files/Microsoft Visual Studio/2022/Enterprise/VC/Auxiliary/Build/vcvars64.bat" ,
184234 cxxver : 20,
@@ -301,7 +351,7 @@ jobs:
301351 [ -n "${{ matrix.config.environment_script }}" ] && "${{ matrix.config.environment_script }}"
302352
303353 cmake $GITHUB_WORKSPACE \
304- -DCMAKE_BUILD_TYPE=$BUILD_TYPE \
354+ -DCMAKE_BUILD_TYPE=${{ matrix.config.buildtype }} \
305355 -DCMAKE_CXX_STANDARD=${{ matrix.config.cxxver }} \
306356 -DBUILD_TESTING=ON \
307357 -DCMAKE_CXX_FLAGS=${{ matrix.config.cxx_flags }} \
@@ -312,11 +362,11 @@ jobs:
312362 working-directory : ${{runner.workspace}}/build
313363 shell : bash
314364 # 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 }}
316366
317367 - name : Test
318368 working-directory : ${{runner.workspace}}/build
319369 shell : bash
320370 # Execute tests defined by the CMake configuration.
321371 # 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