xref: /qemu/.travis.yml (revision 0955d66e)
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
4os: linux
5dist: focal
6language: c
7compiler:
8  - gcc
9cache:
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
22addons:
23  apt:
24    packages:
25      # Build dependencies
26      - libaio-dev
27      - libattr1-dev
28      - libbrlapi-dev
29      - libcap-ng-dev
30      - libcacard-dev
31      - libgcc-7-dev
32      - libgnutls28-dev
33      - libgtk-3-dev
34      - libiscsi-dev
35      - liblttng-ust-dev
36      - libncurses5-dev
37      - libnfs-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"
62notifications:
63  irc:
64    channels:
65      - secure: "F7GDRgjuOo5IUyRLqSkmDL7kvdU4UcH3Lm/W2db2JnDHTGCqgEdaYEYKciyCLZ57vOTsTsOgesN8iUT7hNHBd1KWKjZe9KDTZWppWRYVwAwQMzVeSOsbbU4tRoJ6Pp+3qhH1Z0eGYR9ZgKYAoTumDFgSAYRp4IscKS8jkoedOqM="
66    on_success: change
67    on_failure: always
68
69
70env:
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
84git:
85  # we want to do this ourselves
86  submodules: false
87
88# Common first phase for all steps
89# We no longer use nproc to calculate jobs:
90# https://travis-ci.community/t/nproc-reports-32-cores-on-arm64/5851
91before_install:
92  - if command -v ccache ; then ccache --zero-stats ; fi
93  - export JOBS=3
94  - echo "=== Using ${JOBS} simultaneous jobs ==="
95
96# Configure step - may be overridden
97before_script:
98  - mkdir -p ${BUILD_DIR} && cd ${BUILD_DIR}
99  - ${SRC_DIR}/configure ${BASE_CONFIG} ${CONFIG} || { cat config.log meson-logs/meson-log.txt && exit 1; }
100
101# Main build & test - rarely overridden - controlled by TEST_CMD
102script:
103  - BUILD_RC=0 && make -j${JOBS} || BUILD_RC=$?
104  - |
105    if [ "$BUILD_RC" -eq 0 ] && [ -n "$TEST_BUILD_CMD" ]; then
106        ${TEST_BUILD_CMD} || BUILD_RC=$?
107    else
108        $(exit $BUILD_RC);
109    fi
110  - |
111    if [ "$BUILD_RC" -eq 0 ] ; then
112        ${TEST_CMD} ;
113    else
114        $(exit $BUILD_RC);
115    fi
116after_script:
117  - df -h
118  - if command -v ccache ; then ccache --show-stats ; fi
119
120
121jobs:
122  include:
123
124    - name: "[aarch64] GCC check-tcg"
125      arch: arm64
126      dist: focal
127      addons:
128        apt_packages:
129          - libaio-dev
130          - libattr1-dev
131          - libbrlapi-dev
132          - libcacard-dev
133          - libcap-ng-dev
134          - libgcrypt20-dev
135          - libgnutls28-dev
136          - libgtk-3-dev
137          - libiscsi-dev
138          - liblttng-ust-dev
139          - libncurses5-dev
140          - libnfs-dev
141          - libpixman-1-dev
142          - libpng-dev
143          - librados-dev
144          - libsdl2-dev
145          - libseccomp-dev
146          - liburcu-dev
147          - libusb-1.0-0-dev
148          - libvdeplug-dev
149          - libvte-2.91-dev
150          - ninja-build
151          # Tests dependencies
152          - genisoimage
153      env:
154        - TEST_CMD="make check check-tcg V=1"
155        - CONFIG="--disable-containers --target-list=${MAIN_SOFTMMU_TARGETS} --cxx=/bin/false"
156        - UNRELIABLE=true
157
158    - name: "[ppc64] GCC check-tcg"
159      arch: ppc64le
160      dist: focal
161      addons:
162        apt_packages:
163          - libaio-dev
164          - libattr1-dev
165          - libbrlapi-dev
166          - libcacard-dev
167          - libcap-ng-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 --target-list=ppc64-softmmu,ppc64le-linux-user"
190
191    - name: "[s390x] GCC check-tcg"
192      arch: s390x
193      dist: bionic
194      addons:
195        apt_packages:
196          - libaio-dev
197          - libattr1-dev
198          - libbrlapi-dev
199          - libcacard-dev
200          - libcap-ng-dev
201          - libgcrypt20-dev
202          - libgnutls28-dev
203          - libgtk-3-dev
204          - libiscsi-dev
205          - liblttng-ust-dev
206          - libncurses5-dev
207          - libnfs-dev
208          - libpixman-1-dev
209          - libpng-dev
210          - librados-dev
211          - libsdl2-dev
212          - libseccomp-dev
213          - liburcu-dev
214          - libusb-1.0-0-dev
215          - libvdeplug-dev
216          - libvte-2.91-dev
217          - ninja-build
218          # Tests dependencies
219          - genisoimage
220      env:
221        - TEST_CMD="make check check-tcg V=1"
222        - CONFIG="--disable-containers --target-list=${MAIN_SOFTMMU_TARGETS},s390x-linux-user"
223        - UNRELIABLE=true
224      script:
225        - BUILD_RC=0 && make -j${JOBS} || BUILD_RC=$?
226        - |
227          if [ "$BUILD_RC" -eq 0 ] ; then
228              mv pc-bios/s390-ccw/*.img pc-bios/ ;
229              ${TEST_CMD} ;
230          else
231              $(exit $BUILD_RC);
232          fi
233
234    - name: "[s390x] GCC (other-softmmu)"
235      arch: s390x
236      dist: bionic
237      addons:
238        apt_packages:
239          - libaio-dev
240          - libattr1-dev
241          - libcacard-dev
242          - libcap-ng-dev
243          - libgnutls28-dev
244          - libiscsi-dev
245          - liblttng-ust-dev
246          - liblzo2-dev
247          - libncurses-dev
248          - libnfs-dev
249          - libpixman-1-dev
250          - libsdl2-dev
251          - libsdl2-image-dev
252          - libseccomp-dev
253          - libsnappy-dev
254          - libzstd-dev
255          - nettle-dev
256          - xfslibs-dev
257          - ninja-build
258          # Tests dependencies
259          - genisoimage
260      env:
261        - CONFIG="--disable-containers --audio-drv-list=sdl --disable-user
262                  --target-list-exclude=${MAIN_SOFTMMU_TARGETS}"
263
264    - name: "[s390x] GCC (user)"
265      arch: s390x
266      dist: bionic
267      addons:
268        apt_packages:
269          - libgcrypt20-dev
270          - libgnutls28-dev
271          - ninja-build
272      env:
273        - CONFIG="--disable-containers --disable-system"
274
275    - name: "[s390x] Clang (disable-tcg)"
276      arch: s390x
277      dist: bionic
278      compiler: clang
279      addons:
280        apt_packages:
281          - libaio-dev
282          - libattr1-dev
283          - libbrlapi-dev
284          - libcacard-dev
285          - libcap-ng-dev
286          - libgcrypt20-dev
287          - libgnutls28-dev
288          - libgtk-3-dev
289          - libiscsi-dev
290          - liblttng-ust-dev
291          - libncurses5-dev
292          - libnfs-dev
293          - libpixman-1-dev
294          - libpng-dev
295          - librados-dev
296          - libsdl2-dev
297          - libseccomp-dev
298          - liburcu-dev
299          - libusb-1.0-0-dev
300          - libvdeplug-dev
301          - libvte-2.91-dev
302          - ninja-build
303      env:
304        - TEST_CMD="make check-unit"
305        - CONFIG="--disable-containers --disable-tcg --enable-kvm
306                  --disable-tools --host-cc=clang --cxx=clang++"
307        - UNRELIABLE=true
308