24
24
fail-fast : false
25
25
matrix :
26
26
os : [ubuntu-latest, macos-latest]
27
+ os-type : [ubuntu, mac]
27
28
test-group : [basic]
28
29
compiler-family : [none]
29
30
c-compiler : [gcc, clang]
33
34
linking : [dynamic, static]
34
35
build-type : [classic]
35
36
exclude :
37
+ - os : ubuntu-latest
38
+ os-type : mac
39
+ - os : macos-latest
40
+ os-type : ubuntu
36
41
- c-compiler : gcc
37
42
cc-compiler : clang++
38
43
- c-compiler : clang
@@ -50,54 +55,61 @@ jobs:
50
55
include :
51
56
- test-group : extra
52
57
os : ubuntu-latest
58
+ os-type : ubuntu
53
59
build-type : asan
54
60
compiler-family : clang
55
- c-compiler : clang-3.9
56
- cc-compiler : clang++-3.9
61
+ c-compiler : clang-6.0
62
+ cc-compiler : clang++-6.0
57
63
debug : debug
58
64
coverage : nocoverage
59
65
- test-group : extra
60
66
os : ubuntu-latest
67
+ os-type : ubuntu
61
68
build-type : msan
62
69
compiler-family : clang
63
- c-compiler : clang-3.9
64
- cc-compiler : clang++-3.9
70
+ c-compiler : clang-6.0
71
+ cc-compiler : clang++-6.0
65
72
debug : debug
66
73
coverage : nocoverage
67
74
- test-group : extra
68
75
os : ubuntu-latest
76
+ os-type : ubuntu
69
77
build-type : lsan
70
78
compiler-family : clang
71
- c-compiler : clang-3.9
72
- cc-compiler : clang++-3.9
79
+ c-compiler : clang-6.0
80
+ cc-compiler : clang++-6.0
73
81
debug : debug
74
82
coverage : nocoverage
75
83
- test-group : extra
76
84
os : ubuntu-latest
85
+ os-type : ubuntu
77
86
build-type : tsan
78
87
compiler-family : clang
79
- c-compiler : clang-3.9
80
- cc-compiler : clang++-3.9
88
+ c-compiler : clang-6.0
89
+ cc-compiler : clang++-6.0
81
90
debug : debug
82
91
coverage : nocoverage
83
92
- test-group : extra
84
93
os : ubuntu-latest
94
+ os-type : ubuntu
85
95
build-type : ubsan
86
96
compiler-family : clang
87
- c-compiler : clang-3.9
88
- cc-compiler : clang++-3.9
97
+ c-compiler : clang-6.0
98
+ cc-compiler : clang++-6.0
89
99
debug : debug
90
100
coverage : nocoverage
91
101
- test-group : extra
92
- os : ubuntu-latest
102
+ os : ubuntu-18.04
103
+ os-type : ubuntu
93
104
build-type : none
94
105
compiler-family : gcc
95
106
c-compiler : gcc-5
96
107
cc-compiler : g++-5
97
108
debug : nodebug
98
109
coverage : nocoverage
99
110
- test-group : extra
100
- os : ubuntu-latest
111
+ os : ubuntu-18.04
112
+ os-type : ubuntu
101
113
build-type : none
102
114
compiler-family : gcc
103
115
c-compiler : gcc-6
@@ -106,6 +118,7 @@ jobs:
106
118
coverage : nocoverage
107
119
- test-group : extra
108
120
os : ubuntu-latest
121
+ os-type : ubuntu
109
122
build-type : none
110
123
compiler-family : gcc
111
124
c-compiler : gcc-7
@@ -114,6 +127,7 @@ jobs:
114
127
coverage : nocoverage
115
128
- test-group : extra
116
129
os : ubuntu-latest
130
+ os-type : ubuntu
117
131
build-type : none
118
132
compiler-family : gcc
119
133
c-compiler : gcc-8
@@ -122,30 +136,34 @@ jobs:
122
136
coverage : nocoverage
123
137
- test-group : extra
124
138
os : ubuntu-latest
139
+ os-type : ubuntu
125
140
build-type : none
126
141
compiler-family : gcc
127
142
c-compiler : gcc-9
128
143
cc-compiler : g++-9
129
144
debug : nodebug
130
145
coverage : nocoverage
131
146
- test-group : extra
132
- os : ubuntu-latest
147
+ os : ubuntu-18.04
148
+ os-type : ubuntu
133
149
build-type : none
134
150
compiler-family : clang
135
151
c-compiler : clang-3.9
136
152
cc-compiler : clang++-3.9
137
153
debug : nodebug
138
154
coverage : nocoverage
139
155
- test-group : extra
140
- os : ubuntu-latest
156
+ os : ubuntu-18.04
157
+ os-type : ubuntu
141
158
build-type : none
142
159
compiler-family : clang
143
160
c-compiler : clang-4.0
144
161
cc-compiler : clang++-4.0
145
162
debug : nodebug
146
163
coverage : nocoverage
147
164
- test-group : extra
148
- os : ubuntu-latest
165
+ os : ubuntu-18.04
166
+ os-type : ubuntu
149
167
build-type : none
150
168
compiler-family : clang
151
169
c-compiler : clang-5.0
@@ -154,6 +172,7 @@ jobs:
154
172
coverage : nocoverage
155
173
- test-group : extra
156
174
os : ubuntu-latest
175
+ os-type : ubuntu
157
176
build-type : none
158
177
compiler-family : clang
159
178
c-compiler : clang-6.0
@@ -162,6 +181,7 @@ jobs:
162
181
coverage : nocoverage
163
182
- test-group : extra
164
183
os : ubuntu-latest
184
+ os-type : ubuntu
165
185
build-type : none
166
186
compiler-family : clang
167
187
c-compiler : clang-7
@@ -170,6 +190,7 @@ jobs:
170
190
coverage : nocoverage
171
191
- test-group : extra
172
192
os : ubuntu-latest
193
+ os-type : ubuntu
173
194
build-type : none
174
195
compiler-family : clang
175
196
c-compiler : clang-8
@@ -178,6 +199,7 @@ jobs:
178
199
coverage : nocoverage
179
200
- test-group : extra
180
201
os : ubuntu-latest
202
+ os-type : ubuntu
181
203
build-type : none
182
204
compiler-family : clang
183
205
c-compiler : clang-9
@@ -186,6 +208,7 @@ jobs:
186
208
coverage : nocoverage
187
209
- test-group : extra
188
210
os : ubuntu-latest
211
+ os-type : ubuntu
189
212
build-type : valgrind
190
213
compiler-family : gcc
191
214
c-compiler : gcc-7
@@ -194,6 +217,7 @@ jobs:
194
217
coverage : nocoverage
195
218
- test-group : extra
196
219
os : ubuntu-latest
220
+ os-type : ubuntu
197
221
build-type : iwyu
198
222
compiler-family : clang
199
223
c-compiler : clang-9
@@ -202,6 +226,7 @@ jobs:
202
226
coverage : nocoverage
203
227
- test-group : performance
204
228
os : ubuntu-latest
229
+ os-type : ubuntu
205
230
build-type : select
206
231
compiler-family : gcc
207
232
c-compiler : gcc-7
@@ -210,6 +235,7 @@ jobs:
210
235
coverage : nocoverage
211
236
- test-group : performance
212
237
os : ubuntu-latest
238
+ os-type : ubuntu
213
239
build-type : nodelay
214
240
compiler-family : gcc
215
241
c-compiler : gcc-7
@@ -218,6 +244,7 @@ jobs:
218
244
coverage : nocoverage
219
245
- test-group : performance
220
246
os : ubuntu-latest
247
+ os-type : ubuntu
221
248
build-type : threads
222
249
compiler-family : gcc
223
250
c-compiler : gcc-7
@@ -226,6 +253,7 @@ jobs:
226
253
coverage : nocoverage
227
254
- test-group : extra
228
255
os : ubuntu-latest
256
+ os-type : ubuntu
229
257
build-type : lint
230
258
compiler-family : gcc
231
259
c-compiler : gcc-7
@@ -249,27 +277,27 @@ jobs:
249
277
run : |
250
278
sudo add-apt-repository ppa:ubuntu-toolchain-r/test ;
251
279
sudo apt-get update ;
252
- if : ${{ matrix.test-group == 'extra' && matrix.os == 'ubuntu-latest ' }}
280
+ if : ${{ matrix.test-group == 'extra' && matrix.os-type == 'ubuntu' }}
253
281
254
282
- name : Install apache benchmark if needed
255
283
run : sudo apt-get install apache2-utils ;
256
- if : ${{ matrix.test-group == 'performance' && matrix.os == 'ubuntu-latest ' }}
284
+ if : ${{ matrix.test-group == 'performance' && matrix.os-type == 'ubuntu' }}
257
285
258
286
- name : Install optional clang if needed
259
287
run : sudo apt-get install ${{ matrix.c-compiler }}
260
- if : ${{ matrix.compiler-family == 'clang' && matrix.os == 'ubuntu-latest ' }}
288
+ if : ${{ matrix.compiler-family == 'clang' && matrix.os-type == 'ubuntu' }}
261
289
262
290
- name : Install optional gcc if needed
263
291
run : sudo apt-get install ${{ matrix.cc-compiler }}
264
- if : ${{ matrix.compiler-family == 'gcc' && matrix.os == 'ubuntu-latest ' }}
292
+ if : ${{ matrix.compiler-family == 'gcc' && matrix.os-type == 'ubuntu' }}
265
293
266
294
- name : Install valgrind if needed
267
295
run : sudo apt-get install valgrind valgrind-dbg
268
- if : ${{ matrix.build-type == 'valgrind' && matrix.os == 'ubuntu-latest ' }}
296
+ if : ${{ matrix.build-type == 'valgrind' && matrix.os-type == 'ubuntu' }}
269
297
270
298
- name : Install cpplint if needed
271
299
run : sudo pip3 install cpplint ;
272
- if : ${{ matrix.build-type == 'lint' && matrix.os == 'ubuntu-latest ' }}
300
+ if : ${{ matrix.build-type == 'lint' && matrix.os-type == 'ubuntu' }}
273
301
274
302
- name : Install IWYU dependencies if needed
275
303
run : |
@@ -278,15 +306,15 @@ jobs:
278
306
# Use same CMAKE used by iwyu in their setup for travis
279
307
wget -O cmake.sh https://cmake.org/files/v3.10/cmake-3.10.0-Linux-x86_64.sh ;
280
308
sudo sh cmake.sh --skip-license --exclude-subdir --prefix=/usr/local ;
281
- if : ${{ matrix.build-type == 'iwyu' && matrix.os == 'ubuntu-latest ' }}
309
+ if : ${{ matrix.build-type == 'iwyu' && matrix.os-type == 'ubuntu' }}
282
310
283
311
- name : IWYU from cache (for testing)
284
312
id : cache-IWYU
285
313
uses : actions/cache@v2
286
314
with :
287
315
path : include-what-you-use
288
- key : ${{ matrix.os }}-include-what-you-use-pre-built
289
- if : ${{ matrix.build-type == 'iwyu' && matrix.os == 'ubuntu-latest ' }}
316
+ key : ${{ matrix.os }}-${{ matrix.c-compiler }}- include-what-you-use-pre-built
317
+ if : ${{ matrix.build-type == 'iwyu' && matrix.os-type == 'ubuntu' }}
290
318
291
319
# Installing iwyu manually because clang and iwyu paths won't match on Ubuntu otherwise.
292
320
- name : Build IWYU if requested
@@ -301,13 +329,13 @@ jobs:
301
329
cmake -G "Unix Makefiles" -DCMAKE_PREFIX_PATH=$CLANG_ROOT_PATH -DCMAKE_C_COMPILER=$CLANG_BIN_PATH/clang -DCMAKE_CXX_COMPILER=$CLANG_BIN_PATH/clang++ ../ ;
302
330
make ;
303
331
sudo make install ;
304
- if : ${{ matrix.build-type == 'iwyu' && matrix.os == 'ubuntu-latest ' && steps.cache-IWYU.outputs.cache-hit != 'true' }}
332
+ if : ${{ matrix.build-type == 'iwyu' && matrix.os-type == 'ubuntu' && steps.cache-IWYU.outputs.cache-hit != 'true' }}
305
333
306
334
- name : Install IWYU if requested
307
335
run : |
308
336
cd include-what-you-use/build_iwyu ;
309
337
sudo make install ;
310
- if : ${{ matrix.build-type == 'iwyu' && matrix.os == 'ubuntu-latest ' }}
338
+ if : ${{ matrix.build-type == 'iwyu' && matrix.os-type == 'ubuntu' }}
311
339
312
340
- name : CURL from cache (for testing)
313
341
id : cache-CURL
@@ -322,7 +350,7 @@ jobs:
322
350
curl https://libhttpserver.s3.amazonaws.com/travis_stuff/curl-7.75.0.tar.gz -o curl-7.75.0.tar.gz ;
323
351
tar -xzf curl-7.75.0.tar.gz ;
324
352
cd curl-7.75.0 ;
325
- if [ "$matrix.os" = "ubuntu-latest " ]; then ./configure ; else ./configure --with-darwinssl ; fi
353
+ if [ "$matrix.os-type " = "ubuntu" ]; then ./configure ; else ./configure --with-darwinssl ; fi
326
354
make ;
327
355
if : ${{ matrix.os == 'macos-latest' && steps.cache-CURL.outputs.cache-hit != 'true' }}
328
356
@@ -332,7 +360,7 @@ jobs:
332
360
333
361
- name : Install CURL (for testing on linux)
334
362
run : sudo apt-get install libcurl4-openssl-dev
335
- if : ${{ matrix.os == 'ubuntu-latest ' }}
363
+ if : ${{ matrix.os-type == 'ubuntu' }}
336
364
337
365
- name : Install autotools on mac
338
366
run : brew install autoconf automake libtool
@@ -344,14 +372,14 @@ jobs:
344
372
sudo pip install codecov ;
345
373
sudo pip install gcovr ;
346
374
sudo apt-get install cppcheck ;
347
- if : ${{ matrix.os == 'ubuntu-latest ' }}
375
+ if : ${{ matrix.os-type == 'ubuntu' }}
348
376
349
377
- name : Fetch libmicrohttpd from cache
350
378
id : cache-libmicrohttpd
351
379
uses : actions/cache@v2
352
380
with :
353
381
path : libmicrohttpd-0.9.59
354
- key : ${{ matrix.os }}-libmicrohttpd-pre-built
382
+ key : ${{ matrix.os }}-${{ matrix.c-compiler }}- libmicrohttpd-pre-built
355
383
356
384
- name : Build libmicrohttpd dependency (if not cached)
357
385
run : |
@@ -367,11 +395,11 @@ jobs:
367
395
368
396
- name : Refresh links to shared libs
369
397
run : sudo ldconfig ;
370
- if : ${{ matrix.os == 'ubuntu-latest ' }}
398
+ if : ${{ matrix.os-type == 'ubuntu' }}
371
399
372
400
- name : Run cpplint on code
373
401
run : cpplint --extensions=cpp,hpp --headers=hpp --recursive . ;
374
- if : ${{ matrix.build-type == 'lint' && matrix.os == 'ubuntu-latest ' }}
402
+ if : ${{ matrix.build-type == 'lint' && matrix.os-type == 'ubuntu' }}
375
403
376
404
- name : Run libhttpserver configure
377
405
run : |
@@ -453,7 +481,7 @@ jobs:
453
481
run : |
454
482
cd src/ ;
455
483
cppcheck --error-exitcode=1 . ;
456
- if : ${{ matrix.os == 'ubuntu-latest ' }}
484
+ if : ${{ matrix.os-type == 'ubuntu' }}
457
485
458
486
- name : Run performance tests (select)
459
487
run : |
@@ -483,4 +511,4 @@ jobs:
483
511
run : |
484
512
cd build ;
485
513
bash <(curl -s https://codecov.io/bash) ;
486
- if : ${{ matrix.os == 'ubuntu-latest ' && matrix.c-compiler == 'gcc' && matrix.debug == 'debug' && matrix.coverage == 'coverage' && success() }}
514
+ if : ${{ matrix.os-type == 'ubuntu' && matrix.c-compiler == 'gcc' && matrix.debug == 'debug' && matrix.coverage == 'coverage' && success() }}
0 commit comments