]>
Commit | Line | Data |
---|---|---|
95310576 AB |
1 | # The current Travis default is a VM based 16.04 Xenial on GCE |
2 | # Additional builds with specific requirements for a full VM need to | |
3 | # be added as additional matrix: entries later on | |
321e6ea5 | 4 | os: linux |
e769905e | 5 | dist: focal |
fe863ab9 | 6 | language: c |
fe863ab9 AB |
7 | compiler: |
8 | - gcc | |
4bc629b2 | 9 | cache: |
5ef9c53c PMD |
10 | # There is one cache per branch and compiler version. |
11 | # characteristics of each job are used to identify the cache: | |
22a23195 | 12 | # - OS name (currently only linux) |
e769905e | 13 | # - OS distribution (for Linux, bionic or focal) |
5ef9c53c | 14 | # - Names and values of visible environment variables set in .travis.yml or Settings panel |
731cbb64 | 15 | timeout: 1200 |
4bc629b2 | 16 | ccache: true |
6e189d78 | 17 | pip: true |
c1073e44 PMD |
18 | directories: |
19 | - $HOME/avocado/data/cache | |
197be697 DB |
20 | |
21 | ||
692d162c AB |
22 | addons: |
23 | apt: | |
24 | packages: | |
32265288 | 25 | # Build dependencies |
692d162c AB |
26 | - libaio-dev |
27 | - libattr1-dev | |
28 | - libbrlapi-dev | |
29 | - libcap-ng-dev | |
e769905e | 30 | - libgcc-7-dev |
3c7a8b41 | 31 | - libgnutls28-dev |
692d162c AB |
32 | - libgtk-3-dev |
33 | - libiscsi-dev | |
34 | - liblttng-ust-dev | |
35 | - libncurses5-dev | |
d83414e1 | 36 | - libnfs-dev |
692d162c AB |
37 | - libnss3-dev |
38 | - libpixman-1-dev | |
3c7a8b41 | 39 | - libpng-dev |
692d162c | 40 | - librados-dev |
241e7955 TH |
41 | - libsdl2-dev |
42 | - libsdl2-image-dev | |
692d162c AB |
43 | - libseccomp-dev |
44 | - libspice-protocol-dev | |
45 | - libspice-server-dev | |
b10d49d7 | 46 | - libssh-dev |
692d162c AB |
47 | - liburcu-dev |
48 | - libusb-1.0-0-dev | |
7c1dd4d1 | 49 | - libvdeplug-dev |
95310576 | 50 | - libvte-2.91-dev |
3a678481 | 51 | - libzstd-dev |
345d7053 | 52 | - ninja-build |
692d162c AB |
53 | - sparse |
54 | - uuid-dev | |
0708e647 | 55 | - gcovr |
58a1e5b6 WSM |
56 | # Tests dependencies |
57 | - genisoimage | |
692d162c | 58 | |
197be697 | 59 | |
cb4c2536 PK |
60 | # The channel name "irc.oftc.net#qemu" is encrypted against qemu/qemu |
61 | # to prevent IRC notifications from forks. This was created using: | |
62 | # $ travis encrypt -r "qemu/qemu" "irc.oftc.net#qemu" | |
39d16d29 AB |
63 | notifications: |
64 | irc: | |
65 | channels: | |
cb4c2536 | 66 | - secure: "F7GDRgjuOo5IUyRLqSkmDL7kvdU4UcH3Lm/W2db2JnDHTGCqgEdaYEYKciyCLZ57vOTsTsOgesN8iUT7hNHBd1KWKjZe9KDTZWppWRYVwAwQMzVeSOsbbU4tRoJ6Pp+3qhH1Z0eGYR9ZgKYAoTumDFgSAYRp4IscKS8jkoedOqM=" |
39d16d29 AB |
67 | on_success: change |
68 | on_failure: always | |
197be697 DB |
69 | |
70 | ||
fe863ab9 AB |
71 | env: |
72 | global: | |
bc4486fb PB |
73 | - SRC_DIR=".." |
74 | - BUILD_DIR="build" | |
570f3c77 | 75 | - BASE_CONFIG="--disable-docs --disable-tools" |
4f46afd9 | 76 | - TEST_BUILD_CMD="" |
05273a43 | 77 | - TEST_CMD="make check V=1" |
8c3daf97 | 78 | # This is broadly a list of "mainline" softmmu targets which have support across the major distros |
6e988880 | 79 | - MAIN_SOFTMMU_TARGETS="aarch64-softmmu,mips64-softmmu,ppc64-softmmu,riscv64-softmmu,s390x-softmmu,x86_64-softmmu" |
bcfbf0d5 PMD |
80 | - CCACHE_SLOPPINESS="include_file_ctime,include_file_mtime" |
81 | - CCACHE_MAXSIZE=1G | |
2dbd39c2 | 82 | - G_MESSAGES_DEBUG=error |
bcfbf0d5 | 83 | |
197be697 | 84 | |
cb021cfe AB |
85 | git: |
86 | # we want to do this ourselves | |
87 | submodules: false | |
197be697 | 88 | |
b3165c87 AB |
89 | # Common first phase for all steps |
90 | before_install: | |
91 | - if command -v ccache ; then ccache --zero-stats ; fi | |
0a7c0ae0 AB |
92 | - export JOBS=$(($(getconf _NPROCESSORS_ONLN) + 1)) |
93 | - echo "=== Using ${JOBS} simultaneous jobs ===" | |
197be697 | 94 | |
b3165c87 | 95 | # Configure step - may be overridden |
eebf2940 | 96 | before_script: |
ebf2ff65 | 97 | - mkdir -p ${BUILD_DIR} && cd ${BUILD_DIR} |
c47110d9 | 98 | - ${SRC_DIR}/configure ${BASE_CONFIG} ${CONFIG} || { cat config.log meson-logs/meson-log.txt && exit 1; } |
b3165c87 AB |
99 | |
100 | # Main build & test - rarely overridden - controlled by TEST_CMD | |
eebf2940 | 101 | script: |
0a7c0ae0 | 102 | - BUILD_RC=0 && make -j${JOBS} || BUILD_RC=$? |
4f46afd9 AB |
103 | - | |
104 | if [ "$BUILD_RC" -eq 0 ] && [ -n "$TEST_BUILD_CMD" ]; then | |
105 | ${TEST_BUILD_CMD} || BUILD_RC=$? | |
106 | else | |
107 | $(exit $BUILD_RC); | |
108 | fi | |
ec49faac AB |
109 | - | |
110 | if [ "$BUILD_RC" -eq 0 ] ; then | |
111 | ${TEST_CMD} ; | |
112 | else | |
113 | $(exit $BUILD_RC); | |
114 | fi | |
bcfbf0d5 | 115 | after_script: |
4f8bde52 | 116 | - df -h |
312995c2 | 117 | - if command -v ccache ; then ccache --show-stats ; fi |
197be697 DB |
118 | |
119 | ||
321e6ea5 | 120 | jobs: |
fe863ab9 | 121 | include: |
138382c6 | 122 | # --enable-debug implies --enable-debug-tcg, also runs quite a bit slower |
097aebd8 PMD |
123 | - name: "GCC debug (main-softmmu)" |
124 | env: | |
138382c6 | 125 | - CONFIG="--enable-debug --target-list=${MAIN_SOFTMMU_TARGETS}" |
8fb90e3d | 126 | - CACHE_NAME="${TRAVIS_BRANCH}-linux-gcc-debug" |
4e6e7df6 AB |
127 | |
128 | ||
138382c6 | 129 | # TCG debug can be run just on its own and is mostly agnostic to user/softmmu distinctions |
097aebd8 PMD |
130 | - name: "GCC debug (user)" |
131 | env: | |
4e6e7df6 | 132 | - CONFIG="--enable-debug-tcg --disable-system" |
19633df8 | 133 | - CACHE_NAME="${TRAVIS_BRANCH}-linux-gcc-debug-tcg" |
3e094234 | 134 | |
2f6c2526 | 135 | # Module builds are mostly of interest to major distros |
097aebd8 PMD |
136 | - name: "GCC modules (main-softmmu)" |
137 | env: | |
8c3daf97 | 138 | - CONFIG="--enable-modules --target-list=${MAIN_SOFTMMU_TARGETS}" |
7d183c54 | 139 | - CACHE_NAME="${TRAVIS_BRANCH}-linux-gcc-default" |
3e094234 DB |
140 | |
141 | ||
ae6d692d | 142 | # Test with Clang for compile portability (Travis uses clang-5.0) |
097aebd8 PMD |
143 | - name: "Clang (user)" |
144 | env: | |
6f83cf88 | 145 | - CONFIG="--disable-system --host-cc=clang --cxx=clang++" |
e2bef011 | 146 | - CACHE_NAME="${TRAVIS_BRANCH}-linux-clang-default" |
ae6d692d | 147 | compiler: clang |
197be697 DB |
148 | |
149 | ||
097aebd8 PMD |
150 | - name: "Clang (main-softmmu)" |
151 | env: | |
6f83cf88 TH |
152 | - CONFIG="--target-list=${MAIN_SOFTMMU_TARGETS} |
153 | --host-cc=clang --cxx=clang++" | |
b08c2ae3 | 154 | - CACHE_NAME="${TRAVIS_BRANCH}-linux-clang-sanitize" |
7831147e AB |
155 | compiler: clang |
156 | before_script: | |
bc4486fb | 157 | - mkdir -p ${BUILD_DIR} && cd ${BUILD_DIR} |
c47110d9 | 158 | - ${SRC_DIR}/configure ${CONFIG} --extra-cflags="-fsanitize=undefined -Werror" || { cat config.log meson-logs/meson-log.txt && exit 1; } |
7831147e AB |
159 | |
160 | ||
097aebd8 PMD |
161 | - name: "Clang (other-softmmu)" |
162 | env: | |
6f83cf88 TH |
163 | - CONFIG="--disable-user --target-list-exclude=${MAIN_SOFTMMU_TARGETS} |
164 | --host-cc=clang --cxx=clang++" | |
e2bef011 | 165 | - CACHE_NAME="${TRAVIS_BRANCH}-linux-clang-default" |
d9a6b013 | 166 | compiler: clang |
197be697 DB |
167 | |
168 | ||
6c933291 | 169 | # gprof/gcov are GCC features |
097aebd8 | 170 | - name: "GCC gprof/gcov" |
e769905e | 171 | dist: bionic |
345d7053 PB |
172 | addons: |
173 | apt: | |
174 | packages: | |
175 | - ninja-build | |
097aebd8 | 176 | env: |
e769905e TH |
177 | - CONFIG="--enable-gprof --enable-gcov --disable-libssh |
178 | --target-list=${MAIN_SOFTMMU_TARGETS}" | |
0708e647 AB |
179 | after_success: |
180 | - ${SRC_DIR}/scripts/travis/coverage-summary.sh | |
197be697 DB |
181 | |
182 | ||
32265288 | 183 | # Using newer GCC with sanitizers |
097aebd8 | 184 | - name: "GCC9 with sanitizers (softmmu)" |
e769905e | 185 | dist: bionic |
097aebd8 | 186 | addons: |
32265288 | 187 | apt: |
ac07ffc6 | 188 | update: true |
32265288 AB |
189 | sources: |
190 | # PPAs for newer toolchains | |
191 | - ubuntu-toolchain-r-test | |
192 | packages: | |
193 | # Extra toolchains | |
3998c25e AB |
194 | - gcc-9 |
195 | - g++-9 | |
32265288 AB |
196 | # Build dependencies |
197 | - libaio-dev | |
198 | - libattr1-dev | |
199 | - libbrlapi-dev | |
200 | - libcap-ng-dev | |
e769905e | 201 | - libgnutls28-dev |
32265288 AB |
202 | - libgtk-3-dev |
203 | - libiscsi-dev | |
204 | - liblttng-ust-dev | |
205 | - libnfs-dev | |
206 | - libncurses5-dev | |
207 | - libnss3-dev | |
208 | - libpixman-1-dev | |
e769905e | 209 | - libpng-dev |
32265288 | 210 | - librados-dev |
241e7955 TH |
211 | - libsdl2-dev |
212 | - libsdl2-image-dev | |
32265288 AB |
213 | - libseccomp-dev |
214 | - libspice-protocol-dev | |
215 | - libspice-server-dev | |
32265288 AB |
216 | - liburcu-dev |
217 | - libusb-1.0-0-dev | |
95310576 | 218 | - libvte-2.91-dev |
345d7053 | 219 | - ninja-build |
32265288 AB |
220 | - sparse |
221 | - uuid-dev | |
222 | language: generic | |
223 | compiler: none | |
224 | env: | |
3998c25e | 225 | - COMPILER_NAME=gcc CXX=g++-9 CC=gcc-9 |
e769905e | 226 | - CONFIG="--cc=gcc-9 --cxx=g++-9 --disable-linux-user" |
32265288 AB |
227 | - TEST_CMD="" |
228 | before_script: | |
bc4486fb | 229 | - mkdir -p ${BUILD_DIR} && cd ${BUILD_DIR} |
c47110d9 | 230 | - ${SRC_DIR}/configure ${CONFIG} --extra-cflags="-g3 -O0 -fsanitize=thread" || { cat config.log meson-logs/meson-log.txt && exit 1; } |
197be697 DB |
231 | |
232 | ||
097aebd8 PMD |
233 | - name: "[aarch64] GCC check-tcg" |
234 | arch: arm64 | |
e769905e | 235 | dist: focal |
9c5941a9 TH |
236 | addons: |
237 | apt_packages: | |
238 | - libaio-dev | |
239 | - libattr1-dev | |
240 | - libbrlapi-dev | |
241 | - libcap-ng-dev | |
242 | - libgcrypt20-dev | |
243 | - libgnutls28-dev | |
244 | - libgtk-3-dev | |
245 | - libiscsi-dev | |
246 | - liblttng-ust-dev | |
247 | - libncurses5-dev | |
248 | - libnfs-dev | |
249 | - libnss3-dev | |
250 | - libpixman-1-dev | |
251 | - libpng-dev | |
252 | - librados-dev | |
253 | - libsdl2-dev | |
254 | - libseccomp-dev | |
255 | - liburcu-dev | |
256 | - libusb-1.0-0-dev | |
257 | - libvdeplug-dev | |
258 | - libvte-2.91-dev | |
345d7053 | 259 | - ninja-build |
58a1e5b6 WSM |
260 | # Tests dependencies |
261 | - genisoimage | |
9c5941a9 TH |
262 | env: |
263 | - TEST_CMD="make check check-tcg V=1" | |
264 | - CONFIG="--disable-containers --target-list=${MAIN_SOFTMMU_TARGETS}" | |
1de8e4c4 | 265 | - UNRELIABLE=true |
9c5941a9 | 266 | |
097aebd8 PMD |
267 | - name: "[ppc64] GCC check-tcg" |
268 | arch: ppc64le | |
e769905e | 269 | dist: focal |
9c5941a9 TH |
270 | addons: |
271 | apt_packages: | |
272 | - libaio-dev | |
273 | - libattr1-dev | |
274 | - libbrlapi-dev | |
275 | - libcap-ng-dev | |
276 | - libgcrypt20-dev | |
277 | - libgnutls28-dev | |
278 | - libgtk-3-dev | |
279 | - libiscsi-dev | |
280 | - liblttng-ust-dev | |
281 | - libncurses5-dev | |
282 | - libnfs-dev | |
283 | - libnss3-dev | |
284 | - libpixman-1-dev | |
285 | - libpng-dev | |
286 | - librados-dev | |
287 | - libsdl2-dev | |
288 | - libseccomp-dev | |
289 | - liburcu-dev | |
290 | - libusb-1.0-0-dev | |
291 | - libvdeplug-dev | |
292 | - libvte-2.91-dev | |
345d7053 | 293 | - ninja-build |
58a1e5b6 WSM |
294 | # Tests dependencies |
295 | - genisoimage | |
9c5941a9 TH |
296 | env: |
297 | - TEST_CMD="make check check-tcg V=1" | |
daee97f6 | 298 | - CONFIG="--disable-containers --target-list=ppc64-softmmu,ppc64le-linux-user" |
9c5941a9 | 299 | |
097aebd8 PMD |
300 | - name: "[s390x] GCC check-tcg" |
301 | arch: s390x | |
9c5941a9 TH |
302 | dist: bionic |
303 | addons: | |
304 | apt_packages: | |
305 | - libaio-dev | |
306 | - libattr1-dev | |
307 | - libbrlapi-dev | |
308 | - libcap-ng-dev | |
309 | - libgcrypt20-dev | |
310 | - libgnutls28-dev | |
311 | - libgtk-3-dev | |
312 | - libiscsi-dev | |
313 | - liblttng-ust-dev | |
314 | - libncurses5-dev | |
315 | - libnfs-dev | |
316 | - libnss3-dev | |
317 | - libpixman-1-dev | |
318 | - libpng-dev | |
319 | - librados-dev | |
320 | - libsdl2-dev | |
321 | - libseccomp-dev | |
322 | - liburcu-dev | |
323 | - libusb-1.0-0-dev | |
324 | - libvdeplug-dev | |
325 | - libvte-2.91-dev | |
345d7053 | 326 | - ninja-build |
58a1e5b6 WSM |
327 | # Tests dependencies |
328 | - genisoimage | |
9c5941a9 TH |
329 | env: |
330 | - TEST_CMD="make check check-tcg V=1" | |
331 | - CONFIG="--disable-containers --target-list=${MAIN_SOFTMMU_TARGETS},s390x-linux-user" | |
1de8e4c4 | 332 | - UNRELIABLE=true |
31c8cc4f | 333 | script: |
31c8cc4f TH |
334 | - BUILD_RC=0 && make -j${JOBS} || BUILD_RC=$? |
335 | - | | |
336 | if [ "$BUILD_RC" -eq 0 ] ; then | |
337 | mv pc-bios/s390-ccw/*.img pc-bios/ ; | |
338 | ${TEST_CMD} ; | |
339 | else | |
340 | $(exit $BUILD_RC); | |
341 | fi | |
61ac3dcc | 342 | |
100a5efb TH |
343 | - name: "[s390x] GCC (other-softmmu)" |
344 | arch: s390x | |
345 | dist: bionic | |
346 | addons: | |
347 | apt_packages: | |
348 | - libaio-dev | |
349 | - libattr1-dev | |
350 | - libcap-ng-dev | |
351 | - libgnutls28-dev | |
352 | - libiscsi-dev | |
353 | - liblttng-ust-dev | |
354 | - liblzo2-dev | |
355 | - libncurses-dev | |
356 | - libnfs-dev | |
357 | - libnss3-dev | |
358 | - libpixman-1-dev | |
359 | - libsdl2-dev | |
360 | - libsdl2-image-dev | |
361 | - libseccomp-dev | |
362 | - libsnappy-dev | |
363 | - libzstd-dev | |
364 | - nettle-dev | |
365 | - xfslibs-dev | |
345d7053 | 366 | - ninja-build |
100a5efb TH |
367 | # Tests dependencies |
368 | - genisoimage | |
369 | env: | |
370 | - CONFIG="--disable-containers --audio-drv-list=sdl --disable-user | |
371 | --target-list-exclude=${MAIN_SOFTMMU_TARGETS}" | |
372 | ||
373 | - name: "[s390x] GCC (user)" | |
374 | arch: s390x | |
375 | dist: bionic | |
376 | addons: | |
377 | apt_packages: | |
378 | - libgcrypt20-dev | |
379 | - libgnutls28-dev | |
345d7053 | 380 | - ninja-build |
100a5efb TH |
381 | env: |
382 | - CONFIG="--disable-containers --disable-system" | |
383 | ||
aae8b87e | 384 | - name: "[s390x] Clang (disable-tcg)" |
41e1f0e2 PMD |
385 | arch: s390x |
386 | dist: bionic | |
aae8b87e | 387 | compiler: clang |
41e1f0e2 PMD |
388 | addons: |
389 | apt_packages: | |
390 | - libaio-dev | |
391 | - libattr1-dev | |
392 | - libbrlapi-dev | |
393 | - libcap-ng-dev | |
394 | - libgcrypt20-dev | |
395 | - libgnutls28-dev | |
396 | - libgtk-3-dev | |
397 | - libiscsi-dev | |
398 | - liblttng-ust-dev | |
399 | - libncurses5-dev | |
400 | - libnfs-dev | |
401 | - libnss3-dev | |
402 | - libpixman-1-dev | |
403 | - libpng-dev | |
404 | - librados-dev | |
405 | - libsdl2-dev | |
406 | - libseccomp-dev | |
407 | - liburcu-dev | |
408 | - libusb-1.0-0-dev | |
409 | - libvdeplug-dev | |
410 | - libvte-2.91-dev | |
345d7053 | 411 | - ninja-build |
41e1f0e2 PMD |
412 | env: |
413 | - TEST_CMD="make check-unit" | |
aae8b87e TH |
414 | - CONFIG="--disable-containers --disable-tcg --enable-kvm |
415 | --disable-tools --host-cc=clang --cxx=clang++" | |
1de8e4c4 | 416 | - UNRELIABLE=true |
41e1f0e2 | 417 | |
61ac3dcc PMD |
418 | # Release builds |
419 | # The make-release script expect a QEMU version, so our tag must start with a 'v'. | |
420 | # This is the case when release candidate tags are created. | |
097aebd8 PMD |
421 | - name: "Release tarball" |
422 | if: tag IS present AND tag =~ /^v\d+\.\d+(\.\d+)?(-\S*)?$/ | |
61ac3dcc PMD |
423 | env: |
424 | # We want to build from the release tarball | |
425 | - BUILD_DIR="release/build/dir" SRC_DIR="../../.." | |
426 | - BASE_CONFIG="--prefix=$PWD/dist" | |
427 | - CONFIG="--target-list=x86_64-softmmu,aarch64-softmmu,armeb-linux-user,ppc-linux-user" | |
0a7c0ae0 | 428 | - TEST_CMD="make install -j${JOBS}" |
61ac3dcc PMD |
429 | - QEMU_VERSION="${TRAVIS_TAG:1}" |
430 | - CACHE_NAME="${TRAVIS_BRANCH}-linux-gcc-default" | |
61ac3dcc PMD |
431 | script: |
432 | - make -C ${SRC_DIR} qemu-${QEMU_VERSION}.tar.bz2 | |
433 | - ls -l ${SRC_DIR}/qemu-${QEMU_VERSION}.tar.bz2 | |
434 | - tar -xf ${SRC_DIR}/qemu-${QEMU_VERSION}.tar.bz2 && cd qemu-${QEMU_VERSION} | |
bc4486fb | 435 | - mkdir -p release-build && cd release-build |
c47110d9 | 436 | - ../configure ${BASE_CONFIG} ${CONFIG} || { cat config.log meson-logs/meson-log.txt && exit 1; } |
61ac3dcc | 437 | - make install |
1de8e4c4 AB |
438 | allow_failures: |
439 | - env: UNRELIABLE=true |