xref: /openbmc/qemu/.travis.yml (revision aae8b87e)
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
595310576SAlex Bennéedist: xenial
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)
135ef9c53cSPhilippe Mathieu-Daudé  # - OS distribution (for Linux, xenial, trusty, or precise)
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
307524a39dSPhilippe Mathieu-Daudé      - libgcc-4.8-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
52692d162cSAlex Bennée      - sparse
53692d162cSAlex Bennée      - uuid-dev
540708e647SAlex Bennée      - gcovr
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}
97570f3c77SAlex Bennée  - ${SRC_DIR}/configure ${BASE_CONFIG} ${CONFIG} || { cat config.log && 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:
121097aebd8SPhilippe Mathieu-Daudé    - name: "GCC static (user)"
122097aebd8SPhilippe Mathieu-Daudé      env:
123c3c1874aSAlex Bennée        - CONFIG="--disable-system --static"
1247d183c54SPhilippe Mathieu-Daudé        - CACHE_NAME="${TRAVIS_BRANCH}-linux-gcc-default"
1253e094234SDaniel P. Berrangé
1263e094234SDaniel P. Berrangé
1278c3daf97SAlex Bennée    # we split the system builds as it takes a while to build them all
128097aebd8SPhilippe Mathieu-Daudé    - name: "GCC (main-softmmu)"
129097aebd8SPhilippe Mathieu-Daudé      env:
1308c3daf97SAlex Bennée        - CONFIG="--disable-user --target-list=${MAIN_SOFTMMU_TARGETS}"
1317d183c54SPhilippe Mathieu-Daudé        - CACHE_NAME="${TRAVIS_BRANCH}-linux-gcc-default"
1328c3daf97SAlex Bennée
1338c3daf97SAlex Bennée
134097aebd8SPhilippe Mathieu-Daudé    - name: "GCC (other-softmmu)"
135097aebd8SPhilippe Mathieu-Daudé      env:
1368c3daf97SAlex Bennée       - CONFIG="--disable-user --target-list-exclude=${MAIN_SOFTMMU_TARGETS}"
1377d183c54SPhilippe Mathieu-Daudé        - CACHE_NAME="${TRAVIS_BRANCH}-linux-gcc-default"
1383e094234SDaniel P. Berrangé
1393e094234SDaniel P. Berrangé
140df2bb38eSAlex Bennée    # Just build tools and run minimal unit and softfloat checks
141097aebd8SPhilippe Mathieu-Daudé    - name: "GCC check-softfloat (user)"
142097aebd8SPhilippe Mathieu-Daudé      env:
143df2bb38eSAlex Bennée        - BASE_CONFIG="--enable-tools"
144df2bb38eSAlex Bennée        - CONFIG="--disable-user --disable-system"
1450a7c0ae0SAlex Bennée        - TEST_CMD="make check-unit check-softfloat -j${JOBS}"
1467d183c54SPhilippe Mathieu-Daudé        - CACHE_NAME="${TRAVIS_BRANCH}-linux-gcc-default"
1477d183c54SPhilippe Mathieu-Daudé
148df2bb38eSAlex Bennée
149138382c6SAlex Bennée    # --enable-debug implies --enable-debug-tcg, also runs quite a bit slower
150097aebd8SPhilippe Mathieu-Daudé    - name: "GCC debug (main-softmmu)"
151097aebd8SPhilippe Mathieu-Daudé      env:
152138382c6SAlex Bennée        - CONFIG="--enable-debug --target-list=${MAIN_SOFTMMU_TARGETS}"
1538fb90e3dSPhilippe Mathieu-Daudé        - CACHE_NAME="${TRAVIS_BRANCH}-linux-gcc-debug"
1544e6e7df6SAlex Bennée
1554e6e7df6SAlex Bennée
156138382c6SAlex Bennée    # TCG debug can be run just on its own and is mostly agnostic to user/softmmu distinctions
157097aebd8SPhilippe Mathieu-Daudé    - name: "GCC debug (user)"
158097aebd8SPhilippe Mathieu-Daudé      env:
1594e6e7df6SAlex Bennée        - CONFIG="--enable-debug-tcg --disable-system"
16019633df8SAlex Bennée        - CACHE_NAME="${TRAVIS_BRANCH}-linux-gcc-debug-tcg"
1613e094234SDaniel P. Berrangé
1623e094234SDaniel P. Berrangé
163097aebd8SPhilippe Mathieu-Daudé    - name: "GCC some libs disabled (main-softmmu)"
164097aebd8SPhilippe Mathieu-Daudé      env:
165aec2927dSAlex Bennée        - CONFIG="--disable-linux-aio --disable-cap-ng --disable-attr --disable-brlapi --disable-libusb --disable-replication --target-list=${MAIN_SOFTMMU_TARGETS}"
1663e094234SDaniel P. Berrangé
1673e094234SDaniel P. Berrangé
1682f6c2526SAlex Bennée    # Module builds are mostly of interest to major distros
169097aebd8SPhilippe Mathieu-Daudé    - name: "GCC modules (main-softmmu)"
170097aebd8SPhilippe Mathieu-Daudé      env:
1718c3daf97SAlex Bennée        - CONFIG="--enable-modules --target-list=${MAIN_SOFTMMU_TARGETS}"
1727d183c54SPhilippe Mathieu-Daudé        - CACHE_NAME="${TRAVIS_BRANCH}-linux-gcc-default"
1733e094234SDaniel P. Berrangé
1743e094234SDaniel P. Berrangé
175f3908ff7SAlex Bennée    # Alternate coroutines implementations are only really of interest to KVM users
176f3908ff7SAlex Bennée    # However we can't test against KVM on Travis so we can only run unit tests
177097aebd8SPhilippe Mathieu-Daudé    - name: "check-unit coroutine=ucontext"
178097aebd8SPhilippe Mathieu-Daudé      env:
179f3908ff7SAlex Bennée        - CONFIG="--with-coroutine=ucontext --disable-tcg"
1800a7c0ae0SAlex Bennée        - TEST_CMD="make check-unit -j${JOBS} V=1"
1813e094234SDaniel P. Berrangé
1823e094234SDaniel P. Berrangé
183097aebd8SPhilippe Mathieu-Daudé    - name: "check-unit coroutine=sigaltstack"
184097aebd8SPhilippe Mathieu-Daudé      env:
185f3908ff7SAlex Bennée        - CONFIG="--with-coroutine=sigaltstack --disable-tcg"
1860a7c0ae0SAlex Bennée        - TEST_CMD="make check-unit -j${JOBS} V=1"
1873e094234SDaniel P. Berrangé
1883e094234SDaniel P. Berrangé
189956d4506SAlex Bennée    # Check we can build docs and tools (out of tree)
190204b30e2SAlex Bennée    - name: "tools and docs (bionic)"
191204b30e2SAlex Bennée      dist: bionic
192097aebd8SPhilippe Mathieu-Daudé      env:
193956d4506SAlex Bennée        - BUILD_DIR="out-of-tree/build/dir" SRC_DIR="../../.."
194570f3c77SAlex Bennée        - BASE_CONFIG="--enable-tools --enable-docs"
195570f3c77SAlex Bennée        - CONFIG="--target-list=x86_64-softmmu,aarch64-linux-user"
1967d183c54SPhilippe Mathieu-Daudé        - CACHE_NAME="${TRAVIS_BRANCH}-linux-gcc-default"
197570f3c77SAlex Bennée      addons:
198570f3c77SAlex Bennée        apt:
199570f3c77SAlex Bennée          packages:
20068e5b85eSAlex Bennée            - python3-sphinx
201570f3c77SAlex Bennée            - texinfo
202570f3c77SAlex Bennée            - perl
203570f3c77SAlex Bennée
204197be697SDaniel P. Berrangé
205ae6d692dSAlex Bennée    # Test with Clang for compile portability (Travis uses clang-5.0)
206097aebd8SPhilippe Mathieu-Daudé    - name: "Clang (user)"
207097aebd8SPhilippe Mathieu-Daudé      env:
208c21d7efcSDaniel P. Berrangé        - CONFIG="--disable-system"
209e2bef011SPhilippe Mathieu-Daudé        - CACHE_NAME="${TRAVIS_BRANCH}-linux-clang-default"
210ae6d692dSAlex Bennée      compiler: clang
211197be697SDaniel P. Berrangé
212197be697SDaniel P. Berrangé
213097aebd8SPhilippe Mathieu-Daudé    - name: "Clang (main-softmmu)"
214097aebd8SPhilippe Mathieu-Daudé      env:
2157831147eSAlex Bennée        - CONFIG="--target-list=${MAIN_SOFTMMU_TARGETS} "
216b08c2ae3SAlex Bennée        - CACHE_NAME="${TRAVIS_BRANCH}-linux-clang-sanitize"
2177831147eSAlex Bennée      compiler: clang
2187831147eSAlex Bennée      before_script:
219bc4486fbSPaolo Bonzini        - mkdir -p ${BUILD_DIR} && cd ${BUILD_DIR}
220bc4486fbSPaolo Bonzini        - ${SRC_DIR}/configure ${CONFIG} --extra-cflags="-fsanitize=undefined -Werror" || { cat config.log && exit 1; }
2217831147eSAlex Bennée
2227831147eSAlex Bennée
223097aebd8SPhilippe Mathieu-Daudé    - name: "Clang (other-softmmu)"
224097aebd8SPhilippe Mathieu-Daudé      env:
2258c3daf97SAlex Bennée        - CONFIG="--disable-user --target-list-exclude=${MAIN_SOFTMMU_TARGETS}"
226e2bef011SPhilippe Mathieu-Daudé        - CACHE_NAME="${TRAVIS_BRANCH}-linux-clang-default"
227d9a6b013SDaniel P. Berrange      compiler: clang
228197be697SDaniel P. Berrangé
229197be697SDaniel P. Berrangé
2306c933291SAlex Bennée    # gprof/gcov are GCC features
231097aebd8SPhilippe Mathieu-Daudé    - name: "GCC gprof/gcov"
232097aebd8SPhilippe Mathieu-Daudé      env:
2338c3daf97SAlex Bennée        - CONFIG="--enable-gprof --enable-gcov --disable-pie --target-list=${MAIN_SOFTMMU_TARGETS}"
2340708e647SAlex Bennée      after_success:
2350708e647SAlex Bennée        - ${SRC_DIR}/scripts/travis/coverage-summary.sh
236197be697SDaniel P. Berrangé
237197be697SDaniel P. Berrangé
2386c933291SAlex Bennée    # We manually include builds which we disable "make check" for
239097aebd8SPhilippe Mathieu-Daudé    - name: "GCC without-default-devices (softmmu)"
240097aebd8SPhilippe Mathieu-Daudé      env:
241386dc514SAlex Bennée        - CONFIG="--without-default-devices --disable-user"
2427d183c54SPhilippe Mathieu-Daudé        - CACHE_NAME="${TRAVIS_BRANCH}-linux-gcc-default"
24320885b5bSPaolo Bonzini        - TEST_CMD=""
24420885b5bSPaolo Bonzini
24520885b5bSPaolo Bonzini
2463edaa995SThomas Huth    # Check the TCG interpreter (TCI)
247097aebd8SPhilippe Mathieu-Daudé    - name: "GCC TCI"
248097aebd8SPhilippe Mathieu-Daudé      env:
2493edaa995SThomas Huth        - CONFIG="--enable-debug-tcg --enable-tcg-interpreter --disable-kvm --disable-containers
2503edaa995SThomas Huth            --target-list=alpha-softmmu,arm-softmmu,hppa-softmmu,m68k-softmmu,microblaze-softmmu,moxie-softmmu,ppc-softmmu,s390x-softmmu,x86_64-softmmu"
2513edaa995SThomas Huth        - TEST_CMD="make check-qtest check-tcg V=1"
252197be697SDaniel P. Berrangé
253197be697SDaniel P. Berrangé
254f8309de9SAlex Bennée    # We don't need to exercise every backend with every front-end
255097aebd8SPhilippe Mathieu-Daudé    - name: "GCC trace log,simple,syslog (user)"
256097aebd8SPhilippe Mathieu-Daudé      env:
257c21d7efcSDaniel P. Berrangé        - CONFIG="--enable-trace-backends=log,simple,syslog --disable-system"
258c21d7efcSDaniel P. Berrangé        - TEST_CMD=""
259197be697SDaniel P. Berrangé
260197be697SDaniel P. Berrangé
261097aebd8SPhilippe Mathieu-Daudé    - name: "GCC trace ftrace (x86_64-softmmu)"
262097aebd8SPhilippe Mathieu-Daudé      env:
263c21d7efcSDaniel P. Berrangé        - CONFIG="--enable-trace-backends=ftrace --target-list=x86_64-softmmu"
264c21d7efcSDaniel P. Berrangé        - TEST_CMD=""
265197be697SDaniel P. Berrangé
266197be697SDaniel P. Berrangé
267097aebd8SPhilippe Mathieu-Daudé    - name: "GCC trace ust (x86_64-softmmu)"
268097aebd8SPhilippe Mathieu-Daudé      env:
269c21d7efcSDaniel P. Berrangé        - CONFIG="--enable-trace-backends=ust --target-list=x86_64-softmmu"
270c21d7efcSDaniel P. Berrangé        - TEST_CMD=""
271197be697SDaniel P. Berrangé
272197be697SDaniel P. Berrangé
273ae6d692dSAlex Bennée    # Python builds
274097aebd8SPhilippe Mathieu-Daudé    - name: "GCC Python 3.5 (x86_64-softmmu)"
275097aebd8SPhilippe Mathieu-Daudé      env:
276c21d7efcSDaniel P. Berrangé        - CONFIG="--target-list=x86_64-softmmu"
2777d183c54SPhilippe Mathieu-Daudé        - CACHE_NAME="${TRAVIS_BRANCH}-linux-gcc-default"
27853fefde4SCleber Rosa      language: python
279321e6ea5SWainer dos Santos Moschetta      python: 3.5
280197be697SDaniel P. Berrangé
281197be697SDaniel P. Berrangé
282097aebd8SPhilippe Mathieu-Daudé    - name: "GCC Python 3.6 (x86_64-softmmu)"
283097aebd8SPhilippe Mathieu-Daudé      env:
284c21d7efcSDaniel P. Berrangé        - CONFIG="--target-list=x86_64-softmmu"
2857d183c54SPhilippe Mathieu-Daudé        - CACHE_NAME="${TRAVIS_BRANCH}-linux-gcc-default"
28653fefde4SCleber Rosa      language: python
287321e6ea5SWainer dos Santos Moschetta      python: 3.6
288197be697SDaniel P. Berrangé
289197be697SDaniel P. Berrangé
290aa983ff6SCleber Rosa    # Acceptance (Functional) tests
291097aebd8SPhilippe Mathieu-Daudé    - name: "GCC check-acceptance"
292c2e09ad8SAlex Bennée      dist: bionic
293097aebd8SPhilippe Mathieu-Daudé      env:
2946fd52d67SCleber Rosa        - CONFIG="--enable-tools --target-list=aarch64-softmmu,alpha-softmmu,arm-softmmu,m68k-softmmu,microblaze-softmmu,mips-softmmu,mips64el-softmmu,nios2-softmmu,or1k-softmmu,ppc-softmmu,ppc64-softmmu,s390x-softmmu,sparc-softmmu,x86_64-softmmu,xtensa-softmmu"
2950b98c20aSEduardo Habkost        - TEST_CMD="make check-acceptance"
296a41f1675SPhilippe Mathieu-Daudé        - CACHE_NAME="${TRAVIS_BRANCH}-linux-gcc-acceptance"
29767892c95SWainer dos Santos Moschetta      after_script:
29867892c95SWainer dos Santos Moschetta        - 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
299a41f1675SPhilippe Mathieu-Daudé        - du -chs $HOME/avocado/data/cache
300aa983ff6SCleber Rosa      addons:
301aa983ff6SCleber Rosa        apt:
302aa983ff6SCleber Rosa          packages:
30325311649SPhilippe Mathieu-Daudé            - python3-pil
304aa983ff6SCleber Rosa            - python3-pip
305c2e09ad8SAlex Bennée            - python3-numpy
306c2e09ad8SAlex Bennée            - python3-opencv
307c2e09ad8SAlex Bennée            - python3-venv
3088a837088SLiam Merwick            - rpm2cpio
30925311649SPhilippe Mathieu-Daudé            - tesseract-ocr
31025311649SPhilippe Mathieu-Daudé            - tesseract-ocr-eng
31125311649SPhilippe Mathieu-Daudé
31225311649SPhilippe Mathieu-Daudé
31332265288SAlex Bennée    # Using newer GCC with sanitizers
314097aebd8SPhilippe Mathieu-Daudé    - name: "GCC9 with sanitizers (softmmu)"
315097aebd8SPhilippe Mathieu-Daudé      addons:
31632265288SAlex Bennée        apt:
317ac07ffc6SAlex Bennée          update: true
31832265288SAlex Bennée          sources:
31932265288SAlex Bennée            # PPAs for newer toolchains
32032265288SAlex Bennée            - ubuntu-toolchain-r-test
32132265288SAlex Bennée          packages:
32232265288SAlex Bennée            # Extra toolchains
3233998c25eSAlex Bennée            - gcc-9
3243998c25eSAlex Bennée            - g++-9
32532265288SAlex Bennée            # Build dependencies
32632265288SAlex Bennée            - libaio-dev
32732265288SAlex Bennée            - libattr1-dev
32832265288SAlex Bennée            - libbrlapi-dev
32932265288SAlex Bennée            - libcap-ng-dev
33032265288SAlex Bennée            - libgnutls-dev
33132265288SAlex Bennée            - libgtk-3-dev
33232265288SAlex Bennée            - libiscsi-dev
33332265288SAlex Bennée            - liblttng-ust-dev
33432265288SAlex Bennée            - libnfs-dev
33532265288SAlex Bennée            - libncurses5-dev
33632265288SAlex Bennée            - libnss3-dev
33732265288SAlex Bennée            - libpixman-1-dev
33832265288SAlex Bennée            - libpng12-dev
33932265288SAlex Bennée            - librados-dev
340241e7955SThomas Huth            - libsdl2-dev
341241e7955SThomas Huth            - libsdl2-image-dev
34232265288SAlex Bennée            - libseccomp-dev
34332265288SAlex Bennée            - libspice-protocol-dev
34432265288SAlex Bennée            - libspice-server-dev
345b10d49d7SPino Toscano            - libssh-dev
34632265288SAlex Bennée            - liburcu-dev
34732265288SAlex Bennée            - libusb-1.0-0-dev
34895310576SAlex Bennée            - libvte-2.91-dev
34932265288SAlex Bennée            - sparse
35032265288SAlex Bennée            - uuid-dev
35132265288SAlex Bennée      language: generic
35232265288SAlex Bennée      compiler: none
35332265288SAlex Bennée      env:
3543998c25eSAlex Bennée        - COMPILER_NAME=gcc CXX=g++-9 CC=gcc-9
3553998c25eSAlex Bennée        - CONFIG="--cc=gcc-9 --cxx=g++-9 --disable-pie --disable-linux-user"
35632265288SAlex Bennée        - TEST_CMD=""
35732265288SAlex Bennée      before_script:
358bc4486fbSPaolo Bonzini        - mkdir -p ${BUILD_DIR} && cd ${BUILD_DIR}
359db5adeaaSPaolo Bonzini        - ${SRC_DIR}/configure ${CONFIG} --extra-cflags="-g3 -O0 -Wno-error=stringop-truncation -fsanitize=thread" --extra-ldflags="-fuse-ld=gold" || { cat config.log && exit 1; }
360197be697SDaniel P. Berrangé
361197be697SDaniel P. Berrangé
362dab3a7c0SAlex Bennée    # Run check-tcg against linux-user
363097aebd8SPhilippe Mathieu-Daudé    - name: "GCC check-tcg (user)"
364097aebd8SPhilippe Mathieu-Daudé      env:
3652efabbe1SAlex Bennée        - CONFIG="--disable-system --enable-debug-tcg"
36673217f3eSAlex Bennée        - TEST_BUILD_CMD="make build-tcg"
3674f46afd9SAlex Bennée        - TEST_CMD="make check-tcg"
36819633df8SAlex Bennée        - CACHE_NAME="${TRAVIS_BRANCH}-linux-gcc-debug-tcg"
3697d183c54SPhilippe Mathieu-Daudé
370dab3a7c0SAlex Bennée
3714fbddb5dSAlex Bennée    # Run check-tcg against linux-user (with plugins)
3724fbddb5dSAlex Bennée    # we skip sparc64-linux-user until it has been fixed somewhat
3737986f486SAlex Bennée    # we skip cris-linux-user as it doesn't use the common run loop
374097aebd8SPhilippe Mathieu-Daudé    - name: "GCC plugins check-tcg (user)"
375097aebd8SPhilippe Mathieu-Daudé      env:
3767986f486SAlex Bennée        - CONFIG="--disable-system --enable-plugins --enable-debug-tcg --target-list-exclude=sparc64-linux-user,cris-linux-user"
37773217f3eSAlex Bennée        - TEST_BUILD_CMD="make build-tcg"
3784f46afd9SAlex Bennée        - TEST_CMD="make check-tcg"
37919633df8SAlex Bennée        - CACHE_NAME="${TRAVIS_BRANCH}-linux-gcc-debug-tcg"
380e2576f9bSDaniel P. Berrangé
381dab3a7c0SAlex Bennée
382dab3a7c0SAlex Bennée    # Run check-tcg against softmmu targets
383097aebd8SPhilippe Mathieu-Daudé    - name: "GCC check-tcg (some-softmmu)"
384097aebd8SPhilippe Mathieu-Daudé      env:
3852efabbe1SAlex Bennée        - CONFIG="--enable-debug-tcg --target-list=xtensa-softmmu,arm-softmmu,aarch64-softmmu,alpha-softmmu"
386c9331e9cSAlex Bennée        - TEST_BUILD_CMD="make build-tcg"
3874f46afd9SAlex Bennée        - TEST_CMD="make check-tcg"
38819633df8SAlex Bennée        - CACHE_NAME="${TRAVIS_BRANCH}-linux-gcc-debug-tcg"
38961ac3dccSPhilippe Mathieu-Daudé
39061ac3dccSPhilippe Mathieu-Daudé
3914fbddb5dSAlex Bennée    # Run check-tcg against softmmu targets (with plugins)
392097aebd8SPhilippe Mathieu-Daudé    - name: "GCC plugins check-tcg (some-softmmu)"
393097aebd8SPhilippe Mathieu-Daudé      env:
39419633df8SAlex Bennée        - CONFIG="--enable-plugins --enable-debug-tcg --target-list=xtensa-softmmu,arm-softmmu,aarch64-softmmu,alpha-softmmu"
395c9331e9cSAlex Bennée        - TEST_BUILD_CMD="make build-tcg"
3964f46afd9SAlex Bennée        - TEST_CMD="make check-tcg"
39719633df8SAlex Bennée        - CACHE_NAME="${TRAVIS_BRANCH}-linux-gcc-debug-tcg"
39861ac3dccSPhilippe Mathieu-Daudé
399097aebd8SPhilippe Mathieu-Daudé    - name: "[aarch64] GCC check-tcg"
400097aebd8SPhilippe Mathieu-Daudé      arch: arm64
4019c5941a9SThomas Huth      dist: xenial
4029c5941a9SThomas Huth      addons:
4039c5941a9SThomas Huth        apt_packages:
4049c5941a9SThomas Huth          - libaio-dev
4059c5941a9SThomas Huth          - libattr1-dev
4069c5941a9SThomas Huth          - libbrlapi-dev
4079c5941a9SThomas Huth          - libcap-ng-dev
4089c5941a9SThomas Huth          - libgcrypt20-dev
4099c5941a9SThomas Huth          - libgnutls28-dev
4109c5941a9SThomas Huth          - libgtk-3-dev
4119c5941a9SThomas Huth          - libiscsi-dev
4129c5941a9SThomas Huth          - liblttng-ust-dev
4139c5941a9SThomas Huth          - libncurses5-dev
4149c5941a9SThomas Huth          - libnfs-dev
4159c5941a9SThomas Huth          - libnss3-dev
4169c5941a9SThomas Huth          - libpixman-1-dev
4179c5941a9SThomas Huth          - libpng-dev
4189c5941a9SThomas Huth          - librados-dev
4199c5941a9SThomas Huth          - libsdl2-dev
4209c5941a9SThomas Huth          - libseccomp-dev
4219c5941a9SThomas Huth          - liburcu-dev
4229c5941a9SThomas Huth          - libusb-1.0-0-dev
4239c5941a9SThomas Huth          - libvdeplug-dev
4249c5941a9SThomas Huth          - libvte-2.91-dev
42558a1e5b6SWainer dos Santos Moschetta          # Tests dependencies
42658a1e5b6SWainer dos Santos Moschetta          - genisoimage
4279c5941a9SThomas Huth      env:
4289c5941a9SThomas Huth        - TEST_CMD="make check check-tcg V=1"
4299c5941a9SThomas Huth        - CONFIG="--disable-containers --target-list=${MAIN_SOFTMMU_TARGETS}"
4309c5941a9SThomas Huth
431097aebd8SPhilippe Mathieu-Daudé    - name: "[ppc64] GCC check-tcg"
432097aebd8SPhilippe Mathieu-Daudé      arch: ppc64le
4339c5941a9SThomas Huth      dist: xenial
4349c5941a9SThomas Huth      addons:
4359c5941a9SThomas Huth        apt_packages:
4369c5941a9SThomas Huth          - libaio-dev
4379c5941a9SThomas Huth          - libattr1-dev
4389c5941a9SThomas Huth          - libbrlapi-dev
4399c5941a9SThomas Huth          - libcap-ng-dev
4409c5941a9SThomas Huth          - libgcrypt20-dev
4419c5941a9SThomas Huth          - libgnutls28-dev
4429c5941a9SThomas Huth          - libgtk-3-dev
4439c5941a9SThomas Huth          - libiscsi-dev
4449c5941a9SThomas Huth          - liblttng-ust-dev
4459c5941a9SThomas Huth          - libncurses5-dev
4469c5941a9SThomas Huth          - libnfs-dev
4479c5941a9SThomas Huth          - libnss3-dev
4489c5941a9SThomas Huth          - libpixman-1-dev
4499c5941a9SThomas Huth          - libpng-dev
4509c5941a9SThomas Huth          - librados-dev
4519c5941a9SThomas Huth          - libsdl2-dev
4529c5941a9SThomas Huth          - libseccomp-dev
4539c5941a9SThomas Huth          - liburcu-dev
4549c5941a9SThomas Huth          - libusb-1.0-0-dev
4559c5941a9SThomas Huth          - libvdeplug-dev
4569c5941a9SThomas Huth          - libvte-2.91-dev
45758a1e5b6SWainer dos Santos Moschetta          # Tests dependencies
45858a1e5b6SWainer dos Santos Moschetta          - genisoimage
4599c5941a9SThomas Huth      env:
4609c5941a9SThomas Huth        - TEST_CMD="make check check-tcg V=1"
461daee97f6SAlex Bennée        - CONFIG="--disable-containers --target-list=ppc64-softmmu,ppc64le-linux-user"
4629c5941a9SThomas Huth
463097aebd8SPhilippe Mathieu-Daudé    - name: "[s390x] GCC check-tcg"
464097aebd8SPhilippe Mathieu-Daudé      arch: s390x
4659c5941a9SThomas Huth      dist: bionic
4669c5941a9SThomas Huth      addons:
4679c5941a9SThomas Huth        apt_packages:
4689c5941a9SThomas Huth          - libaio-dev
4699c5941a9SThomas Huth          - libattr1-dev
4709c5941a9SThomas Huth          - libbrlapi-dev
4719c5941a9SThomas Huth          - libcap-ng-dev
4729c5941a9SThomas Huth          - libgcrypt20-dev
4739c5941a9SThomas Huth          - libgnutls28-dev
4749c5941a9SThomas Huth          - libgtk-3-dev
4759c5941a9SThomas Huth          - libiscsi-dev
4769c5941a9SThomas Huth          - liblttng-ust-dev
4779c5941a9SThomas Huth          - libncurses5-dev
4789c5941a9SThomas Huth          - libnfs-dev
4799c5941a9SThomas Huth          - libnss3-dev
4809c5941a9SThomas Huth          - libpixman-1-dev
4819c5941a9SThomas Huth          - libpng-dev
4829c5941a9SThomas Huth          - librados-dev
4839c5941a9SThomas Huth          - libsdl2-dev
4849c5941a9SThomas Huth          - libseccomp-dev
4859c5941a9SThomas Huth          - liburcu-dev
4869c5941a9SThomas Huth          - libusb-1.0-0-dev
4879c5941a9SThomas Huth          - libvdeplug-dev
4889c5941a9SThomas Huth          - libvte-2.91-dev
48958a1e5b6SWainer dos Santos Moschetta          # Tests dependencies
49058a1e5b6SWainer dos Santos Moschetta          - genisoimage
4919c5941a9SThomas Huth      env:
4929c5941a9SThomas Huth        - TEST_CMD="make check check-tcg V=1"
4939c5941a9SThomas Huth        - CONFIG="--disable-containers --target-list=${MAIN_SOFTMMU_TARGETS},s390x-linux-user"
49431c8cc4fSThomas Huth      script:
49531c8cc4fSThomas Huth        - ( cd ${SRC_DIR} ; git submodule update --init roms/SLOF )
49631c8cc4fSThomas Huth        - BUILD_RC=0 && make -j${JOBS} || BUILD_RC=$?
49731c8cc4fSThomas Huth        - |
49831c8cc4fSThomas Huth          if [ "$BUILD_RC" -eq 0 ] ; then
49931c8cc4fSThomas Huth              mv pc-bios/s390-ccw/*.img pc-bios/ ;
50031c8cc4fSThomas Huth              ${TEST_CMD} ;
50131c8cc4fSThomas Huth          else
50231c8cc4fSThomas Huth              $(exit $BUILD_RC);
50331c8cc4fSThomas Huth          fi
50461ac3dccSPhilippe Mathieu-Daudé
505*aae8b87eSThomas Huth    - name: "[s390x] Clang (disable-tcg)"
50641e1f0e2SPhilippe Mathieu-Daudé      arch: s390x
50741e1f0e2SPhilippe Mathieu-Daudé      dist: bionic
508*aae8b87eSThomas Huth      compiler: clang
50941e1f0e2SPhilippe Mathieu-Daudé      addons:
51041e1f0e2SPhilippe Mathieu-Daudé        apt_packages:
51141e1f0e2SPhilippe Mathieu-Daudé          - libaio-dev
51241e1f0e2SPhilippe Mathieu-Daudé          - libattr1-dev
51341e1f0e2SPhilippe Mathieu-Daudé          - libbrlapi-dev
51441e1f0e2SPhilippe Mathieu-Daudé          - libcap-ng-dev
51541e1f0e2SPhilippe Mathieu-Daudé          - libgcrypt20-dev
51641e1f0e2SPhilippe Mathieu-Daudé          - libgnutls28-dev
51741e1f0e2SPhilippe Mathieu-Daudé          - libgtk-3-dev
51841e1f0e2SPhilippe Mathieu-Daudé          - libiscsi-dev
51941e1f0e2SPhilippe Mathieu-Daudé          - liblttng-ust-dev
52041e1f0e2SPhilippe Mathieu-Daudé          - libncurses5-dev
52141e1f0e2SPhilippe Mathieu-Daudé          - libnfs-dev
52241e1f0e2SPhilippe Mathieu-Daudé          - libnss3-dev
52341e1f0e2SPhilippe Mathieu-Daudé          - libpixman-1-dev
52441e1f0e2SPhilippe Mathieu-Daudé          - libpng-dev
52541e1f0e2SPhilippe Mathieu-Daudé          - librados-dev
52641e1f0e2SPhilippe Mathieu-Daudé          - libsdl2-dev
52741e1f0e2SPhilippe Mathieu-Daudé          - libseccomp-dev
52841e1f0e2SPhilippe Mathieu-Daudé          - liburcu-dev
52941e1f0e2SPhilippe Mathieu-Daudé          - libusb-1.0-0-dev
53041e1f0e2SPhilippe Mathieu-Daudé          - libvdeplug-dev
53141e1f0e2SPhilippe Mathieu-Daudé          - libvte-2.91-dev
53241e1f0e2SPhilippe Mathieu-Daudé      env:
53341e1f0e2SPhilippe Mathieu-Daudé        - TEST_CMD="make check-unit"
534*aae8b87eSThomas Huth        - CONFIG="--disable-containers --disable-tcg --enable-kvm
535*aae8b87eSThomas Huth                  --disable-tools --host-cc=clang --cxx=clang++"
53641e1f0e2SPhilippe Mathieu-Daudé
53761ac3dccSPhilippe Mathieu-Daudé    # Release builds
53861ac3dccSPhilippe Mathieu-Daudé    # The make-release script expect a QEMU version, so our tag must start with a 'v'.
53961ac3dccSPhilippe Mathieu-Daudé    # This is the case when release candidate tags are created.
540097aebd8SPhilippe Mathieu-Daudé    - name: "Release tarball"
541097aebd8SPhilippe Mathieu-Daudé      if: tag IS present AND tag =~ /^v\d+\.\d+(\.\d+)?(-\S*)?$/
54261ac3dccSPhilippe Mathieu-Daudé      env:
54361ac3dccSPhilippe Mathieu-Daudé        # We want to build from the release tarball
54461ac3dccSPhilippe Mathieu-Daudé        - BUILD_DIR="release/build/dir" SRC_DIR="../../.."
54561ac3dccSPhilippe Mathieu-Daudé        - BASE_CONFIG="--prefix=$PWD/dist"
54661ac3dccSPhilippe Mathieu-Daudé        - CONFIG="--target-list=x86_64-softmmu,aarch64-softmmu,armeb-linux-user,ppc-linux-user"
5470a7c0ae0SAlex Bennée        - TEST_CMD="make install -j${JOBS}"
54861ac3dccSPhilippe Mathieu-Daudé        - QEMU_VERSION="${TRAVIS_TAG:1}"
54961ac3dccSPhilippe Mathieu-Daudé        - CACHE_NAME="${TRAVIS_BRANCH}-linux-gcc-default"
55061ac3dccSPhilippe Mathieu-Daudé      script:
55161ac3dccSPhilippe Mathieu-Daudé        - make -C ${SRC_DIR} qemu-${QEMU_VERSION}.tar.bz2
55261ac3dccSPhilippe Mathieu-Daudé        - ls -l ${SRC_DIR}/qemu-${QEMU_VERSION}.tar.bz2
55361ac3dccSPhilippe Mathieu-Daudé        - tar -xf ${SRC_DIR}/qemu-${QEMU_VERSION}.tar.bz2 && cd qemu-${QEMU_VERSION}
554bc4486fbSPaolo Bonzini        - mkdir -p release-build && cd release-build
555bc4486fbSPaolo Bonzini        - ../configure ${BASE_CONFIG} ${CONFIG} || { cat config.log && exit 1; }
55661ac3dccSPhilippe Mathieu-Daudé        - make install
557