.travis.yml: Cache Avocado cache
[qemu.git] / .travis.yml
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
4 dist: xenial
5 language: c
6 compiler:
7   - gcc
8 cache:
9   timeout: 1200
10   ccache: true
11   pip: true
12   directories:
13   - $HOME/avocado/data/cache
14
15
16 addons:
17   apt:
18     packages:
19       # Build dependencies
20       - libaio-dev
21       - libattr1-dev
22       - libbrlapi-dev
23       - libcap-ng-dev
24       - libgcc-4.8-dev
25       - libgnutls-dev
26       - libgtk-3-dev
27       - libiscsi-dev
28       - liblttng-ust-dev
29       - libncurses5-dev
30       - libnfs-dev
31       - libnss3-dev
32       - libpixman-1-dev
33       - libpng12-dev
34       - librados-dev
35       - libsdl1.2-dev
36       - libseccomp-dev
37       - libspice-protocol-dev
38       - libspice-server-dev
39       - libssh-dev
40       - liburcu-dev
41       - libusb-1.0-0-dev
42       - libvte-2.91-dev
43       - sparse
44       - uuid-dev
45       - gcovr
46   homebrew:
47     packages:
48       - glib
49       - pixman
50       - gnu-sed
51     update: true
52
53
54 # The channel name "irc.oftc.net#qemu" is encrypted against qemu/qemu
55 # to prevent IRC notifications from forks. This was created using:
56 # $ travis encrypt -r "qemu/qemu" "irc.oftc.net#qemu"
57 notifications:
58   irc:
59     channels:
60       - secure: "F7GDRgjuOo5IUyRLqSkmDL7kvdU4UcH3Lm/W2db2JnDHTGCqgEdaYEYKciyCLZ57vOTsTsOgesN8iUT7hNHBd1KWKjZe9KDTZWppWRYVwAwQMzVeSOsbbU4tRoJ6Pp+3qhH1Z0eGYR9ZgKYAoTumDFgSAYRp4IscKS8jkoedOqM="
61     on_success: change
62     on_failure: always
63
64
65 env:
66   global:
67     - SRC_DIR="."
68     - BUILD_DIR="."
69     - BASE_CONFIG="--disable-docs --disable-tools"
70     - TEST_CMD="make check -j3 V=1"
71     # This is broadly a list of "mainline" softmmu targets which have support across the major distros
72     - MAIN_SOFTMMU_TARGETS="aarch64-softmmu,arm-softmmu,i386-softmmu,mips-softmmu,mips64-softmmu,ppc64-softmmu,riscv64-softmmu,s390x-softmmu,x86_64-softmmu"
73
74 git:
75   # we want to do this ourselves
76   submodules: false
77
78
79 before_script:
80   - mkdir -p ${BUILD_DIR} && cd ${BUILD_DIR}
81   - ${SRC_DIR}/configure ${BASE_CONFIG} ${CONFIG} || { cat config.log && exit 1; }
82 script:
83   - make -j3 && travis_retry ${TEST_CMD}
84
85
86 matrix:
87   include:
88     - env:
89         - CONFIG="--disable-system --static"
90
91
92     # we split the system builds as it takes a while to build them all
93     - env:
94         - CONFIG="--disable-user --target-list=${MAIN_SOFTMMU_TARGETS}"
95
96
97     - env:
98         - CONFIG="--disable-user --target-list-exclude=${MAIN_SOFTMMU_TARGETS}"
99
100
101     # Just build tools and run minimal unit and softfloat checks
102     - env:
103         - BASE_CONFIG="--enable-tools"
104         - CONFIG="--disable-user --disable-system"
105         - TEST_CMD="make check-unit check-softfloat -j3"
106
107     - env:
108         - CONFIG="--enable-debug --enable-debug-tcg --disable-user"
109
110
111     # TCG debug can be run just on it's own and is mostly agnostic to user/softmmu distinctions
112     - env:
113         - CONFIG="--enable-debug-tcg --disable-system"
114
115
116     - env:
117         - CONFIG="--disable-linux-aio --disable-cap-ng --disable-attr --disable-brlapi --disable-libusb --disable-replication --target-list=${MAIN_SOFTMMU_TARGETS}"
118
119
120     # Module builds are mostly of interest to major distros
121     - env:
122         - CONFIG="--enable-modules --target-list=${MAIN_SOFTMMU_TARGETS}"
123
124
125     # Alternate coroutines implementations are only really of interest to KVM users
126     # However we can't test against KVM on Travis so we can only run unit tests
127     - env:
128         - CONFIG="--with-coroutine=ucontext --disable-tcg"
129         - TEST_CMD="make check-unit -j3 V=1"
130
131
132     - env:
133         - CONFIG="--with-coroutine=sigaltstack --disable-tcg"
134         - TEST_CMD="make check-unit -j3 V=1"
135
136
137     # Check we can build docs and tools (out of tree)
138     - env:
139         - BUILD_DIR="out-of-tree/build/dir" SRC_DIR="../../.."
140         - BASE_CONFIG="--enable-tools --enable-docs"
141         - CONFIG="--target-list=x86_64-softmmu,aarch64-linux-user"
142       addons:
143         apt:
144           packages:
145             - python-sphinx
146             - texinfo
147             - perl
148
149
150     # Test with Clang for compile portability (Travis uses clang-5.0)
151     - env:
152         - CONFIG="--disable-system"
153       compiler: clang
154
155
156     - env:
157         - CONFIG="--disable-user --target-list=${MAIN_SOFTMMU_TARGETS}"
158       compiler: clang
159
160
161     - env:
162         - CONFIG="--target-list=${MAIN_SOFTMMU_TARGETS} "
163       compiler: clang
164       before_script:
165         - ./configure ${CONFIG} --extra-cflags="-fsanitize=undefined -Werror" || { cat config.log && exit 1; }
166
167
168     - env:
169         - CONFIG="--disable-user --target-list-exclude=${MAIN_SOFTMMU_TARGETS}"
170       compiler: clang
171
172
173     # gprof/gcov are GCC features
174     - env:
175         - CONFIG="--enable-gprof --enable-gcov --disable-pie --target-list=${MAIN_SOFTMMU_TARGETS}"
176       after_success:
177         - ${SRC_DIR}/scripts/travis/coverage-summary.sh
178
179
180     # We manually include builds which we disable "make check" for
181     - env:
182         - CONFIG="--without-default-devices --disable-user"
183         - TEST_CMD=""
184
185
186     # We manually include builds which we disable "make check" for
187     - env:
188         - CONFIG="--enable-debug --enable-tcg-interpreter"
189         - TEST_CMD=""
190
191
192     # We don't need to exercise every backend with every front-end
193     - env:
194         - CONFIG="--enable-trace-backends=log,simple,syslog --disable-system"
195         - TEST_CMD=""
196
197
198     - env:
199         - CONFIG="--enable-trace-backends=ftrace --target-list=x86_64-softmmu"
200         - TEST_CMD=""
201
202
203     - env:
204         - CONFIG="--enable-trace-backends=ust --target-list=x86_64-softmmu"
205         - TEST_CMD=""
206
207
208     # MacOSX builds
209     - env:
210         - CONFIG="--target-list=${MAIN_SOFTMMU_TARGETS}"
211       os: osx
212       osx_image: xcode9.4
213       compiler: clang
214
215
216     - env:
217         - CONFIG="--target-list=i386-softmmu,ppc-softmmu,ppc64-softmmu,m68k-softmmu,x86_64-softmmu"
218       os: osx
219       osx_image: xcode10.2
220       compiler: clang
221
222
223     # Python builds
224     - env:
225         - CONFIG="--target-list=x86_64-softmmu"
226       language: python
227       python:
228         - "3.4"
229
230
231     - env:
232         - CONFIG="--target-list=x86_64-softmmu"
233       language: python
234       python:
235         - "3.6"
236
237
238     # Acceptance (Functional) tests
239     - env:
240         - CONFIG="--python=/usr/bin/python3 --target-list=x86_64-softmmu,mips-softmmu,mips64el-softmmu,aarch64-softmmu,arm-softmmu,s390x-softmmu,alpha-softmmu,ppc64-softmmu,m68k-softmmu"
241         - TEST_CMD="make check-acceptance"
242       after_failure:
243         - cat tests/results/latest/job.log
244       addons:
245         apt:
246           packages:
247             - python3-pil
248             - python3-pip
249             - python3.5-venv
250             - tesseract-ocr
251             - tesseract-ocr-eng
252
253
254     # Using newer GCC with sanitizers
255     - addons:
256         apt:
257           update: true
258           sources:
259             # PPAs for newer toolchains
260             - ubuntu-toolchain-r-test
261           packages:
262             # Extra toolchains
263             - gcc-9
264             - g++-9
265             # Build dependencies
266             - libaio-dev
267             - libattr1-dev
268             - libbrlapi-dev
269             - libcap-ng-dev
270             - libgnutls-dev
271             - libgtk-3-dev
272             - libiscsi-dev
273             - liblttng-ust-dev
274             - libnfs-dev
275             - libncurses5-dev
276             - libnss3-dev
277             - libpixman-1-dev
278             - libpng12-dev
279             - librados-dev
280             - libsdl1.2-dev
281             - libseccomp-dev
282             - libspice-protocol-dev
283             - libspice-server-dev
284             - libssh-dev
285             - liburcu-dev
286             - libusb-1.0-0-dev
287             - libvte-2.91-dev
288             - sparse
289             - uuid-dev
290       language: generic
291       compiler: none
292       env:
293         - COMPILER_NAME=gcc CXX=g++-9 CC=gcc-9
294         - CONFIG="--cc=gcc-9 --cxx=g++-9 --disable-pie --disable-linux-user"
295         - TEST_CMD=""
296       before_script:
297         - ./configure ${CONFIG} --extra-cflags="-g3 -O0 -Wno-error=stringop-truncation -fsanitize=thread -fuse-ld=gold" || { cat config.log && exit 1; }
298
299
300     # Run check-tcg against linux-user
301     - env:
302         - CONFIG="--disable-system"
303         - TEST_CMD="make -j3 check-tcg V=1"
304
305     # Run check-tcg against softmmu targets
306     - env:
307         - CONFIG="--target-list=xtensa-softmmu,arm-softmmu,aarch64-softmmu,alpha-softmmu"
308         - TEST_CMD="make -j3 check-tcg V=1"