Skip to content

Commit 0214aab

Browse files
committed
Merge branch 'main' into reordering
2 parents 0b3c047 + 1971fca commit 0214aab

15 files changed

+512
-28
lines changed

.github/workflows/cmake.yml

+159-13
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,10 @@
11
name: CMake
22

3-
on: [push, pull_request]
3+
on:
4+
push:
5+
branches:
6+
- main
7+
pull_request:
48

59
jobs:
610
build:
@@ -17,15 +21,15 @@ jobs:
1721
config:
1822
- {
1923
name: "Linux g++ 10.2 C++17",
20-
os: ubuntu-20.04,
24+
os: ubuntu-22.04,
2125
buildtype: Release,
2226
cxx: "g++-10",
2327
cxxver: 17,
2428
generator: "Unix Makefiles",
2529
}
2630
- {
2731
name: "Linux g++ 10.2 C++20",
28-
os: ubuntu-20.04,
32+
os: ubuntu-22.04,
2933
buildtype: Release,
3034
cxx: "g++-10",
3135
cxxver: 20,
@@ -49,20 +53,48 @@ jobs:
4953
}
5054
- {
5155
name: "Linux g++ 11 C++17",
52-
os: ubuntu-20.04,
56+
os: ubuntu-22.04,
5357
buildtype: Debug,
5458
cxx: "g++-11",
5559
cxxver: 17,
5660
generator: "Unix Makefiles",
5761
}
5862
- {
5963
name: "Linux g++ 11 C++20",
60-
os: ubuntu-20.04,
64+
os: ubuntu-22.04,
6165
buildtype: Release,
6266
cxx: "g++-11",
6367
cxxver: 20,
6468
generator: "Unix Makefiles",
6569
}
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+
}
6698
- {
6799
name: "Linux clang-10 C++17",
68100
os: ubuntu-20.04,
@@ -125,7 +157,7 @@ jobs:
125157
}
126158
- {
127159
name: "Linux clang-13 C++17",
128-
os: ubuntu-20.04,
160+
os: ubuntu-22.04,
129161
buildtype: Release,
130162
cxx: "clang++-13",
131163
cxx_flags: -stdlib=libc++,
@@ -135,7 +167,7 @@ jobs:
135167
}
136168
- {
137169
name: "Linux clang-13 C++20",
138-
os: ubuntu-20.04,
170+
os: ubuntu-22.04,
139171
buildtype: Release,
140172
cxx: "clang++-13",
141173
cxx_flags: -stdlib=libc++,
@@ -145,7 +177,7 @@ jobs:
145177
}
146178
- {
147179
name: "Linux clang-14 C++17",
148-
os: ubuntu-20.04,
180+
os: ubuntu-22.04,
149181
buildtype: Release,
150182
cxx: "clang++-14",
151183
cxx_flags: -stdlib=libc++,
@@ -155,7 +187,7 @@ jobs:
155187
}
156188
- {
157189
name: "Linux clang-14 C++20",
158-
os: ubuntu-20.04,
190+
os: ubuntu-22.04,
159191
buildtype: Release,
160192
cxx: "clang++-14",
161193
cxx_flags: -stdlib=libc++,
@@ -165,7 +197,7 @@ jobs:
165197
}
166198
- {
167199
name: "Linux clang-15 C++17 Debug",
168-
os: ubuntu-20.04,
200+
os: ubuntu-22.04,
169201
buildtype: Debug,
170202
cxx: "clang++-15",
171203
cxx_flags: -stdlib=libc++,
@@ -175,7 +207,7 @@ jobs:
175207
}
176208
- {
177209
name: "Linux clang-15 C++20 Debug",
178-
os: ubuntu-20.04,
210+
os: ubuntu-22.04,
179211
buildtype: Debug,
180212
cxx: "clang++-15",
181213
cxx_flags: -stdlib=libc++,
@@ -185,7 +217,7 @@ jobs:
185217
}
186218
- {
187219
name: "Linux clang-15 C++17",
188-
os: ubuntu-20.04,
220+
os: ubuntu-22.04,
189221
buildtype: Release,
190222
cxx: "clang++-15",
191223
cxx_flags: -stdlib=libc++,
@@ -195,14 +227,32 @@ jobs:
195227
}
196228
- {
197229
name: "Linux clang-15 C++20",
198-
os: ubuntu-20.04,
230+
os: ubuntu-22.04,
199231
buildtype: Release,
200232
cxx: "clang++-15",
201233
cxx_flags: -stdlib=libc++,
202234
exe_linker_flags: -lc++,
203235
cxxver: 20,
204236
generator: "Unix Makefiles",
205237
}
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+
}
206256
- {
207257
name: "Windows MSVC 2017 (x64) C++17",
208258
os: windows-2019,
@@ -355,9 +405,58 @@ jobs:
355405
cxxver: 20,
356406
generator: "Unix Makefiles",
357407
}
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+
}
358444

359445
steps:
360446
- 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
361460

362461
- name: Install Clang 10
363462
id: install_clang_10
@@ -425,6 +524,17 @@ jobs:
425524
sudo ./llvm.sh 15
426525
sudo apt-get install libc++-15-dev libc++abi-15-dev libunwind-15-dev
427526
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+
428538
- name: Install g++ 10
429539
id: install_gcc_10
430540
if: startsWith(matrix.config.os, 'ubuntu') && ( matrix.config.cxx == 'g++-10' )
@@ -443,6 +553,23 @@ jobs:
443553
sudo add-apt-repository ppa:ubuntu-toolchain-r/ppa
444554
sudo apt-get install g++-11
445555
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+
446573
- name: Install MSVC 2017
447574
id: install_msvc_2017
448575
if: startsWith(matrix.config.os, 'windows-2019') && ( matrix.config.cxx == 'cl' ) && ( matrix.config.msvcver == 2017 )
@@ -472,13 +599,30 @@ jobs:
472599
choco uninstall strawberryperl --force
473600
choco install mingw --version=11.2.0.07112021
474601
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 }}
475618
476619
- name: Create Build Environment
477620
# Some projects don't allow in-source building, so create a separate build directory
478621
# We'll use this as our working directory for all subsequent commands
479622
run: cmake -E make_directory ${{runner.workspace}}/build
480623

481624
- name: Configure CMake
625+
if: (!contains(matrix.config.mingw, 'MINGW'))
482626
# Use a bash shell so we can use the same syntax for environment variable
483627
# access regardless of the host operating system
484628
shell: bash
@@ -502,12 +646,14 @@ jobs:
502646
-DCMAKE_VERBOSE_MAKEFILE=ON
503647
504648
- name: Build
649+
if: (!contains(matrix.config.mingw, 'MINGW'))
505650
working-directory: ${{runner.workspace}}/build
506651
shell: bash
507652
# Execute the build. You can specify a specific target with "--target <NAME>"
508653
run: cmake --build . --config ${{ matrix.config.buildtype }}
509654

510655
- name: Test
656+
if: (!contains(matrix.config.mingw, 'MINGW'))
511657
working-directory: ${{runner.workspace}}/build
512658
shell: bash
513659
# Execute tests defined by the CMake configuration.

README.md

+1-1
Original file line numberDiff line numberDiff line change
@@ -9,7 +9,7 @@ library. The differences to the original cppcoro are:
99
* CMake as build system instead of cake.
1010
* CI in Github actions instead of appveyor
1111

12-
andreasbuhr/cppcoro is currently tested with g++-10.2, g++-11.1, clang-10, clang-11, clang-12, clang-13, clang-14, clang-15, MSVC-2017, MSVC-2019, and MSVC-2022.
12+
andreasbuhr/cppcoro is currently tested with g++-10.2, g++-11.1, g++-12, g+-13, clang-10, clang-11, clang-12, clang-13, clang-14, clang-15, clang-16, MSVC-2017, MSVC-2019, and MSVC-2022.
1313
Current build status for master branch: [![Actions Status](https://github.com/andreasbuhr/cppcoro/workflows/CMake/badge.svg)](https://github.com/andreasbuhr/cppcoro/actions).
1414

1515
Most of the changes are offered upstream:

include/cppcoro/config.hpp

+3
Original file line numberDiff line numberDiff line change
@@ -78,6 +78,9 @@
7878
/// 0x0602 - Windows 8
7979
/// 0x0603 - Windows 8.1
8080
/// 0x0A00 - Windows 10
81+
#ifdef __MINGW32__
82+
#define SCOPEID_UNSPECIFIED_INIT {0}
83+
#endif
8184
#if defined(_WIN32_WINNT) || defined(_WIN32)
8285
# if !defined(_WIN32_WINNT)
8386
// Default to targeting Windows 10 if not defined.

0 commit comments

Comments
 (0)