-
Notifications
You must be signed in to change notification settings - Fork 50
258 lines (219 loc) · 7.26 KB
/
lite.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
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
name: Light builds
on:
push:
branches-ignore:
- master
- v*/dev
- ci/*
paths:
- '.github/workflows/lite.yml'
- 'benchmark/**'
- 'cmake/**'
- 'examples/**'
- 'include/**'
- 'src/**'
- 'tests/unittests/**'
- '**/CMakeLists.txt'
pull_request:
branches-ignore:
- master
- v*/dev
- ci/*
paths:
- '.github/workflows/lite.yml'
- 'benchmark/**'
- 'cmake/**'
- 'examples/**'
- 'include/**'
- 'src/**'
- 'tests/unittests/**'
- '**/CMakeLists.txt'
workflow_dispatch:
concurrency:
group: ${{ github.workflow }}-${{ github.event.pull_request.number || github.ref_name }}-${{ github.ref_type == 'branch' && github.sha }}-${{ github.event_name == 'workflow_dispatch' }}-${{ github.event_name == 'schedule' }}-${{ github.event.schedule }}
cancel-in-progress: true
env:
APT_INSTALL: |
sudo apt-get install
-yq --no-install-suggests --no-install-recommends
--allow-unauthenticated --allow-downgrades --allow-change-held-packages
CCACHE_ABSSTDERR: true
CCACHE_COMPRESS: true
CCACHE_COMPRESSLEVEL: 6
CCACHE_DIR: "/tmp/ccache"
CCACHE_MAXSIZE: 50M
CCACHE_NOHASHDIR: true
CCACHE_SLOPPINESS: "pch_defines,time_macros"
CCACHE_UNIFY: true
DEBIAN_FRONTEND: noninteractive
CMAKE_C_COMPILER_LAUNCHER: ccache
CMAKE_CXX_COMPILER_LAUNCHER: ccache
jobs:
lite-linux:
runs-on: ubuntu-${{ matrix.os }}
strategy:
fail-fast: false
matrix:
include:
# gcc 14 on 24.04 with C++17, C++20, and C++23
- os: 24.04
std: 17
cxx: g++-14
- os: 24.04
std: 20
cxx: g++-14
- os: 24.04
std: 23
cxx: g++-14
# gcc 11 on 22.04 with C++17
- os: 22.04
std: 17
cxx: g++-11
# clang 15 on 22.04 with C++17
- os: 22.04
std: 17
cxx: clang++-15
# gcc 10 on 20.04 with C++17
- os: 20.04
std: 17
cxx: g++-10
env:
CXX: ${{ matrix.cxx }}
OS: ${{ matrix.os }}
steps:
- name: Setup CMake and Ninja
uses: lukka/get-cmake@latest
- name: Create Build Environment
run: |
mkdir ${{ runner.workspace }}/build
sudo locale-gen en_US.UTF-8
sudo locale-gen fi_FI.UTF-8
sudo update-locale
sudo locale -a
${APT_INSTALL} ccache
- name: Checkout
uses: actions/checkout@v4
- name: Load ccache
uses: actions/cache@v4
with:
path: ${{ env.CCACHE_DIR }}
key: ccache-Linux-ubuntu${{ matrix.os }}-${{ matrix.cxx }}-std${{ matrix.std }}-${{ github.sha }}
restore-keys: |
ccache-Linux-ubuntu${{ matrix.os }}-${{ matrix.cxx }}-std${{ matrix.std }}-${{ github.ref }}
ccache-Linux-ubuntu${{ matrix.os }}-${{ matrix.cxx }}-std${{ matrix.std }}-${{ github.base_ref }}
ccache-Linux-ubuntu${{ matrix.os }}-${{ matrix.cxx }}-std${{ matrix.std }}
- name: Setup ccache
run: |
ccache --version
ccache --zero-stats
ccache --show-stats
ccache --show-config
- name: Run CMake
working-directory: ${{ runner.workspace }}/build
run: |
cmake -G Ninja -DSCN_CI=ON -DSCN_TESTS_LOCALIZED=ON \
-DCMAKE_CXX_STANDARD=${{ matrix.std }} \
$GITHUB_WORKSPACE
- name: Build
working-directory: ${{ runner.workspace }}/build
run: cmake --build . -- -k 0
- name: Show ccache stats
run: |
ccache --show-stats
- name: Test
working-directory: ${{ runner.workspace }}/build
run: ctest --output-on-failure
lite-windows:
runs-on: windows-${{ matrix.os }}
strategy:
fail-fast: false
matrix:
os: [ 2019, 2022 ]
platform: [ x64 ]
std: [ 17 ]
type: [ Debug ]
env:
CCACHE_DIR: D:/ccache
steps:
- name: Checkout
uses: actions/checkout@v4
- name: Create Build Environment
run: |
$ErrorActionPreference = 'Stop'
cmake -E make_directory ${{ runner.workspace }}/build
choco install ccache
- name: Load ccache
uses: actions/cache@v4
with:
path: ${{ env.CCACHE_DIR }}
key: ccache-Windows-win${{ matrix.os }}-msvc${{ matrix.platform }}-std${{ matrix.std }}-${{ matrix.type }}-${{ github.sha }}
restore-keys: |
ccache-Windows-win${{ matrix.os }}-msvc${{ matrix.platform }}-std${{ matrix.std }}-${{ matrix.type }}-${{ github.ref }}
ccache-Windows-win${{ matrix.os }}-msvc${{ matrix.platform }}-std${{ matrix.std }}-${{ matrix.type }}-${{ github.base_ref }}
ccache-Windows-win${{ matrix.os }}-msvc${{ matrix.platform }}-std${{ matrix.std }}-${{ matrix.type }}
- name: Setup ccache
run: |
ccache --version
ccache --zero-stats
ccache --show-stats
ccache --show-config
- name: Run CMake
working-directory: ${{ runner.workspace }}/build
shell: bash
run: |
cmake -A ${{ matrix.platform }} -DSCN_CI=ON -DCMAKE_CXX_STANDARD=${{ matrix.std }} $GITHUB_WORKSPACE
- name: Build
working-directory: ${{ runner.workspace }}/build
run: cmake --build . --config ${{ matrix.type }} --parallel
- name: Show ccache stats
run: |
ccache --show-stats
- name: Test
working-directory: ${{ runner.workspace }}/build
run: ctest -C ${{ matrix.type }} --output-on-failure
lite-macos:
runs-on: macos-14
strategy:
fail-fast: false
matrix:
cxx: [ clang++ ]
std: [ 17 ]
env:
CXX: ${{ matrix.cxx }}
CMAKE_C_COMPILER_LAUNCHER: ccache
CMAKE_CXX_COMPILER_LAUNCHER: ccache
steps:
- name: Checkout
uses: actions/checkout@v4
- name: Create Build Environment
run: |
mkdir ${{ runner.workspace }}/build
brew install --overwrite ccache
- name: Load ccache
uses: actions/cache@v4
with:
path: ${{ env.CCACHE_DIR }}
key: ccache-macOS-macos12-${{ matrix.cxx }}-std${{ matrix.std }}-${{ github.sha }}
restore-keys: |
ccache-macOS-macos12-${{ matrix.cxx }}-std${{ matrix.std }}-${{ github.ref }}
ccache-macOS-macos12-${{ matrix.cxx }}-std${{ matrix.std }}-${{ github.base_ref }}
ccache-macOS-macos12-${{ matrix.cxx }}-std${{ matrix.std }}
- name: Setup ccache
run: |
ccache --version
ccache --zero-stats
ccache --show-stats
ccache --show-config
- name: Run CMake
working-directory: ${{ runner.workspace }}/build
run: |
cmake -DSCN_CI=ON -DCMAKE_CXX_STANDARD=${{ matrix.std }} -DSCN_USE_ASAN=ON -DSCN_USE_UBSAN=ON $GITHUB_WORKSPACE
- name: Build
working-directory: ${{ runner.workspace }}/build
run: cmake --build . --parallel -- -k
- name: Show ccache stats
run: |
ccache --show-stats
- name: Test
working-directory: ${{ runner.workspace }}/build
run: ctest --output-on-failure