travis: standardize the syntax used for env variables
[qemu/ericb.git] / .travis.yml
blobf539f8b556a61115b0efd5d2688d51171c5fba93
1 # The current Travis default is a container based 14.04 Trust on EC2
2 # Additional builds with specific requirements for a full VM need to
3 # be added as additional matrix: entries later on
5 sudo: false
6 dist: trusty
7 language: c
8 python:
9   - "2.6"
10 compiler:
11   - gcc
12 cache: ccache
15 addons:
16   apt:
17     packages:
18       # Build dependencies
19       - libaio-dev
20       - libattr1-dev
21       - libbrlapi-dev
22       - libcap-ng-dev
23       - libgcc-4.8-dev
24       - libgnutls-dev
25       - libgtk-3-dev
26       - libiscsi-dev
27       - liblttng-ust-dev
28       - libncurses5-dev
29       - libnfs-dev
30       - libnss3-dev
31       - libpixman-1-dev
32       - libpng12-dev
33       - librados-dev
34       - libsdl1.2-dev
35       - libseccomp-dev
36       - libspice-protocol-dev
37       - libspice-server-dev
38       - libssh2-1-dev
39       - liburcu-dev
40       - libusb-1.0-0-dev
41       - libvte-2.90-dev
42       - sparse
43       - uuid-dev
44       - gcovr
47 # The channel name "irc.oftc.net#qemu" is encrypted against qemu/qemu
48 # to prevent IRC notifications from forks. This was created using:
49 # $ travis encrypt -r "qemu/qemu" "irc.oftc.net#qemu"
50 notifications:
51   irc:
52     channels:
53       - secure: "F7GDRgjuOo5IUyRLqSkmDL7kvdU4UcH3Lm/W2db2JnDHTGCqgEdaYEYKciyCLZ57vOTsTsOgesN8iUT7hNHBd1KWKjZe9KDTZWppWRYVwAwQMzVeSOsbbU4tRoJ6Pp+3qhH1Z0eGYR9ZgKYAoTumDFgSAYRp4IscKS8jkoedOqM="
54     on_success: change
55     on_failure: always
58 env:
59   global:
60     - SRC_DIR="."
61     - BUILD_DIR="."
62     - TEST_CMD="make check"
63     - MAKEFLAGS="-j3"
66 git:
67   # we want to do this ourselves
68   submodules: false
71 before_install:
72   - if [ "$TRAVIS_OS_NAME" == "osx" ]; then brew update ; fi
73   - if [ "$TRAVIS_OS_NAME" == "osx" ]; then brew install libffi gettext glib pixman ; fi
74   - git submodule update --init --recursive capstone dtc ui/keycodemapdb
75 before_script:
76   - mkdir -p ${BUILD_DIR} && cd ${BUILD_DIR}
77   - ${SRC_DIR}/configure ${CONFIG} || { cat config.log && exit 1; }
78 script:
79   - make ${MAKEFLAGS} && ${TEST_CMD}
82 matrix:
83   include:
84     - env:
85         - CONFIG="--disable-system"
88     - env:
89         - CONFIG="--disable-user"
92     - env:
93         - CONFIG="--enable-debug --enable-debug-tcg"
96     - env:
97         - CONFIG="--disable-linux-aio --disable-cap-ng --disable-attr --disable-brlapi --disable-uuid --disable-libusb --disable-user"
100     - env:
101         - CONFIG="--enable-modules --disable-linux-user"
104     - env:
105         - CONFIG="--with-coroutine=ucontext --disable-linux-user"
108     - env:
109         - CONFIG="--with-coroutine=sigaltstack --disable-linux-user"
112     # Test out-of-tree builds
113     - env:
114         - CONFIG="--enable-debug --enable-debug-tcg"
115         - BUILD_DIR="out-of-tree/build/dir" SRC_DIR="../../.."
118     # Test with Clang for compile portability (Travis uses clang-5.0)
119     - env:
120         - CONFIG="--disable-system"
121       compiler: clang
124     - env:
125         - CONFIG="--disable-user"
126       compiler: clang
129     # gprof/gcov are GCC features
130     - env:
131         - CONFIG="--enable-gprof --enable-gcov --disable-pie --target-list=aarch64-softmmu,arm-softmmu,i386-softmmu,mips-softmmu,mips64-softmmu,ppc64-softmmu,riscv64-softmmu,s390x-softmmu,x86_64-softmmu"
132       after_success:
133         - ${SRC_DIR}/scripts/travis/coverage-summary.sh
134       compiler: gcc
137     # We manually include builds which we disable "make check" for
138     - env:
139         - CONFIG="--enable-debug --enable-tcg-interpreter"
140         - TEST_CMD=""
141       compiler: gcc
144     # We don't need to exercise every backend with every front-end
145     - env:
146         - CONFIG="--enable-trace-backends=log,simple,syslog --disable-system"
147         - TEST_CMD=""
148       compiler: gcc
151     - env:
152         - CONFIG="--enable-trace-backends=ftrace --target-list=x86_64-softmmu"
153         - TEST_CMD=""
154       compiler: gcc
157     - env:
158         - CONFIG="--enable-trace-backends=ust --target-list=x86_64-softmmu"
159         - TEST_CMD=""
160       compiler: gcc
163     - env:
164         - CONFIG="--disable-tcg"
165         - TEST_CMD=""
166       compiler: gcc
169     # MacOSX builds
170     - env:
171         - CONFIG="--target-list=aarch64-softmmu,arm-softmmu,i386-softmmu,mips-softmmu,mips64-softmmu,ppc64-softmmu,riscv64-softmmu,s390x-softmmu,x86_64-softmmu"
172       os: osx
173       osx_image: xcode9.4
174       compiler: clang
177     - env:
178         - CONFIG="--target-list=i386-softmmu,ppc-softmmu,ppc64-softmmu,m68k-softmmu,x86_64-softmmu"
179       os: osx
180       osx_image: xcode10
181       compiler: clang
184     # Python builds
185     - env:
186         - CONFIG="--target-list=x86_64-softmmu"
187       python:
188         - "3.0"
191     - env:
192         - CONFIG="--target-list=x86_64-softmmu"
193       python:
194         - "3.6"
197     # Acceptance (Functional) tests
198     - env:
199         - CONFIG="--python=/usr/bin/python3 --target-list=x86_64-softmmu"
200         - TEST_CMD="make AVOCADO_SHOW=app check-acceptance"
201       addons:
202         apt:
203           packages:
204             - python3-pip
205             - python3.4-venv
208     # Using newer GCC with sanitizers
209     - addons:
210         apt:
211           update: true
212           sources:
213             # PPAs for newer toolchains
214             - ubuntu-toolchain-r-test
215           packages:
216             # Extra toolchains
217             - gcc-7
218             - g++-7
219             # Build dependencies
220             - libaio-dev
221             - libattr1-dev
222             - libbrlapi-dev
223             - libcap-ng-dev
224             - libgnutls-dev
225             - libgtk-3-dev
226             - libiscsi-dev
227             - liblttng-ust-dev
228             - libnfs-dev
229             - libncurses5-dev
230             - libnss3-dev
231             - libpixman-1-dev
232             - libpng12-dev
233             - librados-dev
234             - libsdl1.2-dev
235             - libseccomp-dev
236             - libspice-protocol-dev
237             - libspice-server-dev
238             - libssh2-1-dev
239             - liburcu-dev
240             - libusb-1.0-0-dev
241             - libvte-2.90-dev
242             - sparse
243             - uuid-dev
244       language: generic
245       compiler: none
246       env:
247         - COMPILER_NAME=gcc CXX=g++-7 CC=gcc-7
248         - CONFIG="--cc=gcc-7 --cxx=g++-7 --disable-pie --disable-linux-user"
249         - TEST_CMD=""
250       before_script:
251         - ./configure ${CONFIG} --extra-cflags="-g3 -O0 -fsanitize=thread -fuse-ld=gold" || { cat config.log && exit 1; }
254     - env:
255         - CONFIG="--disable-system --disable-docs"
256         - TEST_CMD="make check-tcg"
257       script:
258         - make ${MAKEFLAGS} && ${TEST_CMD} ${MAKEFLAGS}
259       sudo: required
260       dist: trusty
261       compiler: gcc