]> git.proxmox.com Git - mirror_qemu.git/blob - .travis.yml
travis.yml: Move gprof/gcov test across to gitlab
[mirror_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 os: linux
5 dist: focal
6 language: c
7 compiler:
8 - gcc
9 cache:
10 # There is one cache per branch and compiler version.
11 # characteristics of each job are used to identify the cache:
12 # - OS name (currently only linux)
13 # - OS distribution (for Linux, bionic or focal)
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
22 addons:
23 apt:
24 packages:
25 # Build dependencies
26 - libaio-dev
27 - libattr1-dev
28 - libbrlapi-dev
29 - libcap-ng-dev
30 - libgcc-7-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 - libzstd-dev
52 - ninja-build
53 - sparse
54 - uuid-dev
55 # Tests dependencies
56 - genisoimage
57
58
59 # The channel name "irc.oftc.net#qemu" is encrypted against qemu/qemu
60 # to prevent IRC notifications from forks. This was created using:
61 # $ travis encrypt -r "qemu/qemu" "irc.oftc.net#qemu"
62 notifications:
63 irc:
64 channels:
65 - secure: "F7GDRgjuOo5IUyRLqSkmDL7kvdU4UcH3Lm/W2db2JnDHTGCqgEdaYEYKciyCLZ57vOTsTsOgesN8iUT7hNHBd1KWKjZe9KDTZWppWRYVwAwQMzVeSOsbbU4tRoJ6Pp+3qhH1Z0eGYR9ZgKYAoTumDFgSAYRp4IscKS8jkoedOqM="
66 on_success: change
67 on_failure: always
68
69
70 env:
71 global:
72 - SRC_DIR=".."
73 - BUILD_DIR="build"
74 - BASE_CONFIG="--disable-docs --disable-tools"
75 - TEST_BUILD_CMD=""
76 - TEST_CMD="make check V=1"
77 # This is broadly a list of "mainline" softmmu targets which have support across the major distros
78 - MAIN_SOFTMMU_TARGETS="aarch64-softmmu,mips64-softmmu,ppc64-softmmu,riscv64-softmmu,s390x-softmmu,x86_64-softmmu"
79 - CCACHE_SLOPPINESS="include_file_ctime,include_file_mtime"
80 - CCACHE_MAXSIZE=1G
81 - G_MESSAGES_DEBUG=error
82
83
84 git:
85 # we want to do this ourselves
86 submodules: false
87
88 # Common first phase for all steps
89 before_install:
90 - if command -v ccache ; then ccache --zero-stats ; fi
91 - export JOBS=$(($(getconf _NPROCESSORS_ONLN) + 1))
92 - echo "=== Using ${JOBS} simultaneous jobs ==="
93
94 # Configure step - may be overridden
95 before_script:
96 - mkdir -p ${BUILD_DIR} && cd ${BUILD_DIR}
97 - ${SRC_DIR}/configure ${BASE_CONFIG} ${CONFIG} || { cat config.log meson-logs/meson-log.txt && exit 1; }
98
99 # Main build & test - rarely overridden - controlled by TEST_CMD
100 script:
101 - BUILD_RC=0 && make -j${JOBS} || BUILD_RC=$?
102 - |
103 if [ "$BUILD_RC" -eq 0 ] && [ -n "$TEST_BUILD_CMD" ]; then
104 ${TEST_BUILD_CMD} || BUILD_RC=$?
105 else
106 $(exit $BUILD_RC);
107 fi
108 - |
109 if [ "$BUILD_RC" -eq 0 ] ; then
110 ${TEST_CMD} ;
111 else
112 $(exit $BUILD_RC);
113 fi
114 after_script:
115 - df -h
116 - if command -v ccache ; then ccache --show-stats ; fi
117
118
119 jobs:
120 include:
121 # --enable-debug implies --enable-debug-tcg, also runs quite a bit slower
122 - name: "GCC debug (main-softmmu)"
123 env:
124 - CONFIG="--enable-debug --target-list=${MAIN_SOFTMMU_TARGETS}"
125 - CACHE_NAME="${TRAVIS_BRANCH}-linux-gcc-debug"
126
127
128 # TCG debug can be run just on its own and is mostly agnostic to user/softmmu distinctions
129 - name: "GCC debug (user)"
130 env:
131 - CONFIG="--enable-debug-tcg --disable-system"
132 - CACHE_NAME="${TRAVIS_BRANCH}-linux-gcc-debug-tcg"
133
134 # Module builds are mostly of interest to major distros
135 - name: "GCC modules (main-softmmu)"
136 env:
137 - CONFIG="--enable-modules --target-list=${MAIN_SOFTMMU_TARGETS}"
138 - CACHE_NAME="${TRAVIS_BRANCH}-linux-gcc-default"
139
140
141 # Test with Clang for compile portability (Travis uses clang-5.0)
142 - name: "Clang (user)"
143 env:
144 - CONFIG="--disable-system --host-cc=clang --cxx=clang++"
145 - CACHE_NAME="${TRAVIS_BRANCH}-linux-clang-default"
146 compiler: clang
147
148
149 - name: "Clang (main-softmmu)"
150 env:
151 - CONFIG="--target-list=${MAIN_SOFTMMU_TARGETS}
152 --host-cc=clang --cxx=clang++"
153 - CACHE_NAME="${TRAVIS_BRANCH}-linux-clang-sanitize"
154 compiler: clang
155 before_script:
156 - mkdir -p ${BUILD_DIR} && cd ${BUILD_DIR}
157 - ${SRC_DIR}/configure ${CONFIG} --extra-cflags="-fsanitize=undefined -Werror" || { cat config.log meson-logs/meson-log.txt && exit 1; }
158
159
160 - name: "Clang (other-softmmu)"
161 env:
162 - CONFIG="--disable-user --target-list-exclude=${MAIN_SOFTMMU_TARGETS}
163 --host-cc=clang --cxx=clang++"
164 - CACHE_NAME="${TRAVIS_BRANCH}-linux-clang-default"
165 compiler: clang
166
167
168 # Using newer GCC with sanitizers
169 - name: "GCC9 with sanitizers (softmmu)"
170 dist: bionic
171 addons:
172 apt:
173 update: true
174 sources:
175 # PPAs for newer toolchains
176 - ubuntu-toolchain-r-test
177 packages:
178 # Extra toolchains
179 - gcc-9
180 - g++-9
181 # Build dependencies
182 - libaio-dev
183 - libattr1-dev
184 - libbrlapi-dev
185 - libcap-ng-dev
186 - libgnutls28-dev
187 - libgtk-3-dev
188 - libiscsi-dev
189 - liblttng-ust-dev
190 - libnfs-dev
191 - libncurses5-dev
192 - libnss3-dev
193 - libpixman-1-dev
194 - libpng-dev
195 - librados-dev
196 - libsdl2-dev
197 - libsdl2-image-dev
198 - libseccomp-dev
199 - libspice-protocol-dev
200 - libspice-server-dev
201 - liburcu-dev
202 - libusb-1.0-0-dev
203 - libvte-2.91-dev
204 - ninja-build
205 - sparse
206 - uuid-dev
207 language: generic
208 compiler: none
209 env:
210 - COMPILER_NAME=gcc CXX=g++-9 CC=gcc-9
211 - CONFIG="--cc=gcc-9 --cxx=g++-9 --disable-linux-user"
212 - TEST_CMD=""
213 before_script:
214 - mkdir -p ${BUILD_DIR} && cd ${BUILD_DIR}
215 - ${SRC_DIR}/configure ${CONFIG} --extra-cflags="-g3 -O0 -fsanitize=thread" || { cat config.log meson-logs/meson-log.txt && exit 1; }
216
217
218 - name: "[aarch64] GCC check-tcg"
219 arch: arm64
220 dist: focal
221 addons:
222 apt_packages:
223 - libaio-dev
224 - libattr1-dev
225 - libbrlapi-dev
226 - libcap-ng-dev
227 - libgcrypt20-dev
228 - libgnutls28-dev
229 - libgtk-3-dev
230 - libiscsi-dev
231 - liblttng-ust-dev
232 - libncurses5-dev
233 - libnfs-dev
234 - libnss3-dev
235 - libpixman-1-dev
236 - libpng-dev
237 - librados-dev
238 - libsdl2-dev
239 - libseccomp-dev
240 - liburcu-dev
241 - libusb-1.0-0-dev
242 - libvdeplug-dev
243 - libvte-2.91-dev
244 - ninja-build
245 # Tests dependencies
246 - genisoimage
247 env:
248 - TEST_CMD="make check check-tcg V=1"
249 - CONFIG="--disable-containers --target-list=${MAIN_SOFTMMU_TARGETS}"
250 - UNRELIABLE=true
251
252 - name: "[ppc64] GCC check-tcg"
253 arch: ppc64le
254 dist: focal
255 addons:
256 apt_packages:
257 - libaio-dev
258 - libattr1-dev
259 - libbrlapi-dev
260 - libcap-ng-dev
261 - libgcrypt20-dev
262 - libgnutls28-dev
263 - libgtk-3-dev
264 - libiscsi-dev
265 - liblttng-ust-dev
266 - libncurses5-dev
267 - libnfs-dev
268 - libnss3-dev
269 - libpixman-1-dev
270 - libpng-dev
271 - librados-dev
272 - libsdl2-dev
273 - libseccomp-dev
274 - liburcu-dev
275 - libusb-1.0-0-dev
276 - libvdeplug-dev
277 - libvte-2.91-dev
278 - ninja-build
279 # Tests dependencies
280 - genisoimage
281 env:
282 - TEST_CMD="make check check-tcg V=1"
283 - CONFIG="--disable-containers --target-list=ppc64-softmmu,ppc64le-linux-user"
284
285 - name: "[s390x] GCC check-tcg"
286 arch: s390x
287 dist: bionic
288 addons:
289 apt_packages:
290 - libaio-dev
291 - libattr1-dev
292 - libbrlapi-dev
293 - libcap-ng-dev
294 - libgcrypt20-dev
295 - libgnutls28-dev
296 - libgtk-3-dev
297 - libiscsi-dev
298 - liblttng-ust-dev
299 - libncurses5-dev
300 - libnfs-dev
301 - libnss3-dev
302 - libpixman-1-dev
303 - libpng-dev
304 - librados-dev
305 - libsdl2-dev
306 - libseccomp-dev
307 - liburcu-dev
308 - libusb-1.0-0-dev
309 - libvdeplug-dev
310 - libvte-2.91-dev
311 - ninja-build
312 # Tests dependencies
313 - genisoimage
314 env:
315 - TEST_CMD="make check check-tcg V=1"
316 - CONFIG="--disable-containers --target-list=${MAIN_SOFTMMU_TARGETS},s390x-linux-user"
317 - UNRELIABLE=true
318 script:
319 - BUILD_RC=0 && make -j${JOBS} || BUILD_RC=$?
320 - |
321 if [ "$BUILD_RC" -eq 0 ] ; then
322 mv pc-bios/s390-ccw/*.img pc-bios/ ;
323 ${TEST_CMD} ;
324 else
325 $(exit $BUILD_RC);
326 fi
327
328 - name: "[s390x] GCC (other-softmmu)"
329 arch: s390x
330 dist: bionic
331 addons:
332 apt_packages:
333 - libaio-dev
334 - libattr1-dev
335 - libcap-ng-dev
336 - libgnutls28-dev
337 - libiscsi-dev
338 - liblttng-ust-dev
339 - liblzo2-dev
340 - libncurses-dev
341 - libnfs-dev
342 - libnss3-dev
343 - libpixman-1-dev
344 - libsdl2-dev
345 - libsdl2-image-dev
346 - libseccomp-dev
347 - libsnappy-dev
348 - libzstd-dev
349 - nettle-dev
350 - xfslibs-dev
351 - ninja-build
352 # Tests dependencies
353 - genisoimage
354 env:
355 - CONFIG="--disable-containers --audio-drv-list=sdl --disable-user
356 --target-list-exclude=${MAIN_SOFTMMU_TARGETS}"
357
358 - name: "[s390x] GCC (user)"
359 arch: s390x
360 dist: bionic
361 addons:
362 apt_packages:
363 - libgcrypt20-dev
364 - libgnutls28-dev
365 - ninja-build
366 env:
367 - CONFIG="--disable-containers --disable-system"
368
369 - name: "[s390x] Clang (disable-tcg)"
370 arch: s390x
371 dist: bionic
372 compiler: clang
373 addons:
374 apt_packages:
375 - libaio-dev
376 - libattr1-dev
377 - libbrlapi-dev
378 - libcap-ng-dev
379 - libgcrypt20-dev
380 - libgnutls28-dev
381 - libgtk-3-dev
382 - libiscsi-dev
383 - liblttng-ust-dev
384 - libncurses5-dev
385 - libnfs-dev
386 - libnss3-dev
387 - libpixman-1-dev
388 - libpng-dev
389 - librados-dev
390 - libsdl2-dev
391 - libseccomp-dev
392 - liburcu-dev
393 - libusb-1.0-0-dev
394 - libvdeplug-dev
395 - libvte-2.91-dev
396 - ninja-build
397 env:
398 - TEST_CMD="make check-unit"
399 - CONFIG="--disable-containers --disable-tcg --enable-kvm
400 --disable-tools --host-cc=clang --cxx=clang++"
401 - UNRELIABLE=true
402
403 # Release builds
404 # The make-release script expect a QEMU version, so our tag must start with a 'v'.
405 # This is the case when release candidate tags are created.
406 - name: "Release tarball"
407 if: tag IS present AND tag =~ /^v\d+\.\d+(\.\d+)?(-\S*)?$/
408 env:
409 # We want to build from the release tarball
410 - BUILD_DIR="release/build/dir" SRC_DIR="../../.."
411 - BASE_CONFIG="--prefix=$PWD/dist"
412 - CONFIG="--target-list=x86_64-softmmu,aarch64-softmmu,armeb-linux-user,ppc-linux-user"
413 - TEST_CMD="make install -j${JOBS}"
414 - QEMU_VERSION="${TRAVIS_TAG:1}"
415 - CACHE_NAME="${TRAVIS_BRANCH}-linux-gcc-default"
416 script:
417 - make -C ${SRC_DIR} qemu-${QEMU_VERSION}.tar.bz2
418 - ls -l ${SRC_DIR}/qemu-${QEMU_VERSION}.tar.bz2
419 - tar -xf ${SRC_DIR}/qemu-${QEMU_VERSION}.tar.bz2 && cd qemu-${QEMU_VERSION}
420 - mkdir -p release-build && cd release-build
421 - ../configure ${BASE_CONFIG} ${CONFIG} || { cat config.log meson-logs/meson-log.txt && exit 1; }
422 - make install
423 allow_failures:
424 - env: UNRELIABLE=true