195310576SAlex Bennée# The current Travis default is a VM based 16.04 Xenial on GCE 295310576SAlex Bennée# Additional builds with specific requirements for a full VM need to 395310576SAlex Bennée# be added as additional matrix: entries later on 4321e6ea5SWainer dos Santos Moschettaos: linux 5e769905eSThomas Huthdist: focal 6fe863ab9SAlex Bennéelanguage: c 7fe863ab9SAlex Bennéecompiler: 8fe863ab9SAlex Bennée - gcc 94bc629b2SPhilippe Mathieu-Daudécache: 105ef9c53cSPhilippe Mathieu-Daudé # There is one cache per branch and compiler version. 115ef9c53cSPhilippe Mathieu-Daudé # characteristics of each job are used to identify the cache: 1222a23195SAlex Bennée # - OS name (currently only linux) 13e769905eSThomas Huth # - OS distribution (for Linux, bionic or focal) 145ef9c53cSPhilippe Mathieu-Daudé # - Names and values of visible environment variables set in .travis.yml or Settings panel 15731cbb64SPhilippe Mathieu-Daudé timeout: 1200 164bc629b2SPhilippe Mathieu-Daudé ccache: true 176e189d78SPhilippe Mathieu-Daudé pip: true 18c1073e44SPhilippe Mathieu-Daudé directories: 19c1073e44SPhilippe Mathieu-Daudé - $HOME/avocado/data/cache 20197be697SDaniel P. Berrangé 21197be697SDaniel P. Berrangé 22692d162cSAlex Bennéeaddons: 23692d162cSAlex Bennée apt: 24692d162cSAlex Bennée packages: 2532265288SAlex Bennée # Build dependencies 26692d162cSAlex Bennée - libaio-dev 27692d162cSAlex Bennée - libattr1-dev 28692d162cSAlex Bennée - libbrlapi-dev 29692d162cSAlex Bennée - libcap-ng-dev 30e769905eSThomas Huth - libgcc-7-dev 313c7a8b41SThomas Huth - libgnutls28-dev 32692d162cSAlex Bennée - libgtk-3-dev 33692d162cSAlex Bennée - libiscsi-dev 34692d162cSAlex Bennée - liblttng-ust-dev 35692d162cSAlex Bennée - libncurses5-dev 36d83414e1SMarc-André Lureau - libnfs-dev 37692d162cSAlex Bennée - libnss3-dev 38692d162cSAlex Bennée - libpixman-1-dev 393c7a8b41SThomas Huth - libpng-dev 40692d162cSAlex Bennée - librados-dev 41241e7955SThomas Huth - libsdl2-dev 42241e7955SThomas Huth - libsdl2-image-dev 43692d162cSAlex Bennée - libseccomp-dev 44692d162cSAlex Bennée - libspice-protocol-dev 45692d162cSAlex Bennée - libspice-server-dev 46b10d49d7SPino Toscano - libssh-dev 47692d162cSAlex Bennée - liburcu-dev 48692d162cSAlex Bennée - libusb-1.0-0-dev 497c1dd4d1SThomas Huth - libvdeplug-dev 5095310576SAlex Bennée - libvte-2.91-dev 513a678481SJuan Quintela - libzstd-dev 52345d7053SPaolo Bonzini - ninja-build 53692d162cSAlex Bennée - sparse 54692d162cSAlex Bennée - uuid-dev 5558a1e5b6SWainer dos Santos Moschetta # Tests dependencies 5658a1e5b6SWainer dos Santos Moschetta - genisoimage 57692d162cSAlex Bennée 58197be697SDaniel P. Berrangé 59cb4c2536SPranith Kumar# The channel name "irc.oftc.net#qemu" is encrypted against qemu/qemu 60cb4c2536SPranith Kumar# to prevent IRC notifications from forks. This was created using: 61cb4c2536SPranith Kumar# $ travis encrypt -r "qemu/qemu" "irc.oftc.net#qemu" 6239d16d29SAlex Bennéenotifications: 6339d16d29SAlex Bennée irc: 6439d16d29SAlex Bennée channels: 65cb4c2536SPranith Kumar - secure: "F7GDRgjuOo5IUyRLqSkmDL7kvdU4UcH3Lm/W2db2JnDHTGCqgEdaYEYKciyCLZ57vOTsTsOgesN8iUT7hNHBd1KWKjZe9KDTZWppWRYVwAwQMzVeSOsbbU4tRoJ6Pp+3qhH1Z0eGYR9ZgKYAoTumDFgSAYRp4IscKS8jkoedOqM=" 6639d16d29SAlex Bennée on_success: change 6739d16d29SAlex Bennée on_failure: always 68197be697SDaniel P. Berrangé 69197be697SDaniel P. Berrangé 70fe863ab9SAlex Bennéeenv: 71fe863ab9SAlex Bennée global: 72bc4486fbSPaolo Bonzini - SRC_DIR=".." 73bc4486fbSPaolo Bonzini - BUILD_DIR="build" 74570f3c77SAlex Bennée - BASE_CONFIG="--disable-docs --disable-tools" 754f46afd9SAlex Bennée - TEST_BUILD_CMD="" 7605273a43SAlex Bennée - TEST_CMD="make check V=1" 778c3daf97SAlex Bennée # This is broadly a list of "mainline" softmmu targets which have support across the major distros 786e988880SAlex Bennée - MAIN_SOFTMMU_TARGETS="aarch64-softmmu,mips64-softmmu,ppc64-softmmu,riscv64-softmmu,s390x-softmmu,x86_64-softmmu" 79bcfbf0d5SPhilippe Mathieu-Daudé - CCACHE_SLOPPINESS="include_file_ctime,include_file_mtime" 80bcfbf0d5SPhilippe Mathieu-Daudé - CCACHE_MAXSIZE=1G 812dbd39c2SPhilippe Mathieu-Daudé - G_MESSAGES_DEBUG=error 82bcfbf0d5SPhilippe Mathieu-Daudé 83197be697SDaniel P. Berrangé 84cb021cfeSAlex Bennéegit: 85cb021cfeSAlex Bennée # we want to do this ourselves 86cb021cfeSAlex Bennée submodules: false 87197be697SDaniel P. Berrangé 88b3165c87SAlex Bennée# Common first phase for all steps 89b3165c87SAlex Bennéebefore_install: 90312995c2SThomas Huth - if command -v ccache ; then ccache --zero-stats ; fi 910a7c0ae0SAlex Bennée - export JOBS=$(($(getconf _NPROCESSORS_ONLN) + 1)) 920a7c0ae0SAlex Bennée - echo "=== Using ${JOBS} simultaneous jobs ===" 93b3165c87SAlex Bennée 94b3165c87SAlex Bennée# Configure step - may be overridden 95b3165c87SAlex Bennéebefore_script: 96ebf2ff65SPhilippe Mathieu-Daudé - mkdir -p ${BUILD_DIR} && cd ${BUILD_DIR} 97c47110d9SPaolo Bonzini - ${SRC_DIR}/configure ${BASE_CONFIG} ${CONFIG} || { cat config.log meson-logs/meson-log.txt && exit 1; } 98b3165c87SAlex Bennée 99b3165c87SAlex Bennée# Main build & test - rarely overridden - controlled by TEST_CMD 100eebf2940SAlex Bennéescript: 1010a7c0ae0SAlex Bennée - BUILD_RC=0 && make -j${JOBS} || BUILD_RC=$? 1024f46afd9SAlex Bennée - | 1034f46afd9SAlex Bennée if [ "$BUILD_RC" -eq 0 ] && [ -n "$TEST_BUILD_CMD" ]; then 1044f46afd9SAlex Bennée ${TEST_BUILD_CMD} || BUILD_RC=$? 1054f46afd9SAlex Bennée else 1064f46afd9SAlex Bennée $(exit $BUILD_RC); 1074f46afd9SAlex Bennée fi 108ec49faacSAlex Bennée - | 109ec49faacSAlex Bennée if [ "$BUILD_RC" -eq 0 ] ; then 110ec49faacSAlex Bennée ${TEST_CMD} ; 111ec49faacSAlex Bennée else 112ec49faacSAlex Bennée $(exit $BUILD_RC); 113ec49faacSAlex Bennée fi 114bcfbf0d5SPhilippe Mathieu-Daudéafter_script: 1154f8bde52SAlex Bennée - df -h 116312995c2SThomas Huth - if command -v ccache ; then ccache --show-stats ; fi 117197be697SDaniel P. Berrangé 118197be697SDaniel P. Berrangé 119321e6ea5SWainer dos Santos Moschettajobs: 120fe863ab9SAlex Bennée include: 1213e094234SDaniel P. Berrangé 122097aebd8SPhilippe Mathieu-Daudé - name: "[aarch64] GCC check-tcg" 123097aebd8SPhilippe Mathieu-Daudé arch: arm64 124e769905eSThomas Huth dist: focal 1259c5941a9SThomas Huth addons: 1269c5941a9SThomas Huth apt_packages: 1279c5941a9SThomas Huth - libaio-dev 1289c5941a9SThomas Huth - libattr1-dev 1299c5941a9SThomas Huth - libbrlapi-dev 1309c5941a9SThomas Huth - libcap-ng-dev 1319c5941a9SThomas Huth - libgcrypt20-dev 1329c5941a9SThomas Huth - libgnutls28-dev 1339c5941a9SThomas Huth - libgtk-3-dev 1349c5941a9SThomas Huth - libiscsi-dev 1359c5941a9SThomas Huth - liblttng-ust-dev 1369c5941a9SThomas Huth - libncurses5-dev 1379c5941a9SThomas Huth - libnfs-dev 1389c5941a9SThomas Huth - libnss3-dev 1399c5941a9SThomas Huth - libpixman-1-dev 1409c5941a9SThomas Huth - libpng-dev 1419c5941a9SThomas Huth - librados-dev 1429c5941a9SThomas Huth - libsdl2-dev 1439c5941a9SThomas Huth - libseccomp-dev 1449c5941a9SThomas Huth - liburcu-dev 1459c5941a9SThomas Huth - libusb-1.0-0-dev 1469c5941a9SThomas Huth - libvdeplug-dev 1479c5941a9SThomas Huth - libvte-2.91-dev 148345d7053SPaolo Bonzini - ninja-build 14958a1e5b6SWainer dos Santos Moschetta # Tests dependencies 15058a1e5b6SWainer dos Santos Moschetta - genisoimage 1519c5941a9SThomas Huth env: 1529c5941a9SThomas Huth - TEST_CMD="make check check-tcg V=1" 153*aa2ea7adSPhilippe Mathieu-Daudé - CONFIG="--disable-containers --target-list=${MAIN_SOFTMMU_TARGETS} --cxx=/bin/false" 1541de8e4c4SAlex Bennée - UNRELIABLE=true 1559c5941a9SThomas Huth 156097aebd8SPhilippe Mathieu-Daudé - name: "[ppc64] GCC check-tcg" 157097aebd8SPhilippe Mathieu-Daudé arch: ppc64le 158e769905eSThomas Huth dist: focal 1599c5941a9SThomas Huth addons: 1609c5941a9SThomas Huth apt_packages: 1619c5941a9SThomas Huth - libaio-dev 1629c5941a9SThomas Huth - libattr1-dev 1639c5941a9SThomas Huth - libbrlapi-dev 1649c5941a9SThomas Huth - libcap-ng-dev 1659c5941a9SThomas Huth - libgcrypt20-dev 1669c5941a9SThomas Huth - libgnutls28-dev 1679c5941a9SThomas Huth - libgtk-3-dev 1689c5941a9SThomas Huth - libiscsi-dev 1699c5941a9SThomas Huth - liblttng-ust-dev 1709c5941a9SThomas Huth - libncurses5-dev 1719c5941a9SThomas Huth - libnfs-dev 1729c5941a9SThomas Huth - libnss3-dev 1739c5941a9SThomas Huth - libpixman-1-dev 1749c5941a9SThomas Huth - libpng-dev 1759c5941a9SThomas Huth - librados-dev 1769c5941a9SThomas Huth - libsdl2-dev 1779c5941a9SThomas Huth - libseccomp-dev 1789c5941a9SThomas Huth - liburcu-dev 1799c5941a9SThomas Huth - libusb-1.0-0-dev 1809c5941a9SThomas Huth - libvdeplug-dev 1819c5941a9SThomas Huth - libvte-2.91-dev 182345d7053SPaolo Bonzini - ninja-build 18358a1e5b6SWainer dos Santos Moschetta # Tests dependencies 18458a1e5b6SWainer dos Santos Moschetta - genisoimage 1859c5941a9SThomas Huth env: 1869c5941a9SThomas Huth - TEST_CMD="make check check-tcg V=1" 187daee97f6SAlex Bennée - CONFIG="--disable-containers --target-list=ppc64-softmmu,ppc64le-linux-user" 1889c5941a9SThomas Huth 189097aebd8SPhilippe Mathieu-Daudé - name: "[s390x] GCC check-tcg" 190097aebd8SPhilippe Mathieu-Daudé arch: s390x 1919c5941a9SThomas Huth dist: bionic 1929c5941a9SThomas Huth addons: 1939c5941a9SThomas Huth apt_packages: 1949c5941a9SThomas Huth - libaio-dev 1959c5941a9SThomas Huth - libattr1-dev 1969c5941a9SThomas Huth - libbrlapi-dev 1979c5941a9SThomas Huth - libcap-ng-dev 1989c5941a9SThomas Huth - libgcrypt20-dev 1999c5941a9SThomas Huth - libgnutls28-dev 2009c5941a9SThomas Huth - libgtk-3-dev 2019c5941a9SThomas Huth - libiscsi-dev 2029c5941a9SThomas Huth - liblttng-ust-dev 2039c5941a9SThomas Huth - libncurses5-dev 2049c5941a9SThomas Huth - libnfs-dev 2059c5941a9SThomas Huth - libnss3-dev 2069c5941a9SThomas Huth - libpixman-1-dev 2079c5941a9SThomas Huth - libpng-dev 2089c5941a9SThomas Huth - librados-dev 2099c5941a9SThomas Huth - libsdl2-dev 2109c5941a9SThomas Huth - libseccomp-dev 2119c5941a9SThomas Huth - liburcu-dev 2129c5941a9SThomas Huth - libusb-1.0-0-dev 2139c5941a9SThomas Huth - libvdeplug-dev 2149c5941a9SThomas Huth - libvte-2.91-dev 215345d7053SPaolo Bonzini - ninja-build 21658a1e5b6SWainer dos Santos Moschetta # Tests dependencies 21758a1e5b6SWainer dos Santos Moschetta - genisoimage 2189c5941a9SThomas Huth env: 2199c5941a9SThomas Huth - TEST_CMD="make check check-tcg V=1" 2209c5941a9SThomas Huth - CONFIG="--disable-containers --target-list=${MAIN_SOFTMMU_TARGETS},s390x-linux-user" 2211de8e4c4SAlex Bennée - UNRELIABLE=true 22231c8cc4fSThomas Huth script: 22331c8cc4fSThomas Huth - BUILD_RC=0 && make -j${JOBS} || BUILD_RC=$? 22431c8cc4fSThomas Huth - | 22531c8cc4fSThomas Huth if [ "$BUILD_RC" -eq 0 ] ; then 22631c8cc4fSThomas Huth mv pc-bios/s390-ccw/*.img pc-bios/ ; 22731c8cc4fSThomas Huth ${TEST_CMD} ; 22831c8cc4fSThomas Huth else 22931c8cc4fSThomas Huth $(exit $BUILD_RC); 23031c8cc4fSThomas Huth fi 23161ac3dccSPhilippe Mathieu-Daudé 232100a5efbSThomas Huth - name: "[s390x] GCC (other-softmmu)" 233100a5efbSThomas Huth arch: s390x 234100a5efbSThomas Huth dist: bionic 235100a5efbSThomas Huth addons: 236100a5efbSThomas Huth apt_packages: 237100a5efbSThomas Huth - libaio-dev 238100a5efbSThomas Huth - libattr1-dev 239100a5efbSThomas Huth - libcap-ng-dev 240100a5efbSThomas Huth - libgnutls28-dev 241100a5efbSThomas Huth - libiscsi-dev 242100a5efbSThomas Huth - liblttng-ust-dev 243100a5efbSThomas Huth - liblzo2-dev 244100a5efbSThomas Huth - libncurses-dev 245100a5efbSThomas Huth - libnfs-dev 246100a5efbSThomas Huth - libnss3-dev 247100a5efbSThomas Huth - libpixman-1-dev 248100a5efbSThomas Huth - libsdl2-dev 249100a5efbSThomas Huth - libsdl2-image-dev 250100a5efbSThomas Huth - libseccomp-dev 251100a5efbSThomas Huth - libsnappy-dev 252100a5efbSThomas Huth - libzstd-dev 253100a5efbSThomas Huth - nettle-dev 254100a5efbSThomas Huth - xfslibs-dev 255345d7053SPaolo Bonzini - ninja-build 256100a5efbSThomas Huth # Tests dependencies 257100a5efbSThomas Huth - genisoimage 258100a5efbSThomas Huth env: 259100a5efbSThomas Huth - CONFIG="--disable-containers --audio-drv-list=sdl --disable-user 260100a5efbSThomas Huth --target-list-exclude=${MAIN_SOFTMMU_TARGETS}" 261100a5efbSThomas Huth 262100a5efbSThomas Huth - name: "[s390x] GCC (user)" 263100a5efbSThomas Huth arch: s390x 264100a5efbSThomas Huth dist: bionic 265100a5efbSThomas Huth addons: 266100a5efbSThomas Huth apt_packages: 267100a5efbSThomas Huth - libgcrypt20-dev 268100a5efbSThomas Huth - libgnutls28-dev 269345d7053SPaolo Bonzini - ninja-build 270100a5efbSThomas Huth env: 271100a5efbSThomas Huth - CONFIG="--disable-containers --disable-system" 272100a5efbSThomas Huth 273aae8b87eSThomas Huth - name: "[s390x] Clang (disable-tcg)" 27441e1f0e2SPhilippe Mathieu-Daudé arch: s390x 27541e1f0e2SPhilippe Mathieu-Daudé dist: bionic 276aae8b87eSThomas Huth compiler: clang 27741e1f0e2SPhilippe Mathieu-Daudé addons: 27841e1f0e2SPhilippe Mathieu-Daudé apt_packages: 27941e1f0e2SPhilippe Mathieu-Daudé - libaio-dev 28041e1f0e2SPhilippe Mathieu-Daudé - libattr1-dev 28141e1f0e2SPhilippe Mathieu-Daudé - libbrlapi-dev 28241e1f0e2SPhilippe Mathieu-Daudé - libcap-ng-dev 28341e1f0e2SPhilippe Mathieu-Daudé - libgcrypt20-dev 28441e1f0e2SPhilippe Mathieu-Daudé - libgnutls28-dev 28541e1f0e2SPhilippe Mathieu-Daudé - libgtk-3-dev 28641e1f0e2SPhilippe Mathieu-Daudé - libiscsi-dev 28741e1f0e2SPhilippe Mathieu-Daudé - liblttng-ust-dev 28841e1f0e2SPhilippe Mathieu-Daudé - libncurses5-dev 28941e1f0e2SPhilippe Mathieu-Daudé - libnfs-dev 29041e1f0e2SPhilippe Mathieu-Daudé - libnss3-dev 29141e1f0e2SPhilippe Mathieu-Daudé - libpixman-1-dev 29241e1f0e2SPhilippe Mathieu-Daudé - libpng-dev 29341e1f0e2SPhilippe Mathieu-Daudé - librados-dev 29441e1f0e2SPhilippe Mathieu-Daudé - libsdl2-dev 29541e1f0e2SPhilippe Mathieu-Daudé - libseccomp-dev 29641e1f0e2SPhilippe Mathieu-Daudé - liburcu-dev 29741e1f0e2SPhilippe Mathieu-Daudé - libusb-1.0-0-dev 29841e1f0e2SPhilippe Mathieu-Daudé - libvdeplug-dev 29941e1f0e2SPhilippe Mathieu-Daudé - libvte-2.91-dev 300345d7053SPaolo Bonzini - ninja-build 30141e1f0e2SPhilippe Mathieu-Daudé env: 30241e1f0e2SPhilippe Mathieu-Daudé - TEST_CMD="make check-unit" 303aae8b87eSThomas Huth - CONFIG="--disable-containers --disable-tcg --enable-kvm 304aae8b87eSThomas Huth --disable-tools --host-cc=clang --cxx=clang++" 3051de8e4c4SAlex Bennée - UNRELIABLE=true 30641e1f0e2SPhilippe Mathieu-Daudé 30761ac3dccSPhilippe Mathieu-Daudé # Release builds 30861ac3dccSPhilippe Mathieu-Daudé # The make-release script expect a QEMU version, so our tag must start with a 'v'. 30961ac3dccSPhilippe Mathieu-Daudé # This is the case when release candidate tags are created. 310097aebd8SPhilippe Mathieu-Daudé - name: "Release tarball" 311097aebd8SPhilippe Mathieu-Daudé if: tag IS present AND tag =~ /^v\d+\.\d+(\.\d+)?(-\S*)?$/ 31261ac3dccSPhilippe Mathieu-Daudé env: 31361ac3dccSPhilippe Mathieu-Daudé # We want to build from the release tarball 31461ac3dccSPhilippe Mathieu-Daudé - BUILD_DIR="release/build/dir" SRC_DIR="../../.." 31561ac3dccSPhilippe Mathieu-Daudé - BASE_CONFIG="--prefix=$PWD/dist" 31661ac3dccSPhilippe Mathieu-Daudé - CONFIG="--target-list=x86_64-softmmu,aarch64-softmmu,armeb-linux-user,ppc-linux-user" 3170a7c0ae0SAlex Bennée - TEST_CMD="make install -j${JOBS}" 31861ac3dccSPhilippe Mathieu-Daudé - QEMU_VERSION="${TRAVIS_TAG:1}" 31961ac3dccSPhilippe Mathieu-Daudé - CACHE_NAME="${TRAVIS_BRANCH}-linux-gcc-default" 32061ac3dccSPhilippe Mathieu-Daudé script: 32161ac3dccSPhilippe Mathieu-Daudé - make -C ${SRC_DIR} qemu-${QEMU_VERSION}.tar.bz2 32261ac3dccSPhilippe Mathieu-Daudé - ls -l ${SRC_DIR}/qemu-${QEMU_VERSION}.tar.bz2 32361ac3dccSPhilippe Mathieu-Daudé - tar -xf ${SRC_DIR}/qemu-${QEMU_VERSION}.tar.bz2 && cd qemu-${QEMU_VERSION} 324bc4486fbSPaolo Bonzini - mkdir -p release-build && cd release-build 325c47110d9SPaolo Bonzini - ../configure ${BASE_CONFIG} ${CONFIG} || { cat config.log meson-logs/meson-log.txt && exit 1; } 32661ac3dccSPhilippe Mathieu-Daudé - make install 3271de8e4c4SAlex Bennée allow_failures: 3281de8e4c4SAlex Bennée - env: UNRELIABLE=true 329