1
1
name : CMake
2
2
3
- on : [push, pull_request]
3
+ on :
4
+ push :
5
+ branches :
6
+ - main
7
+ pull_request :
4
8
5
9
jobs :
6
10
build :
@@ -17,15 +21,15 @@ jobs:
17
21
config :
18
22
- {
19
23
name : " Linux g++ 10.2 C++17" ,
20
- os : ubuntu-20 .04,
24
+ os : ubuntu-22 .04,
21
25
buildtype : Release,
22
26
cxx : " g++-10" ,
23
27
cxxver : 17,
24
28
generator : " Unix Makefiles" ,
25
29
}
26
30
- {
27
31
name : " Linux g++ 10.2 C++20" ,
28
- os : ubuntu-20 .04,
32
+ os : ubuntu-22 .04,
29
33
buildtype : Release,
30
34
cxx : " g++-10" ,
31
35
cxxver : 20,
@@ -49,20 +53,48 @@ jobs:
49
53
}
50
54
- {
51
55
name : " Linux g++ 11 C++17" ,
52
- os : ubuntu-20 .04,
56
+ os : ubuntu-22 .04,
53
57
buildtype : Debug,
54
58
cxx : " g++-11" ,
55
59
cxxver : 17,
56
60
generator : " Unix Makefiles" ,
57
61
}
58
62
- {
59
63
name : " Linux g++ 11 C++20" ,
60
- os : ubuntu-20 .04,
64
+ os : ubuntu-22 .04,
61
65
buildtype : Release,
62
66
cxx : " g++-11" ,
63
67
cxxver : 20,
64
68
generator : " Unix Makefiles" ,
65
69
}
70
+ - {
71
+ name : " Linux g++ 12 C++17" ,
72
+ os : ubuntu-22.04,
73
+ buildtype : Release,
74
+ cxx : " g++-12" ,
75
+ cxxver : 17,
76
+ }
77
+ - {
78
+ name : " Linux g++ 12 C++20" ,
79
+ os : ubuntu-22.04,
80
+ buildtype : Release,
81
+ cxx : " g++-12" ,
82
+ cxxver : 20,
83
+ }
84
+ - {
85
+ name : " Linux g++ 13 C++17" ,
86
+ os : ubuntu-22.04,
87
+ buildtype : Release,
88
+ cxx : " g++-13" ,
89
+ cxxver : 17,
90
+ }
91
+ - {
92
+ name : " Linux g++ 13 C++20" ,
93
+ os : ubuntu-22.04,
94
+ buildtype : Release,
95
+ cxx : " g++-13" ,
96
+ cxxver : 20,
97
+ }
66
98
- {
67
99
name : " Linux clang-10 C++17" ,
68
100
os : ubuntu-20.04,
@@ -125,7 +157,7 @@ jobs:
125
157
}
126
158
- {
127
159
name : " Linux clang-13 C++17" ,
128
- os : ubuntu-20 .04,
160
+ os : ubuntu-22 .04,
129
161
buildtype : Release,
130
162
cxx : " clang++-13" ,
131
163
cxx_flags : -stdlib=libc++,
@@ -135,7 +167,7 @@ jobs:
135
167
}
136
168
- {
137
169
name : " Linux clang-13 C++20" ,
138
- os : ubuntu-20 .04,
170
+ os : ubuntu-22 .04,
139
171
buildtype : Release,
140
172
cxx : " clang++-13" ,
141
173
cxx_flags : -stdlib=libc++,
@@ -145,7 +177,7 @@ jobs:
145
177
}
146
178
- {
147
179
name : " Linux clang-14 C++17" ,
148
- os : ubuntu-20 .04,
180
+ os : ubuntu-22 .04,
149
181
buildtype : Release,
150
182
cxx : " clang++-14" ,
151
183
cxx_flags : -stdlib=libc++,
@@ -155,7 +187,7 @@ jobs:
155
187
}
156
188
- {
157
189
name : " Linux clang-14 C++20" ,
158
- os : ubuntu-20 .04,
190
+ os : ubuntu-22 .04,
159
191
buildtype : Release,
160
192
cxx : " clang++-14" ,
161
193
cxx_flags : -stdlib=libc++,
@@ -165,7 +197,7 @@ jobs:
165
197
}
166
198
- {
167
199
name : " Linux clang-15 C++17 Debug" ,
168
- os : ubuntu-20 .04,
200
+ os : ubuntu-22 .04,
169
201
buildtype : Debug,
170
202
cxx : " clang++-15" ,
171
203
cxx_flags : -stdlib=libc++,
@@ -175,7 +207,7 @@ jobs:
175
207
}
176
208
- {
177
209
name : " Linux clang-15 C++20 Debug" ,
178
- os : ubuntu-20 .04,
210
+ os : ubuntu-22 .04,
179
211
buildtype : Debug,
180
212
cxx : " clang++-15" ,
181
213
cxx_flags : -stdlib=libc++,
@@ -185,7 +217,7 @@ jobs:
185
217
}
186
218
- {
187
219
name : " Linux clang-15 C++17" ,
188
- os : ubuntu-20 .04,
220
+ os : ubuntu-22 .04,
189
221
buildtype : Release,
190
222
cxx : " clang++-15" ,
191
223
cxx_flags : -stdlib=libc++,
@@ -195,14 +227,32 @@ jobs:
195
227
}
196
228
- {
197
229
name : " Linux clang-15 C++20" ,
198
- os : ubuntu-20 .04,
230
+ os : ubuntu-22 .04,
199
231
buildtype : Release,
200
232
cxx : " clang++-15" ,
201
233
cxx_flags : -stdlib=libc++,
202
234
exe_linker_flags : -lc++,
203
235
cxxver : 20,
204
236
generator : " Unix Makefiles" ,
205
237
}
238
+ - {
239
+ name : " Linux clang-16 C++17" ,
240
+ os : ubuntu-22.04,
241
+ buildtype : Release,
242
+ cxx : " clang++-16" ,
243
+ cxx_flags : -stdlib=libc++,
244
+ exe_linker_flags : -lc++,
245
+ cxxver : 17,
246
+ }
247
+ - {
248
+ name : " Linux clang-16 C++20" ,
249
+ os : ubuntu-22.04,
250
+ buildtype : Release,
251
+ cxx : " clang++-16" ,
252
+ cxx_flags : -stdlib=libc++,
253
+ exe_linker_flags : -lc++,
254
+ cxxver : 20,
255
+ }
206
256
- {
207
257
name : " Windows MSVC 2017 (x64) C++17" ,
208
258
os : windows-2019,
@@ -355,9 +405,58 @@ jobs:
355
405
cxxver : 20,
356
406
generator : " Unix Makefiles" ,
357
407
}
408
+ - {
409
+ name : " Msys2/CLANG" ,
410
+ os : windows-2019,
411
+ buildtype : Release,
412
+ mingw : MINGW64,
413
+ mingw-arch : x86_64,
414
+ cxx : " clang" ,
415
+ cxxver : 20,
416
+ }
417
+ - {
418
+ name : " Msys2/GCC" ,
419
+ os : windows-2019,
420
+ buildtype : Release,
421
+ mingw : MINGW64,
422
+ mingw-arch : x86_64,
423
+ cxx : " gcc" ,
424
+ cxxver : 20,
425
+ }
426
+ - {
427
+ name : " Msys2/debugCLANG" ,
428
+ os : windows-2019,
429
+ buildtype : Debug,
430
+ mingw : MINGW64,
431
+ mingw-arch : x86_64,
432
+ cxx : " clang" ,
433
+ cxxver : 17,
434
+ }
435
+ - {
436
+ name : " Msys2/debugGCC" ,
437
+ os : windows-2019,
438
+ buildtype : Debug,
439
+ mingw : MINGW64,
440
+ mingw-arch : x86_64,
441
+ cxx : " gcc" ,
442
+ cxxver : 17,
443
+ }
358
444
359
445
steps :
360
446
- uses : actions/checkout@v3
447
+
448
+ - name : " Install Msys2"
449
+ if : (startsWith(matrix.config.os, 'windows-2019') && contains(matrix.config.mingw, 'MINGW'))
450
+ uses : msys2/setup-msys2@v2
451
+ with :
452
+ msystem : ${{ matrix.config.mingw }}
453
+ install : >-
454
+ git
455
+ mingw-w64-${{ matrix.config.mingw-arch }}-cmake
456
+ mingw-w64-${{ matrix.config.mingw-arch }}-ninja
457
+ mingw-w64-${{ matrix.config.mingw-arch }}-${{ matrix.config.cxx }}
458
+ mingw-w64-${{ matrix.config.mingw-arch }}-toolchain
459
+ update : true
361
460
362
461
- name : Install Clang 10
363
462
id : install_clang_10
@@ -425,6 +524,17 @@ jobs:
425
524
sudo ./llvm.sh 15
426
525
sudo apt-get install libc++-15-dev libc++abi-15-dev libunwind-15-dev
427
526
527
+ - name : Install Clang 16
528
+ id : install_clang_16
529
+ if : startsWith(matrix.config.os, 'ubuntu') && ( matrix.config.cxx == 'clang++-16' )
530
+ shell : bash
531
+ working-directory : ${{ env.HOME }}
532
+ run : |
533
+ wget https://apt.llvm.org/llvm.sh
534
+ chmod +x llvm.sh
535
+ sudo ./llvm.sh 16
536
+ sudo apt-get install libc++-16-dev libc++abi-16-dev libunwind-16-dev
537
+
428
538
- name : Install g++ 10
429
539
id : install_gcc_10
430
540
if : startsWith(matrix.config.os, 'ubuntu') && ( matrix.config.cxx == 'g++-10' )
@@ -443,6 +553,23 @@ jobs:
443
553
sudo add-apt-repository ppa:ubuntu-toolchain-r/ppa
444
554
sudo apt-get install g++-11
445
555
556
+ - name : Install g++ 12
557
+ id : install_gcc_12
558
+ if : startsWith(matrix.config.os, 'ubuntu') && ( matrix.config.cxx == 'g++-12' )
559
+ shell : bash
560
+ working-directory : ${{ env.HOME }}
561
+ run : |
562
+ sudo apt-get install g++-12
563
+
564
+ - name : Install g++ 13
565
+ id : install_gcc_13
566
+ if : startsWith(matrix.config.os, 'ubuntu') && ( matrix.config.cxx == 'g++-13' )
567
+ shell : bash
568
+ working-directory : ${{ env.HOME }}
569
+ run : |
570
+ sudo add-apt-repository ppa:ubuntu-toolchain-r/ppa
571
+ sudo apt-get install g++-13
572
+
446
573
- name : Install MSVC 2017
447
574
id : install_msvc_2017
448
575
if : startsWith(matrix.config.os, 'windows-2019') && ( matrix.config.cxx == 'cl' ) && ( matrix.config.msvcver == 2017 )
@@ -472,13 +599,30 @@ jobs:
472
599
choco uninstall strawberryperl --force
473
600
choco install mingw --version=11.2.0.07112021
474
601
choco install make
602
+
603
+ - name : MSYS2 - Configure, Build & Test
604
+ id : install_msys2
605
+ if : (startsWith(matrix.config.os, 'windows-2019') && contains(matrix.config.mingw, 'MINGW'))
606
+ shell : msys2 {0}
607
+ working-directory : ${{ env.HOME }}
608
+ run : |
609
+ cmake $GITHUB_WORKSPACE \
610
+ -DCMAKE_BUILD_TYPE=${{ matrix.config.buildtype }} \
611
+ -DCMAKE_CXX_STANDARD=${{ matrix.config.cxxver }} \
612
+ -DBUILD_TESTING=ON \
613
+ -DCMAKE_CXX_FLAGS=${{ matrix.config.cxx_flags }} \
614
+ -DCMAKE_EXE_LINKER_FLAGS=${{ matrix.config.exe_linker_flags }} \
615
+ -DCMAKE_VERBOSE_MAKEFILE=ON
616
+ cmake --build . --config ${{ matrix.config.buildtype }}
617
+ ctest --output-on-failure -C ${{ matrix.config.buildtype }}
475
618
476
619
- name : Create Build Environment
477
620
# Some projects don't allow in-source building, so create a separate build directory
478
621
# We'll use this as our working directory for all subsequent commands
479
622
run : cmake -E make_directory ${{runner.workspace}}/build
480
623
481
624
- name : Configure CMake
625
+ if : (!contains(matrix.config.mingw, 'MINGW'))
482
626
# Use a bash shell so we can use the same syntax for environment variable
483
627
# access regardless of the host operating system
484
628
shell : bash
@@ -502,12 +646,14 @@ jobs:
502
646
-DCMAKE_VERBOSE_MAKEFILE=ON
503
647
504
648
- name : Build
649
+ if : (!contains(matrix.config.mingw, 'MINGW'))
505
650
working-directory : ${{runner.workspace}}/build
506
651
shell : bash
507
652
# Execute the build. You can specify a specific target with "--target <NAME>"
508
653
run : cmake --build . --config ${{ matrix.config.buildtype }}
509
654
510
655
- name : Test
656
+ if : (!contains(matrix.config.mingw, 'MINGW'))
511
657
working-directory : ${{runner.workspace}}/build
512
658
shell : bash
513
659
# Execute tests defined by the CMake configuration.
0 commit comments