]> git.proxmox.com Git - mirror_qemu.git/blob - .travis.yml
travis.yml: Move the --enable-modules test to the gitlab-CI
[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
135 # Using newer GCC with sanitizers
136 - name: "GCC9 with sanitizers (softmmu)"
137 dist: bionic
138 addons:
139 apt:
140 update: true
141 sources:
142 # PPAs for newer toolchains
143 - ubuntu-toolchain-r-test
144 packages:
145 # Extra toolchains
146 - gcc-9
147 - g++-9
148 # Build dependencies
149 - libaio-dev
150 - libattr1-dev
151 - libbrlapi-dev
152 - libcap-ng-dev
153 - libgnutls28-dev
154 - libgtk-3-dev
155 - libiscsi-dev
156 - liblttng-ust-dev
157 - libnfs-dev
158 - libncurses5-dev
159 - libnss3-dev
160 - libpixman-1-dev
161 - libpng-dev
162 - librados-dev
163 - libsdl2-dev
164 - libsdl2-image-dev
165 - libseccomp-dev
166 - libspice-protocol-dev
167 - libspice-server-dev
168 - liburcu-dev
169 - libusb-1.0-0-dev
170 - libvte-2.91-dev
171 - ninja-build
172 - sparse
173 - uuid-dev
174 language: generic
175 compiler: none
176 env:
177 - COMPILER_NAME=gcc CXX=g++-9 CC=gcc-9
178 - CONFIG="--cc=gcc-9 --cxx=g++-9 --disable-linux-user"
179 - TEST_CMD=""
180 before_script:
181 - mkdir -p ${BUILD_DIR} && cd ${BUILD_DIR}
182 - ${SRC_DIR}/configure ${CONFIG} --extra-cflags="-g3 -O0 -fsanitize=thread" || { cat config.log meson-logs/meson-log.txt && exit 1; }
183
184
185 - name: "[aarch64] GCC check-tcg"
186 arch: arm64
187 dist: focal
188 addons:
189 apt_packages:
190 - libaio-dev
191 - libattr1-dev
192 - libbrlapi-dev
193 - libcap-ng-dev
194 - libgcrypt20-dev
195 - libgnutls28-dev
196 - libgtk-3-dev
197 - libiscsi-dev
198 - liblttng-ust-dev
199 - libncurses5-dev
200 - libnfs-dev
201 - libnss3-dev
202 - libpixman-1-dev
203 - libpng-dev
204 - librados-dev
205 - libsdl2-dev
206 - libseccomp-dev
207 - liburcu-dev
208 - libusb-1.0-0-dev
209 - libvdeplug-dev
210 - libvte-2.91-dev
211 - ninja-build
212 # Tests dependencies
213 - genisoimage
214 env:
215 - TEST_CMD="make check check-tcg V=1"
216 - CONFIG="--disable-containers --target-list=${MAIN_SOFTMMU_TARGETS}"
217 - UNRELIABLE=true
218
219 - name: "[ppc64] GCC check-tcg"
220 arch: ppc64le
221 dist: focal
222 addons:
223 apt_packages:
224 - libaio-dev
225 - libattr1-dev
226 - libbrlapi-dev
227 - libcap-ng-dev
228 - libgcrypt20-dev
229 - libgnutls28-dev
230 - libgtk-3-dev
231 - libiscsi-dev
232 - liblttng-ust-dev
233 - libncurses5-dev
234 - libnfs-dev
235 - libnss3-dev
236 - libpixman-1-dev
237 - libpng-dev
238 - librados-dev
239 - libsdl2-dev
240 - libseccomp-dev
241 - liburcu-dev
242 - libusb-1.0-0-dev
243 - libvdeplug-dev
244 - libvte-2.91-dev
245 - ninja-build
246 # Tests dependencies
247 - genisoimage
248 env:
249 - TEST_CMD="make check check-tcg V=1"
250 - CONFIG="--disable-containers --target-list=ppc64-softmmu,ppc64le-linux-user"
251
252 - name: "[s390x] GCC check-tcg"
253 arch: s390x
254 dist: bionic
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=${MAIN_SOFTMMU_TARGETS},s390x-linux-user"
284 - UNRELIABLE=true
285 script:
286 - BUILD_RC=0 && make -j${JOBS} || BUILD_RC=$?
287 - |
288 if [ "$BUILD_RC" -eq 0 ] ; then
289 mv pc-bios/s390-ccw/*.img pc-bios/ ;
290 ${TEST_CMD} ;
291 else
292 $(exit $BUILD_RC);
293 fi
294
295 - name: "[s390x] GCC (other-softmmu)"
296 arch: s390x
297 dist: bionic
298 addons:
299 apt_packages:
300 - libaio-dev
301 - libattr1-dev
302 - libcap-ng-dev
303 - libgnutls28-dev
304 - libiscsi-dev
305 - liblttng-ust-dev
306 - liblzo2-dev
307 - libncurses-dev
308 - libnfs-dev
309 - libnss3-dev
310 - libpixman-1-dev
311 - libsdl2-dev
312 - libsdl2-image-dev
313 - libseccomp-dev
314 - libsnappy-dev
315 - libzstd-dev
316 - nettle-dev
317 - xfslibs-dev
318 - ninja-build
319 # Tests dependencies
320 - genisoimage
321 env:
322 - CONFIG="--disable-containers --audio-drv-list=sdl --disable-user
323 --target-list-exclude=${MAIN_SOFTMMU_TARGETS}"
324
325 - name: "[s390x] GCC (user)"
326 arch: s390x
327 dist: bionic
328 addons:
329 apt_packages:
330 - libgcrypt20-dev
331 - libgnutls28-dev
332 - ninja-build
333 env:
334 - CONFIG="--disable-containers --disable-system"
335
336 - name: "[s390x] Clang (disable-tcg)"
337 arch: s390x
338 dist: bionic
339 compiler: clang
340 addons:
341 apt_packages:
342 - libaio-dev
343 - libattr1-dev
344 - libbrlapi-dev
345 - libcap-ng-dev
346 - libgcrypt20-dev
347 - libgnutls28-dev
348 - libgtk-3-dev
349 - libiscsi-dev
350 - liblttng-ust-dev
351 - libncurses5-dev
352 - libnfs-dev
353 - libnss3-dev
354 - libpixman-1-dev
355 - libpng-dev
356 - librados-dev
357 - libsdl2-dev
358 - libseccomp-dev
359 - liburcu-dev
360 - libusb-1.0-0-dev
361 - libvdeplug-dev
362 - libvte-2.91-dev
363 - ninja-build
364 env:
365 - TEST_CMD="make check-unit"
366 - CONFIG="--disable-containers --disable-tcg --enable-kvm
367 --disable-tools --host-cc=clang --cxx=clang++"
368 - UNRELIABLE=true
369
370 # Release builds
371 # The make-release script expect a QEMU version, so our tag must start with a 'v'.
372 # This is the case when release candidate tags are created.
373 - name: "Release tarball"
374 if: tag IS present AND tag =~ /^v\d+\.\d+(\.\d+)?(-\S*)?$/
375 env:
376 # We want to build from the release tarball
377 - BUILD_DIR="release/build/dir" SRC_DIR="../../.."
378 - BASE_CONFIG="--prefix=$PWD/dist"
379 - CONFIG="--target-list=x86_64-softmmu,aarch64-softmmu,armeb-linux-user,ppc-linux-user"
380 - TEST_CMD="make install -j${JOBS}"
381 - QEMU_VERSION="${TRAVIS_TAG:1}"
382 - CACHE_NAME="${TRAVIS_BRANCH}-linux-gcc-default"
383 script:
384 - make -C ${SRC_DIR} qemu-${QEMU_VERSION}.tar.bz2
385 - ls -l ${SRC_DIR}/qemu-${QEMU_VERSION}.tar.bz2
386 - tar -xf ${SRC_DIR}/qemu-${QEMU_VERSION}.tar.bz2 && cd qemu-${QEMU_VERSION}
387 - mkdir -p release-build && cd release-build
388 - ../configure ${BASE_CONFIG} ${CONFIG} || { cat config.log meson-logs/meson-log.txt && exit 1; }
389 - make install
390 allow_failures:
391 - env: UNRELIABLE=true