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 4os: linux 5dist: focal 6language: c 7compiler: 8 - gcc 9cache: 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, bionic or focal) 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 22addons: 23 apt: 24 packages: 25 # Build dependencies 26 - libaio-dev 27 - libattr1-dev 28 - libbrlapi-dev 29 - libcap-ng-dev 30 - libgcc-7-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 - ninja-build 53 - sparse 54 - uuid-dev 55 - gcovr 56 # Tests dependencies 57 - genisoimage 58 59 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" 63notifications: 64 irc: 65 channels: 66 - secure: "F7GDRgjuOo5IUyRLqSkmDL7kvdU4UcH3Lm/W2db2JnDHTGCqgEdaYEYKciyCLZ57vOTsTsOgesN8iUT7hNHBd1KWKjZe9KDTZWppWRYVwAwQMzVeSOsbbU4tRoJ6Pp+3qhH1Z0eGYR9ZgKYAoTumDFgSAYRp4IscKS8jkoedOqM=" 67 on_success: change 68 on_failure: always 69 70 71env: 72 global: 73 - SRC_DIR=".." 74 - BUILD_DIR="build" 75 - BASE_CONFIG="--disable-docs --disable-tools" 76 - TEST_BUILD_CMD="" 77 - TEST_CMD="make check V=1" 78 # This is broadly a list of "mainline" softmmu targets which have support across the major distros 79 - MAIN_SOFTMMU_TARGETS="aarch64-softmmu,mips64-softmmu,ppc64-softmmu,riscv64-softmmu,s390x-softmmu,x86_64-softmmu" 80 - CCACHE_SLOPPINESS="include_file_ctime,include_file_mtime" 81 - CCACHE_MAXSIZE=1G 82 - G_MESSAGES_DEBUG=error 83 84 85git: 86 # we want to do this ourselves 87 submodules: false 88 89# Common first phase for all steps 90before_install: 91 - if command -v ccache ; then ccache --zero-stats ; fi 92 - export JOBS=$(($(getconf _NPROCESSORS_ONLN) + 1)) 93 - echo "=== Using ${JOBS} simultaneous jobs ===" 94 95# Configure step - may be overridden 96before_script: 97 - mkdir -p ${BUILD_DIR} && cd ${BUILD_DIR} 98 - ${SRC_DIR}/configure ${BASE_CONFIG} ${CONFIG} || { cat config.log meson-logs/meson-log.txt && exit 1; } 99 100# Main build & test - rarely overridden - controlled by TEST_CMD 101script: 102 - BUILD_RC=0 && make -j${JOBS} || BUILD_RC=$? 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 109 - | 110 if [ "$BUILD_RC" -eq 0 ] ; then 111 ${TEST_CMD} ; 112 else 113 $(exit $BUILD_RC); 114 fi 115after_script: 116 - df -h 117 - if command -v ccache ; then ccache --show-stats ; fi 118 119 120jobs: 121 include: 122 # Just build tools and run minimal unit and softfloat checks 123 - name: "GCC check-unit and check-softfloat" 124 env: 125 - BASE_CONFIG="--enable-tools" 126 - CONFIG="--disable-user --disable-system" 127 - TEST_CMD="make check-unit check-softfloat -j${JOBS}" 128 - CACHE_NAME="${TRAVIS_BRANCH}-linux-gcc-default" 129 130 131 # --enable-debug implies --enable-debug-tcg, also runs quite a bit slower 132 - name: "GCC debug (main-softmmu)" 133 env: 134 - CONFIG="--enable-debug --target-list=${MAIN_SOFTMMU_TARGETS}" 135 - CACHE_NAME="${TRAVIS_BRANCH}-linux-gcc-debug" 136 137 138 # TCG debug can be run just on its own and is mostly agnostic to user/softmmu distinctions 139 - name: "GCC debug (user)" 140 env: 141 - CONFIG="--enable-debug-tcg --disable-system" 142 - CACHE_NAME="${TRAVIS_BRANCH}-linux-gcc-debug-tcg" 143 144 # Module builds are mostly of interest to major distros 145 - name: "GCC modules (main-softmmu)" 146 env: 147 - CONFIG="--enable-modules --target-list=${MAIN_SOFTMMU_TARGETS}" 148 - CACHE_NAME="${TRAVIS_BRANCH}-linux-gcc-default" 149 150 151 # Check we can build docs and tools (out of tree) 152 - name: "tools and docs (bionic)" 153 dist: bionic 154 env: 155 - BUILD_DIR="out-of-tree/build/dir" SRC_DIR="../../.." 156 - BASE_CONFIG="--enable-tools --enable-docs" 157 - CONFIG="--target-list=x86_64-softmmu,aarch64-linux-user" 158 - CACHE_NAME="${TRAVIS_BRANCH}-linux-gcc-default" 159 addons: 160 apt: 161 packages: 162 - ninja-build 163 - python3-sphinx 164 - perl 165 166 167 # Test with Clang for compile portability (Travis uses clang-5.0) 168 - name: "Clang (user)" 169 env: 170 - CONFIG="--disable-system --host-cc=clang --cxx=clang++" 171 - CACHE_NAME="${TRAVIS_BRANCH}-linux-clang-default" 172 compiler: clang 173 174 175 - name: "Clang (main-softmmu)" 176 env: 177 - CONFIG="--target-list=${MAIN_SOFTMMU_TARGETS} 178 --host-cc=clang --cxx=clang++" 179 - CACHE_NAME="${TRAVIS_BRANCH}-linux-clang-sanitize" 180 compiler: clang 181 before_script: 182 - mkdir -p ${BUILD_DIR} && cd ${BUILD_DIR} 183 - ${SRC_DIR}/configure ${CONFIG} --extra-cflags="-fsanitize=undefined -Werror" || { cat config.log meson-logs/meson-log.txt && exit 1; } 184 185 186 - name: "Clang (other-softmmu)" 187 env: 188 - CONFIG="--disable-user --target-list-exclude=${MAIN_SOFTMMU_TARGETS} 189 --host-cc=clang --cxx=clang++" 190 - CACHE_NAME="${TRAVIS_BRANCH}-linux-clang-default" 191 compiler: clang 192 193 194 # gprof/gcov are GCC features 195 - name: "GCC gprof/gcov" 196 dist: bionic 197 addons: 198 apt: 199 packages: 200 - ninja-build 201 env: 202 - CONFIG="--enable-gprof --enable-gcov --disable-libssh 203 --target-list=${MAIN_SOFTMMU_TARGETS}" 204 after_success: 205 - ${SRC_DIR}/scripts/travis/coverage-summary.sh 206 207 208 # We manually include builds which we disable "make check" for 209 - name: "GCC without-default-devices (softmmu)" 210 env: 211 - CONFIG="--without-default-devices --disable-user" 212 - CACHE_NAME="${TRAVIS_BRANCH}-linux-gcc-default" 213 - TEST_CMD="" 214 215 216 # Using newer GCC with sanitizers 217 - name: "GCC9 with sanitizers (softmmu)" 218 dist: bionic 219 addons: 220 apt: 221 update: true 222 sources: 223 # PPAs for newer toolchains 224 - ubuntu-toolchain-r-test 225 packages: 226 # Extra toolchains 227 - gcc-9 228 - g++-9 229 # Build dependencies 230 - libaio-dev 231 - libattr1-dev 232 - libbrlapi-dev 233 - libcap-ng-dev 234 - libgnutls28-dev 235 - libgtk-3-dev 236 - libiscsi-dev 237 - liblttng-ust-dev 238 - libnfs-dev 239 - libncurses5-dev 240 - libnss3-dev 241 - libpixman-1-dev 242 - libpng-dev 243 - librados-dev 244 - libsdl2-dev 245 - libsdl2-image-dev 246 - libseccomp-dev 247 - libspice-protocol-dev 248 - libspice-server-dev 249 - liburcu-dev 250 - libusb-1.0-0-dev 251 - libvte-2.91-dev 252 - ninja-build 253 - sparse 254 - uuid-dev 255 language: generic 256 compiler: none 257 env: 258 - COMPILER_NAME=gcc CXX=g++-9 CC=gcc-9 259 - CONFIG="--cc=gcc-9 --cxx=g++-9 --disable-linux-user" 260 - TEST_CMD="" 261 before_script: 262 - mkdir -p ${BUILD_DIR} && cd ${BUILD_DIR} 263 - ${SRC_DIR}/configure ${CONFIG} --extra-cflags="-g3 -O0 -fsanitize=thread" || { cat config.log meson-logs/meson-log.txt && exit 1; } 264 265 266 - name: "[aarch64] GCC check-tcg" 267 arch: arm64 268 dist: focal 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 292 - ninja-build 293 # Tests dependencies 294 - genisoimage 295 env: 296 - TEST_CMD="make check check-tcg V=1" 297 - CONFIG="--disable-containers --target-list=${MAIN_SOFTMMU_TARGETS}" 298 - UNRELIABLE=true 299 300 - name: "[ppc64] GCC check-tcg" 301 arch: ppc64le 302 dist: focal 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 326 - ninja-build 327 # Tests dependencies 328 - genisoimage 329 env: 330 - TEST_CMD="make check check-tcg V=1" 331 - CONFIG="--disable-containers --target-list=ppc64-softmmu,ppc64le-linux-user" 332 333 - name: "[s390x] GCC check-tcg" 334 arch: s390x 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 359 - ninja-build 360 # Tests dependencies 361 - genisoimage 362 env: 363 - TEST_CMD="make check check-tcg V=1" 364 - CONFIG="--disable-containers --target-list=${MAIN_SOFTMMU_TARGETS},s390x-linux-user" 365 - UNRELIABLE=true 366 script: 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 375 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 399 - ninja-build 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 413 - ninja-build 414 env: 415 - CONFIG="--disable-containers --disable-system" 416 417 - name: "[s390x] Clang (disable-tcg)" 418 arch: s390x 419 dist: bionic 420 compiler: clang 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 444 - ninja-build 445 env: 446 - TEST_CMD="make check-unit" 447 - CONFIG="--disable-containers --disable-tcg --enable-kvm 448 --disable-tools --host-cc=clang --cxx=clang++" 449 - UNRELIABLE=true 450 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. 454 - name: "Release tarball" 455 if: tag IS present AND tag =~ /^v\d+\.\d+(\.\d+)?(-\S*)?$/ 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" 461 - TEST_CMD="make install -j${JOBS}" 462 - QEMU_VERSION="${TRAVIS_TAG:1}" 463 - CACHE_NAME="${TRAVIS_BRANCH}-linux-gcc-default" 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} 468 - mkdir -p release-build && cd release-build 469 - ../configure ${BASE_CONFIG} ${CONFIG} || { cat config.log meson-logs/meson-log.txt && exit 1; } 470 - make install 471 allow_failures: 472 - env: UNRELIABLE=true 473