2424 fail-fast : false
2525 matrix :
2626 os : [ubuntu-latest, macos-latest]
27+ os-type : [ubuntu, mac]
2728 test-group : [basic]
2829 compiler-family : [none]
2930 c-compiler : [gcc, clang]
3334 linking : [dynamic, static]
3435 build-type : [classic]
3536 exclude :
37+ - os : ubuntu-latest
38+ os-type : mac
39+ - os : macos-latest
40+ os-type : ubuntu
3641 - c-compiler : gcc
3742 cc-compiler : clang++
3843 - c-compiler : clang
@@ -50,54 +55,61 @@ jobs:
5055 include :
5156 - test-group : extra
5257 os : ubuntu-latest
58+ os-type : ubuntu
5359 build-type : asan
5460 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
5763 debug : debug
5864 coverage : nocoverage
5965 - test-group : extra
6066 os : ubuntu-latest
67+ os-type : ubuntu
6168 build-type : msan
6269 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
6572 debug : debug
6673 coverage : nocoverage
6774 - test-group : extra
6875 os : ubuntu-latest
76+ os-type : ubuntu
6977 build-type : lsan
7078 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
7381 debug : debug
7482 coverage : nocoverage
7583 - test-group : extra
7684 os : ubuntu-latest
85+ os-type : ubuntu
7786 build-type : tsan
7887 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
8190 debug : debug
8291 coverage : nocoverage
8392 - test-group : extra
8493 os : ubuntu-latest
94+ os-type : ubuntu
8595 build-type : ubsan
8696 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
8999 debug : debug
90100 coverage : nocoverage
91101 - test-group : extra
92- os : ubuntu-latest
102+ os : ubuntu-18.04
103+ os-type : ubuntu
93104 build-type : none
94105 compiler-family : gcc
95106 c-compiler : gcc-5
96107 cc-compiler : g++-5
97108 debug : nodebug
98109 coverage : nocoverage
99110 - test-group : extra
100- os : ubuntu-latest
111+ os : ubuntu-18.04
112+ os-type : ubuntu
101113 build-type : none
102114 compiler-family : gcc
103115 c-compiler : gcc-6
@@ -106,6 +118,7 @@ jobs:
106118 coverage : nocoverage
107119 - test-group : extra
108120 os : ubuntu-latest
121+ os-type : ubuntu
109122 build-type : none
110123 compiler-family : gcc
111124 c-compiler : gcc-7
@@ -114,6 +127,7 @@ jobs:
114127 coverage : nocoverage
115128 - test-group : extra
116129 os : ubuntu-latest
130+ os-type : ubuntu
117131 build-type : none
118132 compiler-family : gcc
119133 c-compiler : gcc-8
@@ -122,30 +136,34 @@ jobs:
122136 coverage : nocoverage
123137 - test-group : extra
124138 os : ubuntu-latest
139+ os-type : ubuntu
125140 build-type : none
126141 compiler-family : gcc
127142 c-compiler : gcc-9
128143 cc-compiler : g++-9
129144 debug : nodebug
130145 coverage : nocoverage
131146 - test-group : extra
132- os : ubuntu-latest
147+ os : ubuntu-18.04
148+ os-type : ubuntu
133149 build-type : none
134150 compiler-family : clang
135151 c-compiler : clang-3.9
136152 cc-compiler : clang++-3.9
137153 debug : nodebug
138154 coverage : nocoverage
139155 - test-group : extra
140- os : ubuntu-latest
156+ os : ubuntu-18.04
157+ os-type : ubuntu
141158 build-type : none
142159 compiler-family : clang
143160 c-compiler : clang-4.0
144161 cc-compiler : clang++-4.0
145162 debug : nodebug
146163 coverage : nocoverage
147164 - test-group : extra
148- os : ubuntu-latest
165+ os : ubuntu-18.04
166+ os-type : ubuntu
149167 build-type : none
150168 compiler-family : clang
151169 c-compiler : clang-5.0
@@ -154,6 +172,7 @@ jobs:
154172 coverage : nocoverage
155173 - test-group : extra
156174 os : ubuntu-latest
175+ os-type : ubuntu
157176 build-type : none
158177 compiler-family : clang
159178 c-compiler : clang-6.0
@@ -162,6 +181,7 @@ jobs:
162181 coverage : nocoverage
163182 - test-group : extra
164183 os : ubuntu-latest
184+ os-type : ubuntu
165185 build-type : none
166186 compiler-family : clang
167187 c-compiler : clang-7
@@ -170,6 +190,7 @@ jobs:
170190 coverage : nocoverage
171191 - test-group : extra
172192 os : ubuntu-latest
193+ os-type : ubuntu
173194 build-type : none
174195 compiler-family : clang
175196 c-compiler : clang-8
@@ -178,6 +199,7 @@ jobs:
178199 coverage : nocoverage
179200 - test-group : extra
180201 os : ubuntu-latest
202+ os-type : ubuntu
181203 build-type : none
182204 compiler-family : clang
183205 c-compiler : clang-9
@@ -186,6 +208,7 @@ jobs:
186208 coverage : nocoverage
187209 - test-group : extra
188210 os : ubuntu-latest
211+ os-type : ubuntu
189212 build-type : valgrind
190213 compiler-family : gcc
191214 c-compiler : gcc-7
@@ -194,6 +217,7 @@ jobs:
194217 coverage : nocoverage
195218 - test-group : extra
196219 os : ubuntu-latest
220+ os-type : ubuntu
197221 build-type : iwyu
198222 compiler-family : clang
199223 c-compiler : clang-9
@@ -202,6 +226,7 @@ jobs:
202226 coverage : nocoverage
203227 - test-group : performance
204228 os : ubuntu-latest
229+ os-type : ubuntu
205230 build-type : select
206231 compiler-family : gcc
207232 c-compiler : gcc-7
@@ -210,6 +235,7 @@ jobs:
210235 coverage : nocoverage
211236 - test-group : performance
212237 os : ubuntu-latest
238+ os-type : ubuntu
213239 build-type : nodelay
214240 compiler-family : gcc
215241 c-compiler : gcc-7
@@ -218,6 +244,7 @@ jobs:
218244 coverage : nocoverage
219245 - test-group : performance
220246 os : ubuntu-latest
247+ os-type : ubuntu
221248 build-type : threads
222249 compiler-family : gcc
223250 c-compiler : gcc-7
@@ -226,6 +253,7 @@ jobs:
226253 coverage : nocoverage
227254 - test-group : extra
228255 os : ubuntu-latest
256+ os-type : ubuntu
229257 build-type : lint
230258 compiler-family : gcc
231259 c-compiler : gcc-7
@@ -249,27 +277,27 @@ jobs:
249277 run : |
250278 sudo add-apt-repository ppa:ubuntu-toolchain-r/test ;
251279 sudo apt-get update ;
252- if : ${{ matrix.test-group == 'extra' && matrix.os == 'ubuntu-latest ' }}
280+ if : ${{ matrix.test-group == 'extra' && matrix.os-type == 'ubuntu' }}
253281
254282 - name : Install apache benchmark if needed
255283 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' }}
257285
258286 - name : Install optional clang if needed
259287 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' }}
261289
262290 - name : Install optional gcc if needed
263291 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' }}
265293
266294 - name : Install valgrind if needed
267295 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' }}
269297
270298 - name : Install cpplint if needed
271299 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' }}
273301
274302 - name : Install IWYU dependencies if needed
275303 run : |
@@ -278,15 +306,15 @@ jobs:
278306 # Use same CMAKE used by iwyu in their setup for travis
279307 wget -O cmake.sh https://cmake.org/files/v3.10/cmake-3.10.0-Linux-x86_64.sh ;
280308 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' }}
282310
283311 - name : IWYU from cache (for testing)
284312 id : cache-IWYU
285313 uses : actions/cache@v2
286314 with :
287315 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' }}
290318
291319 # Installing iwyu manually because clang and iwyu paths won't match on Ubuntu otherwise.
292320 - name : Build IWYU if requested
@@ -301,13 +329,13 @@ jobs:
301329 cmake -G "Unix Makefiles" -DCMAKE_PREFIX_PATH=$CLANG_ROOT_PATH -DCMAKE_C_COMPILER=$CLANG_BIN_PATH/clang -DCMAKE_CXX_COMPILER=$CLANG_BIN_PATH/clang++ ../ ;
302330 make ;
303331 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' }}
305333
306334 - name : Install IWYU if requested
307335 run : |
308336 cd include-what-you-use/build_iwyu ;
309337 sudo make install ;
310- if : ${{ matrix.build-type == 'iwyu' && matrix.os == 'ubuntu-latest ' }}
338+ if : ${{ matrix.build-type == 'iwyu' && matrix.os-type == 'ubuntu' }}
311339
312340 - name : CURL from cache (for testing)
313341 id : cache-CURL
@@ -322,7 +350,7 @@ jobs:
322350 curl https://libhttpserver.s3.amazonaws.com/travis_stuff/curl-7.75.0.tar.gz -o curl-7.75.0.tar.gz ;
323351 tar -xzf curl-7.75.0.tar.gz ;
324352 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
326354 make ;
327355 if : ${{ matrix.os == 'macos-latest' && steps.cache-CURL.outputs.cache-hit != 'true' }}
328356
@@ -332,7 +360,7 @@ jobs:
332360
333361 - name : Install CURL (for testing on linux)
334362 run : sudo apt-get install libcurl4-openssl-dev
335- if : ${{ matrix.os == 'ubuntu-latest ' }}
363+ if : ${{ matrix.os-type == 'ubuntu' }}
336364
337365 - name : Install autotools on mac
338366 run : brew install autoconf automake libtool
@@ -344,14 +372,14 @@ jobs:
344372 sudo pip install codecov ;
345373 sudo pip install gcovr ;
346374 sudo apt-get install cppcheck ;
347- if : ${{ matrix.os == 'ubuntu-latest ' }}
375+ if : ${{ matrix.os-type == 'ubuntu' }}
348376
349377 - name : Fetch libmicrohttpd from cache
350378 id : cache-libmicrohttpd
351379 uses : actions/cache@v2
352380 with :
353381 path : libmicrohttpd-0.9.59
354- key : ${{ matrix.os }}-libmicrohttpd-pre-built
382+ key : ${{ matrix.os }}-${{ matrix.c-compiler }}- libmicrohttpd-pre-built
355383
356384 - name : Build libmicrohttpd dependency (if not cached)
357385 run : |
@@ -367,11 +395,11 @@ jobs:
367395
368396 - name : Refresh links to shared libs
369397 run : sudo ldconfig ;
370- if : ${{ matrix.os == 'ubuntu-latest ' }}
398+ if : ${{ matrix.os-type == 'ubuntu' }}
371399
372400 - name : Run cpplint on code
373401 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' }}
375403
376404 - name : Run libhttpserver configure
377405 run : |
@@ -453,7 +481,7 @@ jobs:
453481 run : |
454482 cd src/ ;
455483 cppcheck --error-exitcode=1 . ;
456- if : ${{ matrix.os == 'ubuntu-latest ' }}
484+ if : ${{ matrix.os-type == 'ubuntu' }}
457485
458486 - name : Run performance tests (select)
459487 run : |
@@ -483,4 +511,4 @@ jobs:
483511 run : |
484512 cd build ;
485513 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