-
Notifications
You must be signed in to change notification settings - Fork 36
108 lines (83 loc) · 2.82 KB
/
ci.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
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
name: CI
env:
PROJECT: EXPECTED_LITE
on:
push:
branches: [ master ]
pull_request:
branches: [ master ]
workflow_dispatch:
jobs:
gcc:
strategy:
fail-fast: false
matrix:
version: [9, 10, 11]
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
- name: Install GCC ${{ matrix.version }}
run: sudo apt-get install -y gcc-${{ matrix.version }} g++-${{ matrix.version }}
- name: Configure tests
env:
CXX: g++-${{ matrix.version }}
run: cmake -S . -B build
-D CMAKE_BUILD_TYPE:STRING=Release
-D ${{ env.PROJECT }}_OPT_SELECT_NONSTD=ON
-D ${{ env.PROJECT }}_OPT_BUILD_TESTS=ON
-D ${{ env.PROJECT }}_OPT_BUILD_EXAMPLES=OFF
- name: Build tests
run: cmake --build build -j 4
- name: Run tests
working-directory: build
run: ctest --output-on-failure -j 4
clang:
strategy:
fail-fast: false
matrix:
version: [11, 12]
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
# Workaround for incompatible clang and libstc++ versions, see
# <https://github.com/actions/runner-images/issues/8659> for more info.
# The basic idea here is to remove g++ 13 and its C++ standard library
# and replace that with a compatible version of libstdc++.
# - name: Workaround for GHA issue 8659
# run: |
# sudo apt-get purge -y g++-13 gcc-13 libstdc++-13-dev
# sudo apt-get install -y --allow-downgrades libstdc++-12-dev libstdc++6=12.* libgcc-s1=12.*
- name: Install Clang ${{ matrix.version }}
run: sudo apt-get install -y clang-${{ matrix.version }}
- name: Configure tests
env:
CXX: clang-${{ matrix.version }}
run: cmake -S . -B build
-D CMAKE_CXX_COMPILER=clang++-${{ matrix.version }}
-D CMAKE_BUILD_TYPE:STRING=Release
-D ${{ env.PROJECT }}_OPT_SELECT_NONSTD=ON
-D ${{ env.PROJECT }}_OPT_BUILD_TESTS=ON
-D ${{ env.PROJECT }}_OPT_BUILD_EXAMPLES=OFF
- name: Build tests
run: cmake --build build -j 4
- name: Run tests
working-directory: build
run: ctest --output-on-failure -j 4
msvc:
strategy:
fail-fast: false
matrix:
os: [windows-2019, windows-2022]
runs-on: ${{ matrix.os }}
steps:
- uses: actions/checkout@v4
- name: Configure tests
run: cmake -S . -B build
-D ${{ env.PROJECT }}_OPT_SELECT_NONSTD=ON
-D ${{ env.PROJECT }}_OPT_BUILD_TESTS=ON
-D ${{ env.PROJECT }}_OPT_BUILD_EXAMPLES=OFF
- name: Build tests
run: cmake --build build --config Release -j 4
- name: Run tests
working-directory: build
run: ctest -C Release --output-on-failure -j 4