-
Notifications
You must be signed in to change notification settings - Fork 0
156 lines (141 loc) · 4.04 KB
/
run_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
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
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
name: run tests
env:
BUILD_DIR: out # root build directory
TEST_DIR: tests # relative directory below BUILD_DIR
on:
push:
branches:
- master
- development
paths-ignore:
- 'README.md'
- 'docs/'
pull_request:
branches:
- '**'
paths-ignore:
- 'README.md'
- 'docs/'
jobs:
ubuntu-22_04:
runs-on: ubuntu-22.04
strategy:
fail-fast: false
matrix:
build_mode: [Debug, Release]
compiler:
- pkg: g++-12
exe: g++-12
- pkg: g++-11
exe: g++-11
- pkg: g++-10
exe: g++-10
- pkg: clang-14
exe: clang++-14
- pkg: clang-13
exe: clang++-13
- pkg: clang-12
exe: clang++-12
- pkg: clang-11
exe: clang++-11
steps:
- uses: actions/checkout@v3
- name: Install compiler
run: |
sudo apt-get update
sudo apt-get install ${{ matrix.compiler.pkg }} -y
- name: Compile tests
env:
CXX: ${{ matrix.compiler.exe }}
run: |
cmake -DCMAKE_BUILD_TYPE=${{ matrix.build_mode }} -B ${{ env.BUILD_DIR }} -S .
cmake --build ${{ env.BUILD_DIR }} -j4
- name: Run tests
env:
CTEST_OUTPUT_ON_FAILURE: 1
run: ctest --test-dir ${{ env.BUILD_DIR }}/${{ env.TEST_DIR }} -C ${{ matrix.build_mode }} -j4
ubuntu-20_04:
runs-on: ubuntu-20.04
strategy:
fail-fast: false
matrix:
build_mode: [Debug, Release]
compiler:
- pkg: g++-11
exe: g++-11
- pkg: g++-10
exe: g++-10
- pkg: clang-12
exe: clang++-12
- pkg: clang-11
exe: clang++-11
- pkg: clang-10
exe: clang++-10
steps:
- uses: actions/checkout@v3
- name: Install compiler
run: |
sudo apt-get update
sudo apt-get install ${{ matrix.compiler.pkg }} -y
- name: Compile tests
env:
CXX: ${{ matrix.compiler.exe }}
run: |
cmake -DCMAKE_BUILD_TYPE=${{ matrix.build_mode }} -B ${{ env.BUILD_DIR }} -S .
cmake --build ${{ env.BUILD_DIR }} -j4
- name: Run tests
env:
CTEST_OUTPUT_ON_FAILURE: 1
run: ctest --test-dir ${{ env.BUILD_DIR }}/${{ env.TEST_DIR }} -C ${{ matrix.build_mode }} -j4
windows_2022:
runs-on: windows-2022
strategy:
fail-fast: false
matrix:
build_mode: [Debug, Release]
toolset: [v142, v143, ClangCl]
steps:
- uses: actions/checkout@v3
- name: Compile tests
run: |
cmake -G"Visual Studio 17 2022" -T${{ matrix.toolset }} -B${{ env.BUILD_DIR }} -Ax64 -S .
cmake --build ${{ env.BUILD_DIR }} --config ${{ matrix.build_mode }} -j4
- name: Run tests
env:
CTEST_OUTPUT_ON_FAILURE: 1
run: ctest --test-dir ${{ env.BUILD_DIR }}/${{ env.TEST_DIR }} -C${{ matrix.build_mode }} -j4
windows_2019:
runs-on: windows-2019
strategy:
fail-fast: false
matrix:
build_mode: [Debug, Release]
toolset: [v142, ClangCl]
steps:
- uses: actions/checkout@v3
- name: Compile tests
run: |
cmake -G"Visual Studio 16 2019" -T${{ matrix.toolset }} -B${{ env.BUILD_DIR }} -Ax64 -S .
cmake --build ${{ env.BUILD_DIR }} --config ${{ matrix.build_mode }} -j4
- name: Run tests
env:
CTEST_OUTPUT_ON_FAILURE: 1
run: ctest --test-dir ${{ env.BUILD_DIR }}/${{ env.TEST_DIR }} -C${{ matrix.build_mode }} -j4
# macos:
# runs-on: macos-latest
#
# strategy:
# fail-fast: false
# matrix:
# build_mode: [Debug, Release]
#
# steps:
# - uses: actions/checkout@v3
# - name: Compile tests
# run: |
# cmake -DCMAKE_BUILD_TYPE=${{ matrix.build_mode }} -B ${{ env.BUILD_DIR }} -S .
# cmake --build ${{ env.BUILD_DIR }} -j4
# - name: Run tests
# env:
# CTEST_OUTPUT_ON_FAILURE: 1
# run: ctest --test-dir ${{ env.BUILD_DIR }}/${{ env.TEST_DIR }} -C${{ matrix.build_mode }} -j4