xref: /qemu/.travis.yml (revision ca61e750)
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          - libgcrypt20-dev
132          - libgnutls28-dev
133          - libgtk-3-dev
134          - libiscsi-dev
135          - liblttng-ust-dev
136          - libncurses5-dev
137          - libnfs-dev
138          - libpixman-1-dev
139          - libpng-dev
140          - librados-dev
141          - libsdl2-dev
142          - libseccomp-dev
143          - liburcu-dev
144          - libusb-1.0-0-dev
145          - libvdeplug-dev
146          - libvte-2.91-dev
147          - ninja-build
148          # Tests dependencies
149          - genisoimage
150      env:
151        - TEST_CMD="make check check-tcg V=1"
152        - CONFIG="--disable-containers --target-list=${MAIN_SOFTMMU_TARGETS} --cxx=/bin/false"
153        - UNRELIABLE=true
154
155    - name: "[ppc64] GCC check-tcg"
156      arch: ppc64le
157      dist: focal
158      addons:
159        apt_packages:
160          - libaio-dev
161          - libattr1-dev
162          - libbrlapi-dev
163          - libcacard-dev
164          - libcap-ng-dev
165          - libgcrypt20-dev
166          - libgnutls28-dev
167          - libgtk-3-dev
168          - libiscsi-dev
169          - liblttng-ust-dev
170          - libncurses5-dev
171          - libnfs-dev
172          - libpixman-1-dev
173          - libpng-dev
174          - librados-dev
175          - libsdl2-dev
176          - libseccomp-dev
177          - liburcu-dev
178          - libusb-1.0-0-dev
179          - libvdeplug-dev
180          - libvte-2.91-dev
181          - ninja-build
182          # Tests dependencies
183          - genisoimage
184      env:
185        - TEST_CMD="make check check-tcg V=1"
186        - CONFIG="--disable-containers --target-list=ppc64-softmmu,ppc64le-linux-user"
187
188    - name: "[s390x] GCC check-tcg"
189      arch: s390x
190      dist: focal
191      addons:
192        apt_packages:
193          - libaio-dev
194          - libattr1-dev
195          - libbrlapi-dev
196          - libcacard-dev
197          - libcap-ng-dev
198          - libgcrypt20-dev
199          - libgnutls28-dev
200          - libgtk-3-dev
201          - libiscsi-dev
202          - liblttng-ust-dev
203          - libncurses5-dev
204          - libnfs-dev
205          - libpixman-1-dev
206          - libpng-dev
207          - librados-dev
208          - libsdl2-dev
209          - libseccomp-dev
210          - liburcu-dev
211          - libusb-1.0-0-dev
212          - libvdeplug-dev
213          - libvte-2.91-dev
214          - ninja-build
215          # Tests dependencies
216          - genisoimage
217      env:
218        - TEST_CMD="make check check-tcg V=1"
219        - CONFIG="--disable-containers --target-list=${MAIN_SOFTMMU_TARGETS},s390x-linux-user"
220        - UNRELIABLE=true
221        - DFLTCC=0
222      script:
223        - BUILD_RC=0 && make -j${JOBS} || BUILD_RC=$?
224        - |
225          if [ "$BUILD_RC" -eq 0 ] ; then
226              mv pc-bios/s390-ccw/*.img pc-bios/ ;
227              ${TEST_CMD} ;
228          else
229              $(exit $BUILD_RC);
230          fi
231
232    - name: "[s390x] GCC (other-softmmu)"
233      arch: s390x
234      dist: focal
235      addons:
236        apt_packages:
237          - libaio-dev
238          - libattr1-dev
239          - libcacard-dev
240          - libcap-ng-dev
241          - libgnutls28-dev
242          - libiscsi-dev
243          - liblttng-ust-dev
244          - liblzo2-dev
245          - libncurses-dev
246          - libnfs-dev
247          - libpixman-1-dev
248          - libsdl2-dev
249          - libsdl2-image-dev
250          - libseccomp-dev
251          - libsnappy-dev
252          - libzstd-dev
253          - nettle-dev
254          - xfslibs-dev
255          - ninja-build
256          # Tests dependencies
257          - genisoimage
258      env:
259        - CONFIG="--disable-containers --audio-drv-list=sdl --disable-user
260                  --target-list-exclude=${MAIN_SOFTMMU_TARGETS}"
261        - DFLTCC=0
262    - name: "[s390x] GCC (user)"
263      arch: s390x
264      dist: focal
265      addons:
266        apt_packages:
267          - libgcrypt20-dev
268          - libglib2.0-dev
269          - libgnutls28-dev
270          - ninja-build
271      env:
272        - CONFIG="--disable-containers --disable-system"
273        - DFLTCC=0
274    - name: "[s390x] Clang (disable-tcg)"
275      arch: s390x
276      dist: focal
277      compiler: clang
278      addons:
279        apt_packages:
280          - libaio-dev
281          - libattr1-dev
282          - libbrlapi-dev
283          - libcacard-dev
284          - libcap-ng-dev
285          - libgcrypt20-dev
286          - libgnutls28-dev
287          - libgtk-3-dev
288          - libiscsi-dev
289          - liblttng-ust-dev
290          - libncurses5-dev
291          - libnfs-dev
292          - libpixman-1-dev
293          - libpng-dev
294          - librados-dev
295          - libsdl2-dev
296          - libseccomp-dev
297          - liburcu-dev
298          - libusb-1.0-0-dev
299          - libvdeplug-dev
300          - libvte-2.91-dev
301          - ninja-build
302      env:
303        - TEST_CMD="make check-unit"
304        - CONFIG="--disable-containers --disable-tcg --enable-kvm
305                  --disable-tools --host-cc=clang --cxx=clang++"
306        - UNRELIABLE=true
307        - DFLTCC=0
308