s390x/tcg: Implement BRANCH INDIRECT ON CONDITION (BIC)
[qemu/ar7.git] / .travis.yml
blobbd9a6fc06cc0a19a57970f640e9821e0e229e5f4
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
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
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
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
84 git:
85   # we want to do this ourselves
86   submodules: false
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 ==="
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; }
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
119 jobs:
120   include:
121     - name: "GCC static (user)"
122       env:
123         - CONFIG="--disable-system --static"
124         - CACHE_NAME="${TRAVIS_BRANCH}-linux-gcc-default"
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"
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"
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"
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"
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"
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"
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"
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"
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             - perl
198     # Test with Clang for compile portability (Travis uses clang-5.0)
199     - name: "Clang (user)"
200       env:
201         - CONFIG="--disable-system --host-cc=clang --cxx=clang++"
202         - CACHE_NAME="${TRAVIS_BRANCH}-linux-clang-default"
203       compiler: clang
206     - name: "Clang (main-softmmu)"
207       env:
208         - CONFIG="--target-list=${MAIN_SOFTMMU_TARGETS}
209                   --host-cc=clang --cxx=clang++"
210         - CACHE_NAME="${TRAVIS_BRANCH}-linux-clang-sanitize"
211       compiler: clang
212       before_script:
213         - mkdir -p ${BUILD_DIR} && cd ${BUILD_DIR}
214         - ${SRC_DIR}/configure ${CONFIG} --extra-cflags="-fsanitize=undefined -Werror" || { cat config.log && exit 1; }
217     - name: "Clang (other-softmmu)"
218       env:
219         - CONFIG="--disable-user --target-list-exclude=${MAIN_SOFTMMU_TARGETS}
220                   --host-cc=clang --cxx=clang++"
221         - CACHE_NAME="${TRAVIS_BRANCH}-linux-clang-default"
222       compiler: clang
225     # gprof/gcov are GCC features
226     - name: "GCC gprof/gcov"
227       env:
228         - CONFIG="--enable-gprof --enable-gcov --disable-pie --target-list=${MAIN_SOFTMMU_TARGETS}"
229       after_success:
230         - ${SRC_DIR}/scripts/travis/coverage-summary.sh
233     # We manually include builds which we disable "make check" for
234     - name: "GCC without-default-devices (softmmu)"
235       env:
236         - CONFIG="--without-default-devices --disable-user"
237         - CACHE_NAME="${TRAVIS_BRANCH}-linux-gcc-default"
238         - TEST_CMD=""
241     # Check the TCG interpreter (TCI)
242     - name: "GCC TCI"
243       env:
244         - CONFIG="--enable-debug-tcg --enable-tcg-interpreter --disable-kvm --disable-containers
245             --target-list=alpha-softmmu,arm-softmmu,hppa-softmmu,m68k-softmmu,microblaze-softmmu,moxie-softmmu,ppc-softmmu,s390x-softmmu,x86_64-softmmu"
246         - TEST_CMD="make check-qtest check-tcg V=1"
249     # We don't need to exercise every backend with every front-end
250     - name: "GCC trace log,simple,syslog (user)"
251       env:
252         - CONFIG="--enable-trace-backends=log,simple,syslog --disable-system"
253         - TEST_CMD=""
256     - name: "GCC trace ftrace (x86_64-softmmu)"
257       env:
258         - CONFIG="--enable-trace-backends=ftrace --target-list=x86_64-softmmu"
259         - TEST_CMD=""
262     - name: "GCC trace ust (x86_64-softmmu)"
263       env:
264         - CONFIG="--enable-trace-backends=ust --target-list=x86_64-softmmu"
265         - TEST_CMD=""
268     # Python builds
269     - name: "GCC Python 3.5 (x86_64-softmmu)"
270       env:
271         - CONFIG="--target-list=x86_64-softmmu"
272         - CACHE_NAME="${TRAVIS_BRANCH}-linux-gcc-default"
273       language: python
274       python: 3.5
277     - name: "GCC Python 3.6 (x86_64-softmmu)"
278       env:
279         - CONFIG="--target-list=x86_64-softmmu"
280         - CACHE_NAME="${TRAVIS_BRANCH}-linux-gcc-default"
281       language: python
282       python: 3.6
285     # Using newer GCC with sanitizers
286     - name: "GCC9 with sanitizers (softmmu)"
287       addons:
288         apt:
289           update: true
290           sources:
291             # PPAs for newer toolchains
292             - ubuntu-toolchain-r-test
293           packages:
294             # Extra toolchains
295             - gcc-9
296             - g++-9
297             # Build dependencies
298             - libaio-dev
299             - libattr1-dev
300             - libbrlapi-dev
301             - libcap-ng-dev
302             - libgnutls-dev
303             - libgtk-3-dev
304             - libiscsi-dev
305             - liblttng-ust-dev
306             - libnfs-dev
307             - libncurses5-dev
308             - libnss3-dev
309             - libpixman-1-dev
310             - libpng12-dev
311             - librados-dev
312             - libsdl2-dev
313             - libsdl2-image-dev
314             - libseccomp-dev
315             - libspice-protocol-dev
316             - libspice-server-dev
317             - libssh-dev
318             - liburcu-dev
319             - libusb-1.0-0-dev
320             - libvte-2.91-dev
321             - sparse
322             - uuid-dev
323       language: generic
324       compiler: none
325       env:
326         - COMPILER_NAME=gcc CXX=g++-9 CC=gcc-9
327         - CONFIG="--cc=gcc-9 --cxx=g++-9 --disable-pie --disable-linux-user"
328         - TEST_CMD=""
329       before_script:
330         - mkdir -p ${BUILD_DIR} && cd ${BUILD_DIR}
331         - ${SRC_DIR}/configure ${CONFIG} --extra-cflags="-g3 -O0 -Wno-error=stringop-truncation -fsanitize=thread" --extra-ldflags="-fuse-ld=gold" || { cat config.log && exit 1; }
334     # Run check-tcg against linux-user
335     - name: "GCC check-tcg (user)"
336       env:
337         - CONFIG="--disable-system --enable-debug-tcg"
338         - TEST_BUILD_CMD="make build-tcg"
339         - TEST_CMD="make check-tcg"
340         - CACHE_NAME="${TRAVIS_BRANCH}-linux-gcc-debug-tcg"
343     # Run check-tcg against linux-user (with plugins)
344     # we skip sparc64-linux-user until it has been fixed somewhat
345     # we skip cris-linux-user as it doesn't use the common run loop
346     - name: "GCC plugins check-tcg (user)"
347       env:
348         - CONFIG="--disable-system --enable-plugins --enable-debug-tcg --target-list-exclude=sparc64-linux-user,cris-linux-user"
349         - TEST_BUILD_CMD="make build-tcg"
350         - TEST_CMD="make check-tcg"
351         - CACHE_NAME="${TRAVIS_BRANCH}-linux-gcc-debug-tcg"
354     # Run check-tcg against softmmu targets
355     - name: "GCC check-tcg (some-softmmu)"
356       env:
357         - CONFIG="--enable-debug-tcg --target-list=xtensa-softmmu,arm-softmmu,aarch64-softmmu,alpha-softmmu"
358         - TEST_BUILD_CMD="make build-tcg"
359         - TEST_CMD="make check-tcg"
360         - CACHE_NAME="${TRAVIS_BRANCH}-linux-gcc-debug-tcg"
363     # Run check-tcg against softmmu targets (with plugins)
364     - name: "GCC plugins check-tcg (some-softmmu)"
365       env:
366         - CONFIG="--enable-plugins --enable-debug-tcg --target-list=xtensa-softmmu,arm-softmmu,aarch64-softmmu,alpha-softmmu"
367         - TEST_BUILD_CMD="make build-tcg"
368         - TEST_CMD="make check-tcg"
369         - CACHE_NAME="${TRAVIS_BRANCH}-linux-gcc-debug-tcg"
371     - name: "[aarch64] GCC check-tcg"
372       arch: arm64
373       dist: xenial
374       addons:
375         apt_packages:
376           - libaio-dev
377           - libattr1-dev
378           - libbrlapi-dev
379           - libcap-ng-dev
380           - libgcrypt20-dev
381           - libgnutls28-dev
382           - libgtk-3-dev
383           - libiscsi-dev
384           - liblttng-ust-dev
385           - libncurses5-dev
386           - libnfs-dev
387           - libnss3-dev
388           - libpixman-1-dev
389           - libpng-dev
390           - librados-dev
391           - libsdl2-dev
392           - libseccomp-dev
393           - liburcu-dev
394           - libusb-1.0-0-dev
395           - libvdeplug-dev
396           - libvte-2.91-dev
397           # Tests dependencies
398           - genisoimage
399       env:
400         - TEST_CMD="make check check-tcg V=1"
401         - CONFIG="--disable-containers --target-list=${MAIN_SOFTMMU_TARGETS}"
402         - UNRELIABLE=true
404     - name: "[ppc64] GCC check-tcg"
405       arch: ppc64le
406       dist: xenial
407       addons:
408         apt_packages:
409           - libaio-dev
410           - libattr1-dev
411           - libbrlapi-dev
412           - libcap-ng-dev
413           - libgcrypt20-dev
414           - libgnutls28-dev
415           - libgtk-3-dev
416           - libiscsi-dev
417           - liblttng-ust-dev
418           - libncurses5-dev
419           - libnfs-dev
420           - libnss3-dev
421           - libpixman-1-dev
422           - libpng-dev
423           - librados-dev
424           - libsdl2-dev
425           - libseccomp-dev
426           - liburcu-dev
427           - libusb-1.0-0-dev
428           - libvdeplug-dev
429           - libvte-2.91-dev
430           # Tests dependencies
431           - genisoimage
432       env:
433         - TEST_CMD="make check check-tcg V=1"
434         - CONFIG="--disable-containers --target-list=ppc64-softmmu,ppc64le-linux-user"
436     - name: "[s390x] GCC check-tcg"
437       arch: s390x
438       dist: bionic
439       addons:
440         apt_packages:
441           - libaio-dev
442           - libattr1-dev
443           - libbrlapi-dev
444           - libcap-ng-dev
445           - libgcrypt20-dev
446           - libgnutls28-dev
447           - libgtk-3-dev
448           - libiscsi-dev
449           - liblttng-ust-dev
450           - libncurses5-dev
451           - libnfs-dev
452           - libnss3-dev
453           - libpixman-1-dev
454           - libpng-dev
455           - librados-dev
456           - libsdl2-dev
457           - libseccomp-dev
458           - liburcu-dev
459           - libusb-1.0-0-dev
460           - libvdeplug-dev
461           - libvte-2.91-dev
462           # Tests dependencies
463           - genisoimage
464       env:
465         - TEST_CMD="make check check-tcg V=1"
466         - CONFIG="--disable-containers --target-list=${MAIN_SOFTMMU_TARGETS},s390x-linux-user"
467         - UNRELIABLE=true
468       script:
469         - BUILD_RC=0 && make -j${JOBS} || BUILD_RC=$?
470         - |
471           if [ "$BUILD_RC" -eq 0 ] ; then
472               mv pc-bios/s390-ccw/*.img pc-bios/ ;
473               ${TEST_CMD} ;
474           else
475               $(exit $BUILD_RC);
476           fi
478     - name: "[s390x] GCC (other-softmmu)"
479       arch: s390x
480       dist: bionic
481       addons:
482         apt_packages:
483           - libaio-dev
484           - libattr1-dev
485           - libcap-ng-dev
486           - libgnutls28-dev
487           - libiscsi-dev
488           - liblttng-ust-dev
489           - liblzo2-dev
490           - libncurses-dev
491           - libnfs-dev
492           - libnss3-dev
493           - libpixman-1-dev
494           - libsdl2-dev
495           - libsdl2-image-dev
496           - libseccomp-dev
497           - libsnappy-dev
498           - libzstd-dev
499           - nettle-dev
500           - xfslibs-dev
501           # Tests dependencies
502           - genisoimage
503       env:
504         - CONFIG="--disable-containers --audio-drv-list=sdl --disable-user
505                   --target-list-exclude=${MAIN_SOFTMMU_TARGETS}"
507     - name: "[s390x] GCC (user)"
508       arch: s390x
509       dist: bionic
510       addons:
511         apt_packages:
512           - libgcrypt20-dev
513           - libgnutls28-dev
514       env:
515         - CONFIG="--disable-containers --disable-system"
517     - name: "[s390x] Clang (disable-tcg)"
518       arch: s390x
519       dist: bionic
520       compiler: clang
521       addons:
522         apt_packages:
523           - libaio-dev
524           - libattr1-dev
525           - libbrlapi-dev
526           - libcap-ng-dev
527           - libgcrypt20-dev
528           - libgnutls28-dev
529           - libgtk-3-dev
530           - libiscsi-dev
531           - liblttng-ust-dev
532           - libncurses5-dev
533           - libnfs-dev
534           - libnss3-dev
535           - libpixman-1-dev
536           - libpng-dev
537           - librados-dev
538           - libsdl2-dev
539           - libseccomp-dev
540           - liburcu-dev
541           - libusb-1.0-0-dev
542           - libvdeplug-dev
543           - libvte-2.91-dev
544       env:
545         - TEST_CMD="make check-unit"
546         - CONFIG="--disable-containers --disable-tcg --enable-kvm
547                   --disable-tools --host-cc=clang --cxx=clang++"
548         - UNRELIABLE=true
550     # Release builds
551     # The make-release script expect a QEMU version, so our tag must start with a 'v'.
552     # This is the case when release candidate tags are created.
553     - name: "Release tarball"
554       if: tag IS present AND tag =~ /^v\d+\.\d+(\.\d+)?(-\S*)?$/
555       env:
556         # We want to build from the release tarball
557         - BUILD_DIR="release/build/dir" SRC_DIR="../../.."
558         - BASE_CONFIG="--prefix=$PWD/dist"
559         - CONFIG="--target-list=x86_64-softmmu,aarch64-softmmu,armeb-linux-user,ppc-linux-user"
560         - TEST_CMD="make install -j${JOBS}"
561         - QEMU_VERSION="${TRAVIS_TAG:1}"
562         - CACHE_NAME="${TRAVIS_BRANCH}-linux-gcc-default"
563       script:
564         - make -C ${SRC_DIR} qemu-${QEMU_VERSION}.tar.bz2
565         - ls -l ${SRC_DIR}/qemu-${QEMU_VERSION}.tar.bz2
566         - tar -xf ${SRC_DIR}/qemu-${QEMU_VERSION}.tar.bz2 && cd qemu-${QEMU_VERSION}
567         - mkdir -p release-build && cd release-build
568         - ../configure ${BASE_CONFIG} ${CONFIG} || { cat config.log && exit 1; }
569         - make install
570   allow_failures:
571     - env: UNRELIABLE=true