forked from chriskohlhoff/asio
-
Notifications
You must be signed in to change notification settings - Fork 0
343 lines (341 loc) · 12 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
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
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
292
293
294
295
296
297
298
299
300
301
302
303
304
305
306
307
308
309
310
311
312
313
314
315
316
317
318
319
320
321
322
323
324
325
326
327
328
329
330
331
332
333
334
335
336
337
338
339
340
341
342
343
name: asio CI
on:
push:
branches: [ master, citest-* ]
jobs:
build:
strategy:
fail-fast: false
matrix:
build-type: ['sanity']
runs-on: [ubuntu-20.04, ubuntu-22.04, macos-latest]
compiler: [g++-8, g++-9, g++-10, g++-12, clang++-10, clang++-14, g++]
cxx-std: ['c++11', 'c++14', 'c++17', 'c++2a', 'c++20']
separate-compilation: ['', '--enable-separate-compilation']
optim-level: ['-O0']
no-deprecated: ['']
select-reactor: ['', '-DASIO_DISABLE_EPOLL', '-DASIO_DISABLE_KQUEUE']
handler-tracking: ['']
boost: ['']
boost-url: ['']
exclude:
# New compilers don't run on ubuntu 20.04
- runs-on: ubuntu-20.04
compiler: g++-12
- runs-on: ubuntu-20.04
compiler: clang++-14
# Older compilers don't run on ubuntu 22.04
- runs-on: ubuntu-22.04
compiler: g++-8
- runs-on: ubuntu-22.04
compiler: clang++-10
# Unversioned g++ doesn't run on ubuntu
- runs-on: ubuntu-20.04
compiler: g++
- runs-on: ubuntu-22.04
compiler: g++
# Versioned g++ and clang++ don't run on macOS
- runs-on: macos-latest
compiler: g++-8
- runs-on: macos-latest
compiler: g++-9
- runs-on: macos-latest
compiler: g++-10
- runs-on: macos-latest
compiler: g++-12
- runs-on: macos-latest
compiler: clang++-10
- runs-on: macos-latest
compiler: clang++-14
# Older compilers don't support newer std variants
- compiler: g++-8
cxx-std: c++20
- compiler: g++-9
cxx-std: c++20
- compiler: g++-10
cxx-std: c++2a
- compiler: g++-12
cxx-std: c++2a
- compiler: clang++-10
cxx-std: c++20
- compiler: clang++-14
cxx-std: c++20
- compiler: clang++-14
cxx-std: c++2a
- runs-on: macos-latest
cxx-std: c++20
# Specifying the select reactor is OS-specific
- runs-on: ubuntu-20.04
select-reactor: -DASIO_DISABLE_KQUEUE
- runs-on: ubuntu-22.04
select-reactor: -DASIO_DISABLE_KQUEUE
- runs-on: macos-latest
select-reactor: -DASIO_DISABLE_EPOLL
# Trim builds that use separate compilation
- compiler: g++-8
separate-compilation: --enable-separate-compilation
- compiler: g++-9
separate-compilation: --enable-separate-compilation
- compiler: g++-10
separate-compilation: --enable-separate-compilation
- runs-on: macos-latest
cxx-std: c++14
separate-compilation: --enable-separate-compilation
- runs-on: macos-latest
cxx-std: c++17
separate-compilation: --enable-separate-compilation
# Trim builds that use select reactor
- compiler: g++-8
select-reactor: -DASIO_DISABLE_EPOLL
- compiler: g++-9
select-reactor: -DASIO_DISABLE_EPOLL
- compiler: g++-10
select-reactor: -DASIO_DISABLE_EPOLL
include:
#
# Linux / g++-12 -std=c++20 -fcoroutines / -O2 / standalone
#
- build-type: full
runs-on: ubuntu-22.04
compiler: g++-12
cxx-std: c++20 -fcoroutines
optim-level: -O2
#
# Linux / g++-12 -std=c++17 / -O2 / boost 1.76
#
- build-type: full
runs-on: ubuntu-22.04
compiler: g++-12
cxx-std: c++17
optim-level: -O2
with-boost: --with-boost=$GITHUB_WORKSPACE/boost_1_76_0
boost-url: https://boostorg.jfrog.io/artifactory/main/release/1.76.0/source/boost_1_76_0.tar.bz2
#
# Linux / g++-10 / -O2 / standalone
#
- build-type: full
runs-on: ubuntu-20.04
compiler: g++-10
cxx-std: c++14
optim-level: -O2
#
# Linux / g++-10 / -O0 / standalone / handler tracking
#
- build-type: full
runs-on: ubuntu-20.04
compiler: g++-10
cxx-std: c++14
optim-level: -O0
handler-tracking: -DASIO_ENABLE_HANDLER_TRACKING
#
# Linux / g++-10 / -O0 / standalone / epoll disabled
#
- build-type: full
runs-on: ubuntu-20.04
compiler: g++-10
cxx-std: c++14
optim-level: -O0
select-reactor: -DASIO_DISABLE_EPOLL
#
# Linux / g++-10 / -O0 / standalone / separate compilation / handler tracking
#
- build-type: full
runs-on: ubuntu-20.04
compiler: g++-10
cxx-std: c++14
separate-compilation: --enable-separate-compilation
optim-level: -O0
handler-tracking: -DASIO_ENABLE_HANDLER_TRACKING
#
# Linux / g++-10 / -O0 / standalone / separate compilation / epoll disabled
#
- build-type: full
runs-on: ubuntu-20.04
compiler: g++-10
cxx-std: c++14
separate-compilation: --enable-separate-compilation
optim-level: -O0
select-reactor: -DASIO_DISABLE_EPOLL
#
# Linux / g++-10 / -O2 / boost 1.83
#
- build-type: full
runs-on: ubuntu-20.04
compiler: g++-10
cxx-std: c++14
optim-level: -O2
with-boost: --with-boost=$GITHUB_WORKSPACE/boost_1_83_0
boost-url: https://boostorg.jfrog.io/artifactory/main/release/1.83.0/source/boost_1_83_0.tar.bz2
#
# Linux / g++-10 / -O0 / boost 1.83 / epoll disabled
#
- build-type: full
runs-on: ubuntu-20.04
compiler: g++-10
cxx-std: c++14
optim-level: -O0
with-boost: --with-boost=$GITHUB_WORKSPACE/boost_1_83_0
boost-url: https://boostorg.jfrog.io/artifactory/main/release/1.83.0/source/boost_1_83_0.tar.bz2
select-reactor: -DASIO_DISABLE_EPOLL
#
# Linux / g++-10 / -O0 / boost 1.83 / separate compilation
#
- build-type: full
runs-on: ubuntu-20.04
compiler: g++-10
cxx-std: c++14
separate-compilation: --enable-separate-compilation
optim-level: -O0
with-boost: --with-boost=$GITHUB_WORKSPACE/boost_1_83_0
boost-url: https://boostorg.jfrog.io/artifactory/main/release/1.83.0/source/boost_1_83_0.tar.bz2
#
# Linux / g++-8 / -O2 / standalone
#
- build-type: full
runs-on: ubuntu-20.04
compiler: g++-8
cxx-std: c++11
optim-level: -O2
#
# Linux / g++-8 / -O0 / standalone / separate compilation
#
- build-type: full
runs-on: ubuntu-20.04
compiler: g++-8
cxx-std: c++11
separate-compilation: --enable-separate-compilation
optim-level: -O0
#
# Linux / g++-8 -std=c++11 / -O2 / boost 1.83
#
- build-type: full
runs-on: ubuntu-20.04
compiler: g++-8
cxx-std: c++11
separate-compilation: --enable-separate-compilation
optim-level: -O2
with-boost: --with-boost=$GITHUB_WORKSPACE/boost_1_83_0
boost-url: https://boostorg.jfrog.io/artifactory/main/release/1.83.0/source/boost_1_83_0.tar.bz2
#
# Linux / clang++-14 -std=c++2a / -O2 / standalone
#
- build-type: full
runs-on: ubuntu-22.04
compiler: clang++-14
cxx-std: c++2a
cxx-stdlib: -stdlib=libc++
optim-level: -O2
#
# Linux / clang++-14 -std=c++11 / -O0 / standalone / separate compilation
#
- build-type: full
runs-on: ubuntu-22.04
compiler: clang++-14
cxx-std: c++11
separate-compilation: --enable-separate-compilation
optim-level: -O0
#
# Linux / clang++-14 -std=c++20 / -O2 / standalone / separate compilation
#
- build-type: full
runs-on: ubuntu-22.04
compiler: clang++-14
cxx-std: c++20
cxx-stdlib: -stdlib=libc++
separate-compilation: --enable-separate-compilation
optim-level: -O2
#
# Linux / clang++-10 -std=c++11 / -O2 / standalone
#
- build-type: full
runs-on: ubuntu-20.04
compiler: clang++-10
cxx-std: c++11
optim-level: -O2
#
# macOS / c++2a -fcoroutines-ts / -O2 / standalone
#
- build-type: full
runs-on: macos-latest
compiler: g++
cxx-std: c++2a -fcoroutines-ts
optim-level: -O2
#
# macOS / c++11 / -O2 / standalone
#
- build-type: full
runs-on: macos-latest
compiler: g++
cxx-std: c++11
optim-level: -O2
#
# macOS / c++11 / -O0 / standalone / kqueue disabled
#
- build-type: full
runs-on: macos-latest
compiler: g++
cxx-std: c++11
optim-level: -O0
select-reactor: -DASIO_DISABLE_KQUEUE
#
# macOS / c++11 / -O0 / standalone / separate compilation
#
- build-type: full
runs-on: macos-latest
compiler: g++
cxx-std: c++11
separate-compilation: --enable-separate-compilation
optim-level: -O0
#
# macOS / c++11 / -O2 / boost 1.83
#
- build-type: full
runs-on: macos-latest
compiler: g++
cxx-std: c++11
optim-level: -O2
with-boost: --with-boost=$GITHUB_WORKSPACE/boost_1_83_0
boost-url: https://boostorg.jfrog.io/artifactory/main/release/1.83.0/source/boost_1_83_0.tar.bz2
#
# macOS / c++11 / -O2 / boost 1.83 / separate compilation
#
- build-type: full
runs-on: macos-latest
compiler: g++
cxx-std: c++11
separate-compilation: --enable-separate-compilation
optim-level: -O0
with-boost: --with-boost=$GITHUB_WORKSPACE/boost_1_83_0
boost-url: https://boostorg.jfrog.io/artifactory/main/release/1.83.0/source/boost_1_83_0.tar.bz2
runs-on: ${{ matrix.runs-on }}
env:
CXX: ${{ matrix.compiler }}
CXXFLAGS: -std=${{ matrix.cxx-std }} ${{ matrix.cxx-stdlib }} ${{ matrix.optim-level }} -Wall -Wextra ${{ matrix.no-deprecated }} ${{ matrix.select-reactor }} ${{ matrix.handler-tracking }}
steps:
- uses: actions/checkout@v4
- name: Install autotools
if: startsWith(matrix.runs-on, 'macos')
run: brew install automake
- name: Install compiler
if: startsWith(matrix.runs-on, 'ubuntu')
run: sudo apt-get install -y ${{ matrix.compiler }}
- name: Install boost
if: startsWith(matrix.with-boost, '--with-boost=$GITHUB_WORKSPACE')
run: |
wget --quiet -O - ${{ matrix.boost-url }} | tar -xj
- name: Configure
working-directory: asio
run: |
./autogen.sh
./configure ${{ matrix.separate-compilation }} ${{ matrix.with-boost }}
- name: Line length check
working-directory: asio
run: perl ./boostify.pl --includes-only
- name: Sanity check
if: startsWith(matrix.build-type, 'sanity')
working-directory: asio/src/tests
run: make unit/io_context.log unit/ip/tcp.log unit/ts/net.log
- name: Build
if: startsWith(matrix.build-type, 'full')
working-directory: asio
run: make && make check