]> git.proxmox.com Git - mirror_qemu.git/blame - .travis.yml
fuse: Implement hole detection through lseek
[mirror_qemu.git] / .travis.yml
CommitLineData
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 4os: linux
e769905e 5dist: focal
fe863ab9 6language: c
fe863ab9
AB
7compiler:
8 - gcc
4bc629b2 9cache:
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
22addons:
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
63notifications:
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
71env:
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
85git:
86 # we want to do this ourselves
87 submodules: false
197be697 88
b3165c87
AB
89# Common first phase for all steps
90before_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 96before_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 101script:
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 115after_script:
4f8bde52 116 - df -h
312995c2 117 - if command -v ccache ; then ccache --show-stats ; fi
197be697
DB
118
119
321e6ea5 120jobs:
fe863ab9 121 include:
df2bb38e 122 # Just build tools and run minimal unit and softfloat checks
7f808687 123 - name: "GCC check-unit and check-softfloat"
097aebd8 124 env:
df2bb38e
AB
125 - BASE_CONFIG="--enable-tools"
126 - CONFIG="--disable-user --disable-system"
0a7c0ae0 127 - TEST_CMD="make check-unit check-softfloat -j${JOBS}"
7d183c54
PMD
128 - CACHE_NAME="${TRAVIS_BRANCH}-linux-gcc-default"
129
df2bb38e 130
138382c6 131 # --enable-debug implies --enable-debug-tcg, also runs quite a bit slower
097aebd8
PMD
132 - name: "GCC debug (main-softmmu)"
133 env:
138382c6 134 - CONFIG="--enable-debug --target-list=${MAIN_SOFTMMU_TARGETS}"
8fb90e3d 135 - CACHE_NAME="${TRAVIS_BRANCH}-linux-gcc-debug"
4e6e7df6
AB
136
137
138382c6 138 # TCG debug can be run just on its own and is mostly agnostic to user/softmmu distinctions
097aebd8
PMD
139 - name: "GCC debug (user)"
140 env:
4e6e7df6 141 - CONFIG="--enable-debug-tcg --disable-system"
19633df8 142 - CACHE_NAME="${TRAVIS_BRANCH}-linux-gcc-debug-tcg"
3e094234 143
2f6c2526 144 # Module builds are mostly of interest to major distros
097aebd8
PMD
145 - name: "GCC modules (main-softmmu)"
146 env:
8c3daf97 147 - CONFIG="--enable-modules --target-list=${MAIN_SOFTMMU_TARGETS}"
7d183c54 148 - CACHE_NAME="${TRAVIS_BRANCH}-linux-gcc-default"
3e094234
DB
149
150
956d4506 151 # Check we can build docs and tools (out of tree)
204b30e2
AB
152 - name: "tools and docs (bionic)"
153 dist: bionic
097aebd8 154 env:
956d4506 155 - BUILD_DIR="out-of-tree/build/dir" SRC_DIR="../../.."
570f3c77
AB
156 - BASE_CONFIG="--enable-tools --enable-docs"
157 - CONFIG="--target-list=x86_64-softmmu,aarch64-linux-user"
7d183c54 158 - CACHE_NAME="${TRAVIS_BRANCH}-linux-gcc-default"
570f3c77
AB
159 addons:
160 apt:
161 packages:
345d7053 162 - ninja-build
68e5b85e 163 - python3-sphinx
570f3c77
AB
164 - perl
165
197be697 166
ae6d692d 167 # Test with Clang for compile portability (Travis uses clang-5.0)
097aebd8
PMD
168 - name: "Clang (user)"
169 env:
6f83cf88 170 - CONFIG="--disable-system --host-cc=clang --cxx=clang++"
e2bef011 171 - CACHE_NAME="${TRAVIS_BRANCH}-linux-clang-default"
ae6d692d 172 compiler: clang
197be697
DB
173
174
097aebd8
PMD
175 - name: "Clang (main-softmmu)"
176 env:
6f83cf88
TH
177 - CONFIG="--target-list=${MAIN_SOFTMMU_TARGETS}
178 --host-cc=clang --cxx=clang++"
b08c2ae3 179 - CACHE_NAME="${TRAVIS_BRANCH}-linux-clang-sanitize"
7831147e
AB
180 compiler: clang
181 before_script:
bc4486fb 182 - mkdir -p ${BUILD_DIR} && cd ${BUILD_DIR}
c47110d9 183 - ${SRC_DIR}/configure ${CONFIG} --extra-cflags="-fsanitize=undefined -Werror" || { cat config.log meson-logs/meson-log.txt && exit 1; }
7831147e
AB
184
185
097aebd8
PMD
186 - name: "Clang (other-softmmu)"
187 env:
6f83cf88
TH
188 - CONFIG="--disable-user --target-list-exclude=${MAIN_SOFTMMU_TARGETS}
189 --host-cc=clang --cxx=clang++"
e2bef011 190 - CACHE_NAME="${TRAVIS_BRANCH}-linux-clang-default"
d9a6b013 191 compiler: clang
197be697
DB
192
193
6c933291 194 # gprof/gcov are GCC features
097aebd8 195 - name: "GCC gprof/gcov"
e769905e 196 dist: bionic
345d7053
PB
197 addons:
198 apt:
199 packages:
200 - ninja-build
097aebd8 201 env:
e769905e
TH
202 - CONFIG="--enable-gprof --enable-gcov --disable-libssh
203 --target-list=${MAIN_SOFTMMU_TARGETS}"
0708e647
AB
204 after_success:
205 - ${SRC_DIR}/scripts/travis/coverage-summary.sh
197be697
DB
206
207
20885b5b 208 # We manually include builds which we disable "make check" for
097aebd8
PMD
209 - name: "GCC without-default-devices (softmmu)"
210 env:
386dc514 211 - CONFIG="--without-default-devices --disable-user"
7d183c54 212 - CACHE_NAME="${TRAVIS_BRANCH}-linux-gcc-default"
20885b5b
PB
213 - TEST_CMD=""
214
215
32265288 216 # Using newer GCC with sanitizers
097aebd8 217 - name: "GCC9 with sanitizers (softmmu)"
e769905e 218 dist: bionic
097aebd8 219 addons:
32265288 220 apt:
ac07ffc6 221 update: true
32265288
AB
222 sources:
223 # PPAs for newer toolchains
224 - ubuntu-toolchain-r-test
225 packages:
226 # Extra toolchains
3998c25e
AB
227 - gcc-9
228 - g++-9
32265288
AB
229 # Build dependencies
230 - libaio-dev
231 - libattr1-dev
232 - libbrlapi-dev
233 - libcap-ng-dev
e769905e 234 - libgnutls28-dev
32265288
AB
235 - libgtk-3-dev
236 - libiscsi-dev
237 - liblttng-ust-dev
238 - libnfs-dev
239 - libncurses5-dev
240 - libnss3-dev
241 - libpixman-1-dev
e769905e 242 - libpng-dev
32265288 243 - librados-dev
241e7955
TH
244 - libsdl2-dev
245 - libsdl2-image-dev
32265288
AB
246 - libseccomp-dev
247 - libspice-protocol-dev
248 - libspice-server-dev
32265288
AB
249 - liburcu-dev
250 - libusb-1.0-0-dev
95310576 251 - libvte-2.91-dev
345d7053 252 - ninja-build
32265288
AB
253 - sparse
254 - uuid-dev
255 language: generic
256 compiler: none
257 env:
3998c25e 258 - COMPILER_NAME=gcc CXX=g++-9 CC=gcc-9
e769905e 259 - CONFIG="--cc=gcc-9 --cxx=g++-9 --disable-linux-user"
32265288
AB
260 - TEST_CMD=""
261 before_script:
bc4486fb 262 - mkdir -p ${BUILD_DIR} && cd ${BUILD_DIR}
c47110d9 263 - ${SRC_DIR}/configure ${CONFIG} --extra-cflags="-g3 -O0 -fsanitize=thread" || { cat config.log meson-logs/meson-log.txt && exit 1; }
197be697
DB
264
265
097aebd8
PMD
266 - name: "[aarch64] GCC check-tcg"
267 arch: arm64
e769905e 268 dist: focal
9c5941a9
TH
269 addons:
270 apt_packages:
271 - libaio-dev
272 - libattr1-dev
273 - libbrlapi-dev
274 - libcap-ng-dev
275 - libgcrypt20-dev
276 - libgnutls28-dev
277 - libgtk-3-dev
278 - libiscsi-dev
279 - liblttng-ust-dev
280 - libncurses5-dev
281 - libnfs-dev
282 - libnss3-dev
283 - libpixman-1-dev
284 - libpng-dev
285 - librados-dev
286 - libsdl2-dev
287 - libseccomp-dev
288 - liburcu-dev
289 - libusb-1.0-0-dev
290 - libvdeplug-dev
291 - libvte-2.91-dev
345d7053 292 - ninja-build
58a1e5b6
WSM
293 # Tests dependencies
294 - genisoimage
9c5941a9
TH
295 env:
296 - TEST_CMD="make check check-tcg V=1"
297 - CONFIG="--disable-containers --target-list=${MAIN_SOFTMMU_TARGETS}"
1de8e4c4 298 - UNRELIABLE=true
9c5941a9 299
097aebd8
PMD
300 - name: "[ppc64] GCC check-tcg"
301 arch: ppc64le
e769905e 302 dist: focal
9c5941a9
TH
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"
daee97f6 331 - CONFIG="--disable-containers --target-list=ppc64-softmmu,ppc64le-linux-user"
9c5941a9 332
097aebd8
PMD
333 - name: "[s390x] GCC check-tcg"
334 arch: s390x
9c5941a9
TH
335 dist: bionic
336 addons:
337 apt_packages:
338 - libaio-dev
339 - libattr1-dev
340 - libbrlapi-dev
341 - libcap-ng-dev
342 - libgcrypt20-dev
343 - libgnutls28-dev
344 - libgtk-3-dev
345 - libiscsi-dev
346 - liblttng-ust-dev
347 - libncurses5-dev
348 - libnfs-dev
349 - libnss3-dev
350 - libpixman-1-dev
351 - libpng-dev
352 - librados-dev
353 - libsdl2-dev
354 - libseccomp-dev
355 - liburcu-dev
356 - libusb-1.0-0-dev
357 - libvdeplug-dev
358 - libvte-2.91-dev
345d7053 359 - ninja-build
58a1e5b6
WSM
360 # Tests dependencies
361 - genisoimage
9c5941a9
TH
362 env:
363 - TEST_CMD="make check check-tcg V=1"
364 - CONFIG="--disable-containers --target-list=${MAIN_SOFTMMU_TARGETS},s390x-linux-user"
1de8e4c4 365 - UNRELIABLE=true
31c8cc4f 366 script:
31c8cc4f
TH
367 - BUILD_RC=0 && make -j${JOBS} || BUILD_RC=$?
368 - |
369 if [ "$BUILD_RC" -eq 0 ] ; then
370 mv pc-bios/s390-ccw/*.img pc-bios/ ;
371 ${TEST_CMD} ;
372 else
373 $(exit $BUILD_RC);
374 fi
61ac3dcc 375
100a5efb
TH
376 - name: "[s390x] GCC (other-softmmu)"
377 arch: s390x
378 dist: bionic
379 addons:
380 apt_packages:
381 - libaio-dev
382 - libattr1-dev
383 - libcap-ng-dev
384 - libgnutls28-dev
385 - libiscsi-dev
386 - liblttng-ust-dev
387 - liblzo2-dev
388 - libncurses-dev
389 - libnfs-dev
390 - libnss3-dev
391 - libpixman-1-dev
392 - libsdl2-dev
393 - libsdl2-image-dev
394 - libseccomp-dev
395 - libsnappy-dev
396 - libzstd-dev
397 - nettle-dev
398 - xfslibs-dev
345d7053 399 - ninja-build
100a5efb
TH
400 # Tests dependencies
401 - genisoimage
402 env:
403 - CONFIG="--disable-containers --audio-drv-list=sdl --disable-user
404 --target-list-exclude=${MAIN_SOFTMMU_TARGETS}"
405
406 - name: "[s390x] GCC (user)"
407 arch: s390x
408 dist: bionic
409 addons:
410 apt_packages:
411 - libgcrypt20-dev
412 - libgnutls28-dev
345d7053 413 - ninja-build
100a5efb
TH
414 env:
415 - CONFIG="--disable-containers --disable-system"
416
aae8b87e 417 - name: "[s390x] Clang (disable-tcg)"
41e1f0e2
PMD
418 arch: s390x
419 dist: bionic
aae8b87e 420 compiler: clang
41e1f0e2
PMD
421 addons:
422 apt_packages:
423 - libaio-dev
424 - libattr1-dev
425 - libbrlapi-dev
426 - libcap-ng-dev
427 - libgcrypt20-dev
428 - libgnutls28-dev
429 - libgtk-3-dev
430 - libiscsi-dev
431 - liblttng-ust-dev
432 - libncurses5-dev
433 - libnfs-dev
434 - libnss3-dev
435 - libpixman-1-dev
436 - libpng-dev
437 - librados-dev
438 - libsdl2-dev
439 - libseccomp-dev
440 - liburcu-dev
441 - libusb-1.0-0-dev
442 - libvdeplug-dev
443 - libvte-2.91-dev
345d7053 444 - ninja-build
41e1f0e2
PMD
445 env:
446 - TEST_CMD="make check-unit"
aae8b87e
TH
447 - CONFIG="--disable-containers --disable-tcg --enable-kvm
448 --disable-tools --host-cc=clang --cxx=clang++"
1de8e4c4 449 - UNRELIABLE=true
41e1f0e2 450
61ac3dcc
PMD
451 # Release builds
452 # The make-release script expect a QEMU version, so our tag must start with a 'v'.
453 # This is the case when release candidate tags are created.
097aebd8
PMD
454 - name: "Release tarball"
455 if: tag IS present AND tag =~ /^v\d+\.\d+(\.\d+)?(-\S*)?$/
61ac3dcc
PMD
456 env:
457 # We want to build from the release tarball
458 - BUILD_DIR="release/build/dir" SRC_DIR="../../.."
459 - BASE_CONFIG="--prefix=$PWD/dist"
460 - CONFIG="--target-list=x86_64-softmmu,aarch64-softmmu,armeb-linux-user,ppc-linux-user"
0a7c0ae0 461 - TEST_CMD="make install -j${JOBS}"
61ac3dcc
PMD
462 - QEMU_VERSION="${TRAVIS_TAG:1}"
463 - CACHE_NAME="${TRAVIS_BRANCH}-linux-gcc-default"
61ac3dcc
PMD
464 script:
465 - make -C ${SRC_DIR} qemu-${QEMU_VERSION}.tar.bz2
466 - ls -l ${SRC_DIR}/qemu-${QEMU_VERSION}.tar.bz2
467 - tar -xf ${SRC_DIR}/qemu-${QEMU_VERSION}.tar.bz2 && cd qemu-${QEMU_VERSION}
bc4486fb 468 - mkdir -p release-build && cd release-build
c47110d9 469 - ../configure ${BASE_CONFIG} ${CONFIG} || { cat config.log meson-logs/meson-log.txt && exit 1; }
61ac3dcc 470 - make install
1de8e4c4
AB
471 allow_failures:
472 - env: UNRELIABLE=true