usb/hcd-xhci: Split pci wrapper for xhci base model
[qemu.git] / .travis.yml
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
4 os: linux
5 dist: xenial
6 language: c
7 compiler:
8   - gcc
9 cache:
10   # There is one cache per branch and compiler version.
11   # characteristics of each job are used to identify the cache:
12   # - OS name (currently only linux)
13   # - OS distribution (for Linux, xenial, trusty, or precise)
14   # - Names and values of visible environment variables set in .travis.yml or Settings panel
15   timeout: 1200
16   ccache: true
17   pip: true
18   directories:
19   - $HOME/avocado/data/cache
20
21
22 addons:
23   apt:
24     packages:
25       # Build dependencies
26       - libaio-dev
27       - libattr1-dev
28       - libbrlapi-dev
29       - libcap-ng-dev
30       - libgcc-4.8-dev
31       - libgnutls28-dev
32       - libgtk-3-dev
33       - libiscsi-dev
34       - liblttng-ust-dev
35       - libncurses5-dev
36       - libnfs-dev
37       - libnss3-dev
38       - libpixman-1-dev
39       - libpng-dev
40       - librados-dev
41       - libsdl2-dev
42       - libsdl2-image-dev
43       - libseccomp-dev
44       - libspice-protocol-dev
45       - libspice-server-dev
46       - libssh-dev
47       - liburcu-dev
48       - libusb-1.0-0-dev
49       - libvdeplug-dev
50       - libvte-2.91-dev
51       - libzstd-dev
52       - sparse
53       - uuid-dev
54       - gcovr
55       # Tests dependencies
56       - genisoimage
57
58
59 # The channel name "irc.oftc.net#qemu" is encrypted against qemu/qemu
60 # to prevent IRC notifications from forks. This was created using:
61 # $ travis encrypt -r "qemu/qemu" "irc.oftc.net#qemu"
62 notifications:
63   irc:
64     channels:
65       - secure: "F7GDRgjuOo5IUyRLqSkmDL7kvdU4UcH3Lm/W2db2JnDHTGCqgEdaYEYKciyCLZ57vOTsTsOgesN8iUT7hNHBd1KWKjZe9KDTZWppWRYVwAwQMzVeSOsbbU4tRoJ6Pp+3qhH1Z0eGYR9ZgKYAoTumDFgSAYRp4IscKS8jkoedOqM="
66     on_success: change
67     on_failure: always
68
69
70 env:
71   global:
72     - SRC_DIR=".."
73     - BUILD_DIR="build"
74     - BASE_CONFIG="--disable-docs --disable-tools"
75     - TEST_BUILD_CMD=""
76     - TEST_CMD="make check V=1"
77     # This is broadly a list of "mainline" softmmu targets which have support across the major distros
78     - MAIN_SOFTMMU_TARGETS="aarch64-softmmu,mips64-softmmu,ppc64-softmmu,riscv64-softmmu,s390x-softmmu,x86_64-softmmu"
79     - CCACHE_SLOPPINESS="include_file_ctime,include_file_mtime"
80     - CCACHE_MAXSIZE=1G
81     - G_MESSAGES_DEBUG=error
82
83
84 git:
85   # we want to do this ourselves
86   submodules: false
87
88 # Common first phase for all steps
89 before_install:
90   - if command -v ccache ; then ccache --zero-stats ; fi
91   - export JOBS=$(($(getconf _NPROCESSORS_ONLN) + 1))
92   - echo "=== Using ${JOBS} simultaneous jobs ==="
93
94 # Configure step - may be overridden
95 before_script:
96   - mkdir -p ${BUILD_DIR} && cd ${BUILD_DIR}
97   - ${SRC_DIR}/configure ${BASE_CONFIG} ${CONFIG} || { cat config.log && exit 1; }
98
99 # Main build & test - rarely overridden - controlled by TEST_CMD
100 script:
101   - BUILD_RC=0 && make -j${JOBS} || BUILD_RC=$?
102   - |
103     if [ "$BUILD_RC" -eq 0 ] && [ -n "$TEST_BUILD_CMD" ]; then
104         ${TEST_BUILD_CMD} || BUILD_RC=$?
105     else
106         $(exit $BUILD_RC);
107     fi
108   - |
109     if [ "$BUILD_RC" -eq 0 ] ; then
110         ${TEST_CMD} ;
111     else
112         $(exit $BUILD_RC);
113     fi
114 after_script:
115   - df -h
116   - if command -v ccache ; then ccache --show-stats ; fi
117
118
119 jobs:
120   include:
121     - name: "GCC static (user)"
122       env:
123         - CONFIG="--disable-system --static"
124         - CACHE_NAME="${TRAVIS_BRANCH}-linux-gcc-default"
125
126
127     # we split the system builds as it takes a while to build them all
128     - name: "GCC (main-softmmu)"
129       env:
130         - CONFIG="--disable-user --target-list=${MAIN_SOFTMMU_TARGETS}"
131         - CACHE_NAME="${TRAVIS_BRANCH}-linux-gcc-default"
132
133
134     - name: "GCC (other-softmmu)"
135       env:
136        - CONFIG="--disable-user --target-list-exclude=${MAIN_SOFTMMU_TARGETS}"
137         - CACHE_NAME="${TRAVIS_BRANCH}-linux-gcc-default"
138
139
140     # Just build tools and run minimal unit and softfloat checks
141     - name: "GCC check-unit and check-softfloat"
142       env:
143         - BASE_CONFIG="--enable-tools"
144         - CONFIG="--disable-user --disable-system"
145         - TEST_CMD="make check-unit check-softfloat -j${JOBS}"
146         - CACHE_NAME="${TRAVIS_BRANCH}-linux-gcc-default"
147
148
149     # --enable-debug implies --enable-debug-tcg, also runs quite a bit slower
150     - name: "GCC debug (main-softmmu)"
151       env:
152         - CONFIG="--enable-debug --target-list=${MAIN_SOFTMMU_TARGETS}"
153         - CACHE_NAME="${TRAVIS_BRANCH}-linux-gcc-debug"
154
155
156     # TCG debug can be run just on its own and is mostly agnostic to user/softmmu distinctions
157     - name: "GCC debug (user)"
158       env:
159         - CONFIG="--enable-debug-tcg --disable-system"
160         - CACHE_NAME="${TRAVIS_BRANCH}-linux-gcc-debug-tcg"
161
162     # Module builds are mostly of interest to major distros
163     - name: "GCC modules (main-softmmu)"
164       env:
165         - CONFIG="--enable-modules --target-list=${MAIN_SOFTMMU_TARGETS}"
166         - CACHE_NAME="${TRAVIS_BRANCH}-linux-gcc-default"
167
168
169     # Alternate coroutines implementations are only really of interest to KVM users
170     # However we can't test against KVM on Travis so we can only run unit tests
171     - name: "check-unit coroutine=ucontext"
172       env:
173         - CONFIG="--with-coroutine=ucontext --disable-tcg"
174         - TEST_CMD="make check-unit -j${JOBS} V=1"
175
176
177     - name: "check-unit coroutine=sigaltstack"
178       env:
179         - CONFIG="--with-coroutine=sigaltstack --disable-tcg"
180         - TEST_CMD="make check-unit -j${JOBS} V=1"
181
182
183     # Check we can build docs and tools (out of tree)
184     - name: "tools and docs (bionic)"
185       dist: bionic
186       env:
187         - BUILD_DIR="out-of-tree/build/dir" SRC_DIR="../../.."
188         - BASE_CONFIG="--enable-tools --enable-docs"
189         - CONFIG="--target-list=x86_64-softmmu,aarch64-linux-user"
190         - CACHE_NAME="${TRAVIS_BRANCH}-linux-gcc-default"
191       addons:
192         apt:
193           packages:
194             - python3-sphinx
195             - texinfo
196             - perl
197
198
199     # Test with Clang for compile portability (Travis uses clang-5.0)
200     - name: "Clang (user)"
201       env:
202         - CONFIG="--disable-system --host-cc=clang --cxx=clang++"
203         - CACHE_NAME="${TRAVIS_BRANCH}-linux-clang-default"
204       compiler: clang
205
206
207     - name: "Clang (main-softmmu)"
208       env:
209         - CONFIG="--target-list=${MAIN_SOFTMMU_TARGETS}
210                   --host-cc=clang --cxx=clang++"
211         - CACHE_NAME="${TRAVIS_BRANCH}-linux-clang-sanitize"
212       compiler: clang
213       before_script:
214         - mkdir -p ${BUILD_DIR} && cd ${BUILD_DIR}
215         - ${SRC_DIR}/configure ${CONFIG} --extra-cflags="-fsanitize=undefined -Werror" || { cat config.log && exit 1; }
216
217
218     - name: "Clang (other-softmmu)"
219       env:
220         - CONFIG="--disable-user --target-list-exclude=${MAIN_SOFTMMU_TARGETS}
221                   --host-cc=clang --cxx=clang++"
222         - CACHE_NAME="${TRAVIS_BRANCH}-linux-clang-default"
223       compiler: clang
224
225
226     # gprof/gcov are GCC features
227     - name: "GCC gprof/gcov"
228       env:
229         - CONFIG="--enable-gprof --enable-gcov --disable-pie --target-list=${MAIN_SOFTMMU_TARGETS}"
230       after_success:
231         - ${SRC_DIR}/scripts/travis/coverage-summary.sh
232
233
234     # We manually include builds which we disable "make check" for
235     - name: "GCC without-default-devices (softmmu)"
236       env:
237         - CONFIG="--without-default-devices --disable-user"
238         - CACHE_NAME="${TRAVIS_BRANCH}-linux-gcc-default"
239         - TEST_CMD=""
240
241
242     # Check the TCG interpreter (TCI)
243     - name: "GCC TCI"
244       env:
245         - CONFIG="--enable-debug-tcg --enable-tcg-interpreter --disable-kvm --disable-containers
246             --target-list=alpha-softmmu,arm-softmmu,hppa-softmmu,m68k-softmmu,microblaze-softmmu,moxie-softmmu,ppc-softmmu,s390x-softmmu,x86_64-softmmu"
247         - TEST_CMD="make check-qtest check-tcg V=1"
248
249
250     # We don't need to exercise every backend with every front-end
251     - name: "GCC trace log,simple,syslog (user)"
252       env:
253         - CONFIG="--enable-trace-backends=log,simple,syslog --disable-system"
254         - TEST_CMD=""
255
256
257     - name: "GCC trace ftrace (x86_64-softmmu)"
258       env:
259         - CONFIG="--enable-trace-backends=ftrace --target-list=x86_64-softmmu"
260         - TEST_CMD=""
261
262
263     - name: "GCC trace ust (x86_64-softmmu)"
264       env:
265         - CONFIG="--enable-trace-backends=ust --target-list=x86_64-softmmu"
266         - TEST_CMD=""
267
268
269     # Python builds
270     - name: "GCC Python 3.5 (x86_64-softmmu)"
271       env:
272         - CONFIG="--target-list=x86_64-softmmu"
273         - CACHE_NAME="${TRAVIS_BRANCH}-linux-gcc-default"
274       language: python
275       python: 3.5
276
277
278     - name: "GCC Python 3.6 (x86_64-softmmu)"
279       env:
280         - CONFIG="--target-list=x86_64-softmmu"
281         - CACHE_NAME="${TRAVIS_BRANCH}-linux-gcc-default"
282       language: python
283       python: 3.6
284
285
286     # Using newer GCC with sanitizers
287     - name: "GCC9 with sanitizers (softmmu)"
288       addons:
289         apt:
290           update: true
291           sources:
292             # PPAs for newer toolchains
293             - ubuntu-toolchain-r-test
294           packages:
295             # Extra toolchains
296             - gcc-9
297             - g++-9
298             # Build dependencies
299             - libaio-dev
300             - libattr1-dev
301             - libbrlapi-dev
302             - libcap-ng-dev
303             - libgnutls-dev
304             - libgtk-3-dev
305             - libiscsi-dev
306             - liblttng-ust-dev
307             - libnfs-dev
308             - libncurses5-dev
309             - libnss3-dev
310             - libpixman-1-dev
311             - libpng12-dev
312             - librados-dev
313             - libsdl2-dev
314             - libsdl2-image-dev
315             - libseccomp-dev
316             - libspice-protocol-dev
317             - libspice-server-dev
318             - libssh-dev
319             - liburcu-dev
320             - libusb-1.0-0-dev
321             - libvte-2.91-dev
322             - sparse
323             - uuid-dev
324       language: generic
325       compiler: none
326       env:
327         - COMPILER_NAME=gcc CXX=g++-9 CC=gcc-9
328         - CONFIG="--cc=gcc-9 --cxx=g++-9 --disable-pie --disable-linux-user"
329         - TEST_CMD=""
330       before_script:
331         - mkdir -p ${BUILD_DIR} && cd ${BUILD_DIR}
332         - ${SRC_DIR}/configure ${CONFIG} --extra-cflags="-g3 -O0 -Wno-error=stringop-truncation -fsanitize=thread" --extra-ldflags="-fuse-ld=gold" || { cat config.log && exit 1; }
333
334
335     # Run check-tcg against linux-user
336     - name: "GCC check-tcg (user)"
337       env:
338         - CONFIG="--disable-system --enable-debug-tcg"
339         - TEST_BUILD_CMD="make build-tcg"
340         - TEST_CMD="make check-tcg"
341         - CACHE_NAME="${TRAVIS_BRANCH}-linux-gcc-debug-tcg"
342
343
344     # Run check-tcg against linux-user (with plugins)
345     # we skip sparc64-linux-user until it has been fixed somewhat
346     # we skip cris-linux-user as it doesn't use the common run loop
347     - name: "GCC plugins check-tcg (user)"
348       env:
349         - CONFIG="--disable-system --enable-plugins --enable-debug-tcg --target-list-exclude=sparc64-linux-user,cris-linux-user"
350         - TEST_BUILD_CMD="make build-tcg"
351         - TEST_CMD="make check-tcg"
352         - CACHE_NAME="${TRAVIS_BRANCH}-linux-gcc-debug-tcg"
353
354
355     # Run check-tcg against softmmu targets
356     - name: "GCC check-tcg (some-softmmu)"
357       env:
358         - CONFIG="--enable-debug-tcg --target-list=xtensa-softmmu,arm-softmmu,aarch64-softmmu,alpha-softmmu"
359         - TEST_BUILD_CMD="make build-tcg"
360         - TEST_CMD="make check-tcg"
361         - CACHE_NAME="${TRAVIS_BRANCH}-linux-gcc-debug-tcg"
362
363
364     # Run check-tcg against softmmu targets (with plugins)
365     - name: "GCC plugins check-tcg (some-softmmu)"
366       env:
367         - CONFIG="--enable-plugins --enable-debug-tcg --target-list=xtensa-softmmu,arm-softmmu,aarch64-softmmu,alpha-softmmu"
368         - TEST_BUILD_CMD="make build-tcg"
369         - TEST_CMD="make check-tcg"
370         - CACHE_NAME="${TRAVIS_BRANCH}-linux-gcc-debug-tcg"
371
372     - name: "[aarch64] GCC check-tcg"
373       arch: arm64
374       dist: xenial
375       addons:
376         apt_packages:
377           - libaio-dev
378           - libattr1-dev
379           - libbrlapi-dev
380           - libcap-ng-dev
381           - libgcrypt20-dev
382           - libgnutls28-dev
383           - libgtk-3-dev
384           - libiscsi-dev
385           - liblttng-ust-dev
386           - libncurses5-dev
387           - libnfs-dev
388           - libnss3-dev
389           - libpixman-1-dev
390           - libpng-dev
391           - librados-dev
392           - libsdl2-dev
393           - libseccomp-dev
394           - liburcu-dev
395           - libusb-1.0-0-dev
396           - libvdeplug-dev
397           - libvte-2.91-dev
398           # Tests dependencies
399           - genisoimage
400       env:
401         - TEST_CMD="make check check-tcg V=1"
402         - CONFIG="--disable-containers --target-list=${MAIN_SOFTMMU_TARGETS}"
403         - UNRELIABLE=true
404
405     - name: "[ppc64] GCC check-tcg"
406       arch: ppc64le
407       dist: xenial
408       addons:
409         apt_packages:
410           - libaio-dev
411           - libattr1-dev
412           - libbrlapi-dev
413           - libcap-ng-dev
414           - libgcrypt20-dev
415           - libgnutls28-dev
416           - libgtk-3-dev
417           - libiscsi-dev
418           - liblttng-ust-dev
419           - libncurses5-dev
420           - libnfs-dev
421           - libnss3-dev
422           - libpixman-1-dev
423           - libpng-dev
424           - librados-dev
425           - libsdl2-dev
426           - libseccomp-dev
427           - liburcu-dev
428           - libusb-1.0-0-dev
429           - libvdeplug-dev
430           - libvte-2.91-dev
431           # Tests dependencies
432           - genisoimage
433       env:
434         - TEST_CMD="make check check-tcg V=1"
435         - CONFIG="--disable-containers --target-list=ppc64-softmmu,ppc64le-linux-user"
436
437     - name: "[s390x] GCC check-tcg"
438       arch: s390x
439       dist: bionic
440       addons:
441         apt_packages:
442           - libaio-dev
443           - libattr1-dev
444           - libbrlapi-dev
445           - libcap-ng-dev
446           - libgcrypt20-dev
447           - libgnutls28-dev
448           - libgtk-3-dev
449           - libiscsi-dev
450           - liblttng-ust-dev
451           - libncurses5-dev
452           - libnfs-dev
453           - libnss3-dev
454           - libpixman-1-dev
455           - libpng-dev
456           - librados-dev
457           - libsdl2-dev
458           - libseccomp-dev
459           - liburcu-dev
460           - libusb-1.0-0-dev
461           - libvdeplug-dev
462           - libvte-2.91-dev
463           # Tests dependencies
464           - genisoimage
465       env:
466         - TEST_CMD="make check check-tcg V=1"
467         - CONFIG="--disable-containers --target-list=${MAIN_SOFTMMU_TARGETS},s390x-linux-user"
468         - UNRELIABLE=true
469       script:
470         - BUILD_RC=0 && make -j${JOBS} || BUILD_RC=$?
471         - |
472           if [ "$BUILD_RC" -eq 0 ] ; then
473               mv pc-bios/s390-ccw/*.img pc-bios/ ;
474               ${TEST_CMD} ;
475           else
476               $(exit $BUILD_RC);
477           fi
478
479     - name: "[s390x] GCC (other-softmmu)"
480       arch: s390x
481       dist: bionic
482       addons:
483         apt_packages:
484           - libaio-dev
485           - libattr1-dev
486           - libcap-ng-dev
487           - libgnutls28-dev
488           - libiscsi-dev
489           - liblttng-ust-dev
490           - liblzo2-dev
491           - libncurses-dev
492           - libnfs-dev
493           - libnss3-dev
494           - libpixman-1-dev
495           - libsdl2-dev
496           - libsdl2-image-dev
497           - libseccomp-dev
498           - libsnappy-dev
499           - libzstd-dev
500           - nettle-dev
501           - xfslibs-dev
502           # Tests dependencies
503           - genisoimage
504       env:
505         - CONFIG="--disable-containers --audio-drv-list=sdl --disable-user
506                   --target-list-exclude=${MAIN_SOFTMMU_TARGETS}"
507
508     - name: "[s390x] GCC (user)"
509       arch: s390x
510       dist: bionic
511       addons:
512         apt_packages:
513           - libgcrypt20-dev
514           - libgnutls28-dev
515       env:
516         - CONFIG="--disable-containers --disable-system"
517
518     - name: "[s390x] Clang (disable-tcg)"
519       arch: s390x
520       dist: bionic
521       compiler: clang
522       addons:
523         apt_packages:
524           - libaio-dev
525           - libattr1-dev
526           - libbrlapi-dev
527           - libcap-ng-dev
528           - libgcrypt20-dev
529           - libgnutls28-dev
530           - libgtk-3-dev
531           - libiscsi-dev
532           - liblttng-ust-dev
533           - libncurses5-dev
534           - libnfs-dev
535           - libnss3-dev
536           - libpixman-1-dev
537           - libpng-dev
538           - librados-dev
539           - libsdl2-dev
540           - libseccomp-dev
541           - liburcu-dev
542           - libusb-1.0-0-dev
543           - libvdeplug-dev
544           - libvte-2.91-dev
545       env:
546         - TEST_CMD="make check-unit"
547         - CONFIG="--disable-containers --disable-tcg --enable-kvm
548                   --disable-tools --host-cc=clang --cxx=clang++"
549         - UNRELIABLE=true
550
551     # Release builds
552     # The make-release script expect a QEMU version, so our tag must start with a 'v'.
553     # This is the case when release candidate tags are created.
554     - name: "Release tarball"
555       if: tag IS present AND tag =~ /^v\d+\.\d+(\.\d+)?(-\S*)?$/
556       env:
557         # We want to build from the release tarball
558         - BUILD_DIR="release/build/dir" SRC_DIR="../../.."
559         - BASE_CONFIG="--prefix=$PWD/dist"
560         - CONFIG="--target-list=x86_64-softmmu,aarch64-softmmu,armeb-linux-user,ppc-linux-user"
561         - TEST_CMD="make install -j${JOBS}"
562         - QEMU_VERSION="${TRAVIS_TAG:1}"
563         - CACHE_NAME="${TRAVIS_BRANCH}-linux-gcc-default"
564       script:
565         - make -C ${SRC_DIR} qemu-${QEMU_VERSION}.tar.bz2
566         - ls -l ${SRC_DIR}/qemu-${QEMU_VERSION}.tar.bz2
567         - tar -xf ${SRC_DIR}/qemu-${QEMU_VERSION}.tar.bz2 && cd qemu-${QEMU_VERSION}
568         - mkdir -p release-build && cd release-build
569         - ../configure ${BASE_CONFIG} ${CONFIG} || { cat config.log && exit 1; }
570         - make install
571   allow_failures:
572     - env: UNRELIABLE=true