-
Notifications
You must be signed in to change notification settings - Fork 190
81 lines (81 loc) · 2.74 KB
/
tests.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
name: Tests
on: [push, pull_request]
jobs:
appleclang:
strategy:
matrix:
macos: [11, 12, 13]
standard: [17, 20]
fail-fast: false
name: "AppleClang (MacOS ${{ matrix.macos }}, C++${{ matrix.standard }})"
runs-on: macos-${{ matrix.macos }}
steps:
- uses: actions/checkout@v2
- run: c++ -v
- run: make CXX=c++ CXX_STANDARD=2a
if: ${{ matrix.standard == '20' }}
- run: make CXX=c++ CXX_STANDARD=17
if: ${{ matrix.standard == '17' }}
gcc:
strategy:
matrix:
gcc: [8, 9, 10, 11, 13]
standard: [17, 20]
fail-fast: false
name: "GCC ${{ matrix.gcc }} (C++${{ matrix.standard }})"
runs-on: ubuntu-20.04
steps:
- name: "Install GCC"
uses: egor-tensin/setup-gcc@v1
with:
version: ${{ matrix.gcc }}
- uses: actions/checkout@v2
- run: c++ -v
- run: make CXX=c++ CXX_STANDARD=2a
if: ${{ matrix.standard == '20' }}
- run: make CXX=c++ CXX_STANDARD=17
if: ${{ matrix.gcc < '9' && matrix.standard == '17' }}
- run: make CXX=c++ CXX_STANDARD=17 CXXFLAGS=-DCTRE_ENABLE_LITERALS PEDANTIC=""
if: ${{ matrix.gcc >= '9' && matrix.standard == '17' }}
clang:
strategy:
matrix:
clang: [7, 8, 9, 10, 11, 12, 13, 14, 15, 16, 17]
stdlib: ["libc++", "libstdc++"]
standard: [17, 20]
fail-fast: false
name: "Clang ${{ matrix.clang }} (C++${{ matrix.standard }}, ${{ matrix.stdlib }})"
runs-on: ubuntu-20.04
steps:
- name: "Install Clang"
uses: egor-tensin/setup-clang@v1
with:
version: ${{ matrix.clang }}
- name: "Install libc++"
if: ${{ matrix.stdlib == 'libc++' }}
run: sudo apt-get install libc++abi-${{ matrix.clang }}-dev libc++1-${{ matrix.clang }} libc++-${{ matrix.clang }}-dev
- uses: actions/checkout@v2
- run: c++ -v
- run: make CXX=c++ CXX_STANDARD=2a CXXFLAGS=-stdlib=${{ matrix.stdlib }}
if: ${{ matrix.standard == '20' }}
- run: make CXX=c++ CXX_STANDARD=17 CXXFLAGS=-stdlib=${{ matrix.stdlib }}
if: ${{ matrix.standard == '17' }}
msvc:
strategy:
matrix:
version: [14.29, ""]
fail-fast: false
name: "MSVC ${{ matrix.version }} (C++20)"
runs-on: windows-2022
steps:
- name: Add MSVC ${{ matrix.version }} to PATH
uses: ilammy/msvc-dev-cmd@v1
with:
toolset: ${{ matrix.version }}
- name: "Install Ninja & CMake"
run: choco install ninja cmake
- uses: actions/checkout@v2
- name: "Configure"
run: cmake . -G Ninja -B build -DCTRE_BUILD_TESTS=ON -DCTRE_CXX_STANDARD=20
- name: "Build"
run: cmake --build build --target ctre-test --verbose