.travis.yml: Enable ccache on OSX
[qemu/ar7.git] / .travis.yml
blob3d1c7f0d7e05434a0bb423817228c7bfc3d09c85
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
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       - ccache
49       - glib
50       - pixman
51       - gnu-sed
52     update: true
55 # The channel name "irc.oftc.net#qemu" is encrypted against qemu/qemu
56 # to prevent IRC notifications from forks. This was created using:
57 # $ travis encrypt -r "qemu/qemu" "irc.oftc.net#qemu"
58 notifications:
59   irc:
60     channels:
61       - secure: "F7GDRgjuOo5IUyRLqSkmDL7kvdU4UcH3Lm/W2db2JnDHTGCqgEdaYEYKciyCLZ57vOTsTsOgesN8iUT7hNHBd1KWKjZe9KDTZWppWRYVwAwQMzVeSOsbbU4tRoJ6Pp+3qhH1Z0eGYR9ZgKYAoTumDFgSAYRp4IscKS8jkoedOqM="
62     on_success: change
63     on_failure: always
66 env:
67   global:
68     - SRC_DIR="."
69     - BUILD_DIR="."
70     - BASE_CONFIG="--disable-docs --disable-tools"
71     - TEST_CMD="make check -j3 V=1"
72     # This is broadly a list of "mainline" softmmu targets which have support across the major distros
73     - MAIN_SOFTMMU_TARGETS="aarch64-softmmu,arm-softmmu,i386-softmmu,mips-softmmu,mips64-softmmu,ppc64-softmmu,riscv64-softmmu,s390x-softmmu,x86_64-softmmu"
74     - CCACHE_SLOPPINESS="include_file_ctime,include_file_mtime"
75     - CCACHE_MAXSIZE=1G
78 git:
79   # we want to do this ourselves
80   submodules: false
83 before_script:
84   - if [ "$TRAVIS_OS_NAME" == "osx" ] ; then export PATH="/usr/local/opt/ccache/libexec:$PATH" ; fi
85   - command -v ccache && ccache --zero-stats
86   - mkdir -p ${BUILD_DIR} && cd ${BUILD_DIR}
87   - ${SRC_DIR}/configure ${BASE_CONFIG} ${CONFIG} || { cat config.log && exit 1; }
88 script:
89   - make -j3 && travis_retry ${TEST_CMD}
90 after_script:
91   - command -v ccache && ccache --show-stats
94 matrix:
95   include:
96     - env:
97         - CONFIG="--disable-system --static"
100     # we split the system builds as it takes a while to build them all
101     - env:
102         - CONFIG="--disable-user --target-list=${MAIN_SOFTMMU_TARGETS}"
105     - env:
106         - CONFIG="--disable-user --target-list-exclude=${MAIN_SOFTMMU_TARGETS}"
109     # Just build tools and run minimal unit and softfloat checks
110     - env:
111         - BASE_CONFIG="--enable-tools"
112         - CONFIG="--disable-user --disable-system"
113         - TEST_CMD="make check-unit check-softfloat -j3"
115     - env:
116         - CONFIG="--enable-debug --enable-debug-tcg --disable-user"
119     # TCG debug can be run just on it's own and is mostly agnostic to user/softmmu distinctions
120     - env:
121         - CONFIG="--enable-debug-tcg --disable-system"
124     - env:
125         - CONFIG="--disable-linux-aio --disable-cap-ng --disable-attr --disable-brlapi --disable-libusb --disable-replication --target-list=${MAIN_SOFTMMU_TARGETS}"
128     # Module builds are mostly of interest to major distros
129     - env:
130         - CONFIG="--enable-modules --target-list=${MAIN_SOFTMMU_TARGETS}"
133     # Alternate coroutines implementations are only really of interest to KVM users
134     # However we can't test against KVM on Travis so we can only run unit tests
135     - env:
136         - CONFIG="--with-coroutine=ucontext --disable-tcg"
137         - TEST_CMD="make check-unit -j3 V=1"
140     - env:
141         - CONFIG="--with-coroutine=sigaltstack --disable-tcg"
142         - TEST_CMD="make check-unit -j3 V=1"
145     # Check we can build docs and tools (out of tree)
146     - env:
147         - BUILD_DIR="out-of-tree/build/dir" SRC_DIR="../../.."
148         - BASE_CONFIG="--enable-tools --enable-docs"
149         - CONFIG="--target-list=x86_64-softmmu,aarch64-linux-user"
150       addons:
151         apt:
152           packages:
153             - python-sphinx
154             - texinfo
155             - perl
158     # Test with Clang for compile portability (Travis uses clang-5.0)
159     - env:
160         - CONFIG="--disable-system"
161       compiler: clang
164     - env:
165         - CONFIG="--disable-user --target-list=${MAIN_SOFTMMU_TARGETS}"
166       compiler: clang
169     - env:
170         - CONFIG="--target-list=${MAIN_SOFTMMU_TARGETS} "
171       compiler: clang
172       before_script:
173         - ./configure ${CONFIG} --extra-cflags="-fsanitize=undefined -Werror" || { cat config.log && exit 1; }
176     - env:
177         - CONFIG="--disable-user --target-list-exclude=${MAIN_SOFTMMU_TARGETS}"
178       compiler: clang
181     # gprof/gcov are GCC features
182     - env:
183         - CONFIG="--enable-gprof --enable-gcov --disable-pie --target-list=${MAIN_SOFTMMU_TARGETS}"
184       after_success:
185         - ${SRC_DIR}/scripts/travis/coverage-summary.sh
188     # We manually include builds which we disable "make check" for
189     - env:
190         - CONFIG="--without-default-devices --disable-user"
191         - TEST_CMD=""
194     # We manually include builds which we disable "make check" for
195     - env:
196         - CONFIG="--enable-debug --enable-tcg-interpreter"
197         - TEST_CMD=""
200     # We don't need to exercise every backend with every front-end
201     - env:
202         - CONFIG="--enable-trace-backends=log,simple,syslog --disable-system"
203         - TEST_CMD=""
206     - env:
207         - CONFIG="--enable-trace-backends=ftrace --target-list=x86_64-softmmu"
208         - TEST_CMD=""
211     - env:
212         - CONFIG="--enable-trace-backends=ust --target-list=x86_64-softmmu"
213         - TEST_CMD=""
216     # MacOSX builds
217     - env:
218         - CONFIG="--target-list=${MAIN_SOFTMMU_TARGETS}"
219       os: osx
220       osx_image: xcode9.4
221       compiler: clang
224     - env:
225         - CONFIG="--target-list=i386-softmmu,ppc-softmmu,ppc64-softmmu,m68k-softmmu,x86_64-softmmu"
226       os: osx
227       osx_image: xcode10.2
228       compiler: clang
231     # Python builds
232     - env:
233         - CONFIG="--target-list=x86_64-softmmu"
234       language: python
235       python:
236         - "3.4"
239     - env:
240         - CONFIG="--target-list=x86_64-softmmu"
241       language: python
242       python:
243         - "3.6"
246     # Acceptance (Functional) tests
247     - env:
248         - 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"
249         - TEST_CMD="make check-acceptance"
250       after_failure:
251         - cat tests/results/latest/job.log
252       addons:
253         apt:
254           packages:
255             - python3-pil
256             - python3-pip
257             - python3.5-venv
258             - tesseract-ocr
259             - tesseract-ocr-eng
262     # Using newer GCC with sanitizers
263     - addons:
264         apt:
265           update: true
266           sources:
267             # PPAs for newer toolchains
268             - ubuntu-toolchain-r-test
269           packages:
270             # Extra toolchains
271             - gcc-9
272             - g++-9
273             # Build dependencies
274             - libaio-dev
275             - libattr1-dev
276             - libbrlapi-dev
277             - libcap-ng-dev
278             - libgnutls-dev
279             - libgtk-3-dev
280             - libiscsi-dev
281             - liblttng-ust-dev
282             - libnfs-dev
283             - libncurses5-dev
284             - libnss3-dev
285             - libpixman-1-dev
286             - libpng12-dev
287             - librados-dev
288             - libsdl1.2-dev
289             - libseccomp-dev
290             - libspice-protocol-dev
291             - libspice-server-dev
292             - libssh-dev
293             - liburcu-dev
294             - libusb-1.0-0-dev
295             - libvte-2.91-dev
296             - sparse
297             - uuid-dev
298       language: generic
299       compiler: none
300       env:
301         - COMPILER_NAME=gcc CXX=g++-9 CC=gcc-9
302         - CONFIG="--cc=gcc-9 --cxx=g++-9 --disable-pie --disable-linux-user"
303         - TEST_CMD=""
304       before_script:
305         - ./configure ${CONFIG} --extra-cflags="-g3 -O0 -Wno-error=stringop-truncation -fsanitize=thread -fuse-ld=gold" || { cat config.log && exit 1; }
308     # Run check-tcg against linux-user
309     - env:
310         - CONFIG="--disable-system"
311         - TEST_CMD="make -j3 check-tcg V=1"
313     # Run check-tcg against softmmu targets
314     - env:
315         - CONFIG="--target-list=xtensa-softmmu,arm-softmmu,aarch64-softmmu,alpha-softmmu"
316         - TEST_CMD="make -j3 check-tcg V=1"