xref: /qemu/.travis.yml (revision 769897bd)
1os: linux
2dist: focal
3language: c
4compiler:
5  - gcc
6cache:
7  # There is one cache per branch and compiler version.
8  # characteristics of each job are used to identify the cache:
9  # - OS name (currently only linux)
10  # - OS distribution (for Linux, bionic or focal)
11  # - Names and values of visible environment variables set in .travis.yml or Settings panel
12  timeout: 1200
13  ccache: true
14  pip: true
15  directories:
16  - $HOME/avocado/data/cache
17
18
19addons:
20  apt:
21    packages:
22      # Build dependencies
23      - libaio-dev
24      - libattr1-dev
25      - libbrlapi-dev
26      - libcap-ng-dev
27      - libcacard-dev
28      - libgcc-7-dev
29      - libgnutls28-dev
30      - libgtk-3-dev
31      - libiscsi-dev
32      - liblttng-ust-dev
33      - libncurses5-dev
34      - libnfs-dev
35      - libpixman-1-dev
36      - libpng-dev
37      - librados-dev
38      - libsdl2-dev
39      - libsdl2-image-dev
40      - libseccomp-dev
41      - libspice-protocol-dev
42      - libspice-server-dev
43      - libssh-dev
44      - liburcu-dev
45      - libusb-1.0-0-dev
46      - libvdeplug-dev
47      - libvte-2.91-dev
48      - libzstd-dev
49      - ninja-build
50      - sparse
51      - uuid-dev
52      # Tests dependencies
53      - genisoimage
54
55
56# The channel name "irc.oftc.net#qemu" is encrypted against qemu/qemu
57# to prevent IRC notifications from forks. This was created using:
58# $ travis encrypt -r "qemu/qemu" "irc.oftc.net#qemu"
59notifications:
60  irc:
61    channels:
62      - secure: "F7GDRgjuOo5IUyRLqSkmDL7kvdU4UcH3Lm/W2db2JnDHTGCqgEdaYEYKciyCLZ57vOTsTsOgesN8iUT7hNHBd1KWKjZe9KDTZWppWRYVwAwQMzVeSOsbbU4tRoJ6Pp+3qhH1Z0eGYR9ZgKYAoTumDFgSAYRp4IscKS8jkoedOqM="
63    on_success: change
64    on_failure: always
65
66
67env:
68  global:
69    - SRC_DIR=".."
70    - BUILD_DIR="build"
71    - BASE_CONFIG="--disable-docs --disable-tools"
72    - TEST_BUILD_CMD=""
73    - TEST_CMD="make check V=1"
74    # This is broadly a list of "mainline" softmmu targets which have support across the major distros
75    - MAIN_SOFTMMU_TARGETS="aarch64-softmmu,mips64-softmmu,ppc64-softmmu,riscv64-softmmu,s390x-softmmu,x86_64-softmmu"
76    - CCACHE_SLOPPINESS="include_file_ctime,include_file_mtime"
77    - CCACHE_MAXSIZE=1G
78    - G_MESSAGES_DEBUG=error
79
80
81git:
82  # we want to do this ourselves
83  submodules: false
84
85# Common first phase for all steps
86# We no longer use nproc to calculate jobs:
87# https://travis-ci.community/t/nproc-reports-32-cores-on-arm64/5851
88before_install:
89  - if command -v ccache ; then ccache --zero-stats ; fi
90  - export JOBS=3
91  - echo "=== Using ${JOBS} simultaneous jobs ==="
92
93# Configure step - may be overridden
94before_script:
95  - mkdir -p ${BUILD_DIR} && cd ${BUILD_DIR}
96  - ${SRC_DIR}/configure ${BASE_CONFIG} ${CONFIG} || { cat config.log meson-logs/meson-log.txt && exit 1; }
97
98# Main build & test - rarely overridden - controlled by TEST_CMD
99script:
100  - BUILD_RC=0 && make -j${JOBS} || BUILD_RC=$?
101  - |
102    if [ "$BUILD_RC" -eq 0 ] && [ -n "$TEST_BUILD_CMD" ]; then
103        ${TEST_BUILD_CMD} || BUILD_RC=$?
104    else
105        $(exit $BUILD_RC);
106    fi
107  - |
108    if [ "$BUILD_RC" -eq 0 ] ; then
109        ${TEST_CMD} ;
110    else
111        $(exit $BUILD_RC);
112    fi
113after_script:
114  - df -h
115  - if command -v ccache ; then ccache --show-stats ; fi
116
117
118jobs:
119  include:
120
121    - name: "[aarch64] GCC check-tcg"
122      arch: arm64
123      dist: focal
124      addons:
125        apt_packages:
126          - libaio-dev
127          - libattr1-dev
128          - libbrlapi-dev
129          - libcacard-dev
130          - libcap-ng-dev
131          - libfdt-dev
132          - libgcrypt20-dev
133          - libgnutls28-dev
134          - libgtk-3-dev
135          - libiscsi-dev
136          - liblttng-ust-dev
137          - libncurses5-dev
138          - libnfs-dev
139          - libpixman-1-dev
140          - libpng-dev
141          - librados-dev
142          - libsdl2-dev
143          - libseccomp-dev
144          - liburcu-dev
145          - libusb-1.0-0-dev
146          - libvdeplug-dev
147          - libvte-2.91-dev
148          - ninja-build
149          # Tests dependencies
150          - genisoimage
151      env:
152        - TEST_CMD="make check check-tcg V=1"
153        - CONFIG="--disable-containers --enable-fdt=system
154                  --target-list=${MAIN_SOFTMMU_TARGETS} --cxx=/bin/false"
155        - UNRELIABLE=true
156
157    - name: "[ppc64] GCC check-tcg"
158      arch: ppc64le
159      dist: focal
160      addons:
161        apt_packages:
162          - libaio-dev
163          - libattr1-dev
164          - libbrlapi-dev
165          - libcacard-dev
166          - libcap-ng-dev
167          - libfdt-dev
168          - libgcrypt20-dev
169          - libgnutls28-dev
170          - libgtk-3-dev
171          - libiscsi-dev
172          - liblttng-ust-dev
173          - libncurses5-dev
174          - libnfs-dev
175          - libpixman-1-dev
176          - libpng-dev
177          - librados-dev
178          - libsdl2-dev
179          - libseccomp-dev
180          - liburcu-dev
181          - libusb-1.0-0-dev
182          - libvdeplug-dev
183          - libvte-2.91-dev
184          - ninja-build
185          # Tests dependencies
186          - genisoimage
187      env:
188        - TEST_CMD="make check check-tcg V=1"
189        - CONFIG="--disable-containers --enable-fdt=system
190                  --target-list=ppc64-softmmu,ppc64le-linux-user"
191
192    - name: "[s390x] GCC check-tcg"
193      arch: s390x
194      dist: focal
195      addons:
196        apt_packages:
197          - libaio-dev
198          - libattr1-dev
199          - libbrlapi-dev
200          - libcacard-dev
201          - libcap-ng-dev
202          - libfdt-dev
203          - libgcrypt20-dev
204          - libgnutls28-dev
205          - libgtk-3-dev
206          - libiscsi-dev
207          - liblttng-ust-dev
208          - libncurses5-dev
209          - libnfs-dev
210          - libpixman-1-dev
211          - libpng-dev
212          - librados-dev
213          - libsdl2-dev
214          - libseccomp-dev
215          - liburcu-dev
216          - libusb-1.0-0-dev
217          - libvdeplug-dev
218          - libvte-2.91-dev
219          - ninja-build
220          # Tests dependencies
221          - genisoimage
222      env:
223        - TEST_CMD="make check check-tcg V=1"
224        - CONFIG="--disable-containers --enable-fdt=system
225                  --target-list=${MAIN_SOFTMMU_TARGETS},s390x-linux-user"
226        - UNRELIABLE=true
227      script:
228        - BUILD_RC=0 && make -j${JOBS} || BUILD_RC=$?
229        - |
230          if [ "$BUILD_RC" -eq 0 ] ; then
231              mv pc-bios/s390-ccw/*.img qemu-bundle/usr/local/share/qemu ;
232              ${TEST_CMD} ;
233          else
234              $(exit $BUILD_RC);
235          fi
236
237    - name: "[s390x] GCC (other-softmmu)"
238      arch: s390x
239      dist: focal
240      addons:
241        apt_packages:
242          - libaio-dev
243          - libattr1-dev
244          - libcacard-dev
245          - libcap-ng-dev
246          - libfdt-dev
247          - libgnutls28-dev
248          - libiscsi-dev
249          - liblttng-ust-dev
250          - liblzo2-dev
251          - libncurses-dev
252          - libnfs-dev
253          - libpixman-1-dev
254          - libsdl2-dev
255          - libsdl2-image-dev
256          - libseccomp-dev
257          - libsnappy-dev
258          - libzstd-dev
259          - nettle-dev
260          - xfslibs-dev
261          - ninja-build
262          # Tests dependencies
263          - genisoimage
264      env:
265        - CONFIG="--disable-containers --enable-fdt=system --audio-drv-list=sdl
266                  --disable-user --target-list-exclude=${MAIN_SOFTMMU_TARGETS}"
267
268    - name: "[s390x] GCC (user)"
269      arch: s390x
270      dist: focal
271      addons:
272        apt_packages:
273          - libgcrypt20-dev
274          - libglib2.0-dev
275          - libgnutls28-dev
276          - ninja-build
277      env:
278        - CONFIG="--disable-containers --disable-system"
279
280    - name: "[s390x] Clang (disable-tcg)"
281      arch: s390x
282      dist: focal
283      compiler: clang
284      addons:
285        apt_packages:
286          - libaio-dev
287          - libattr1-dev
288          - libbrlapi-dev
289          - libcacard-dev
290          - libcap-ng-dev
291          - libfdt-dev
292          - libgcrypt20-dev
293          - libgnutls28-dev
294          - libgtk-3-dev
295          - libiscsi-dev
296          - liblttng-ust-dev
297          - libncurses5-dev
298          - libnfs-dev
299          - libpixman-1-dev
300          - libpng-dev
301          - librados-dev
302          - libsdl2-dev
303          - libseccomp-dev
304          - liburcu-dev
305          - libusb-1.0-0-dev
306          - libvdeplug-dev
307          - libvte-2.91-dev
308          - ninja-build
309      env:
310        - TEST_CMD="make check-unit"
311        - CONFIG="--disable-containers --disable-tcg --enable-kvm --disable-tools
312                  --enable-fdt=system --host-cc=clang --cxx=clang++"
313        - UNRELIABLE=true
314