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