xref: /openbmc/qemu/.travis.yml (revision 1141159c)
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
19# The channel name "irc.oftc.net#qemu" is encrypted against qemu/qemu
20# to prevent IRC notifications from forks. This was created using:
21# $ travis encrypt -r "qemu/qemu" "irc.oftc.net#qemu"
22notifications:
23  irc:
24    channels:
25      - secure: "F7GDRgjuOo5IUyRLqSkmDL7kvdU4UcH3Lm/W2db2JnDHTGCqgEdaYEYKciyCLZ57vOTsTsOgesN8iUT7hNHBd1KWKjZe9KDTZWppWRYVwAwQMzVeSOsbbU4tRoJ6Pp+3qhH1Z0eGYR9ZgKYAoTumDFgSAYRp4IscKS8jkoedOqM="
26    on_success: change
27    on_failure: always
28
29
30env:
31  global:
32    - SRC_DIR=".."
33    - BUILD_DIR="build"
34    - BASE_CONFIG="--disable-docs --disable-tools"
35    - TEST_BUILD_CMD=""
36    - TEST_CMD="make check V=1"
37    # This is broadly a list of "mainline" softmmu targets which have support across the major distros
38    - MAIN_SOFTMMU_TARGETS="aarch64-softmmu,mips64-softmmu,ppc64-softmmu,riscv64-softmmu,s390x-softmmu,x86_64-softmmu"
39    - CCACHE_SLOPPINESS="include_file_ctime,include_file_mtime"
40    - CCACHE_MAXSIZE=1G
41    - G_MESSAGES_DEBUG=error
42
43
44git:
45  # we want to do this ourselves
46  submodules: false
47
48# Common first phase for all steps
49# We no longer use nproc to calculate jobs:
50# https://travis-ci.community/t/nproc-reports-32-cores-on-arm64/5851
51before_install:
52  - if command -v ccache ; then ccache --zero-stats ; fi
53  - export JOBS=3
54  - echo "=== Using ${JOBS} simultaneous jobs ==="
55
56# Configure step - may be overridden
57before_script:
58  - mkdir -p ${BUILD_DIR} && cd ${BUILD_DIR}
59  - ${SRC_DIR}/configure ${BASE_CONFIG} ${CONFIG} || { cat config.log meson-logs/meson-log.txt && exit 1; }
60
61# Main build & test - rarely overridden - controlled by TEST_CMD
62script:
63  - BUILD_RC=0 && make -j${JOBS} || BUILD_RC=$?
64  - |
65    if [ "$BUILD_RC" -eq 0 ] && [ -n "$TEST_BUILD_CMD" ]; then
66        ${TEST_BUILD_CMD} || BUILD_RC=$?
67    else
68        $(exit $BUILD_RC);
69    fi
70  - |
71    if [ "$BUILD_RC" -eq 0 ] ; then
72        ${TEST_CMD} ;
73    else
74        $(exit $BUILD_RC);
75    fi
76after_script:
77  - df -h
78  - if command -v ccache ; then ccache --show-stats ; fi
79
80
81jobs:
82  include:
83
84    - name: "[aarch64] GCC check-tcg"
85      arch: arm64
86      dist: focal
87      addons:
88        apt_packages:
89          - libaio-dev
90          - libattr1-dev
91          - libbrlapi-dev
92          - libcacard-dev
93          - libcap-ng-dev
94          - libfdt-dev
95          - libgcrypt20-dev
96          - libgnutls28-dev
97          - libgtk-3-dev
98          - libiscsi-dev
99          - liblttng-ust-dev
100          - libncurses5-dev
101          - libnfs-dev
102          - libpixman-1-dev
103          - libpng-dev
104          - librados-dev
105          - libsdl2-dev
106          - libseccomp-dev
107          - liburcu-dev
108          - libusb-1.0-0-dev
109          - libvdeplug-dev
110          - libvte-2.91-dev
111          - ninja-build
112          # Tests dependencies
113          - genisoimage
114      env:
115        - TEST_CMD="make check check-tcg V=1"
116        - CONFIG="--disable-containers --enable-fdt=system
117                  --target-list=${MAIN_SOFTMMU_TARGETS} --cxx=/bin/false"
118        - UNRELIABLE=true
119
120    - name: "[ppc64] GCC check-tcg"
121      arch: ppc64le
122      dist: focal
123      addons:
124        apt_packages:
125          - libaio-dev
126          - libattr1-dev
127          - libbrlapi-dev
128          - libcacard-dev
129          - libcap-ng-dev
130          - libfdt-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 --enable-fdt=system
153                  --target-list=ppc64-softmmu,ppc64le-linux-user"
154
155    - name: "[s390x] GCC check-tcg"
156      arch: s390x
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          - libfdt-dev
166          - libgcrypt20-dev
167          - libgnutls28-dev
168          - libgtk-3-dev
169          - libiscsi-dev
170          - liblttng-ust-dev
171          - libncurses5-dev
172          - libnfs-dev
173          - libpixman-1-dev
174          - libpng-dev
175          - librados-dev
176          - libsdl2-dev
177          - libseccomp-dev
178          - liburcu-dev
179          - libusb-1.0-0-dev
180          - libvdeplug-dev
181          - libvte-2.91-dev
182          - ninja-build
183          # Tests dependencies
184          - genisoimage
185      env:
186        - TEST_CMD="make check check-tcg V=1"
187        - CONFIG="--disable-containers --enable-fdt=system
188                  --target-list=${MAIN_SOFTMMU_TARGETS},s390x-linux-user"
189        - UNRELIABLE=true
190      script:
191        - BUILD_RC=0 && make -j${JOBS} || BUILD_RC=$?
192        - |
193          if [ "$BUILD_RC" -eq 0 ] ; then
194              mv pc-bios/s390-ccw/*.img qemu-bundle/usr/local/share/qemu ;
195              ${TEST_CMD} ;
196          else
197              $(exit $BUILD_RC);
198          fi
199
200    - name: "[s390x] GCC (other-softmmu)"
201      arch: s390x
202      dist: focal
203      addons:
204        apt_packages:
205          - libaio-dev
206          - libattr1-dev
207          - libcacard-dev
208          - libcap-ng-dev
209          - libfdt-dev
210          - libgnutls28-dev
211          - libiscsi-dev
212          - liblttng-ust-dev
213          - liblzo2-dev
214          - libncurses-dev
215          - libnfs-dev
216          - libpixman-1-dev
217          - libsdl2-dev
218          - libsdl2-image-dev
219          - libseccomp-dev
220          - libsnappy-dev
221          - libzstd-dev
222          - nettle-dev
223          - xfslibs-dev
224          - ninja-build
225          # Tests dependencies
226          - genisoimage
227      env:
228        - CONFIG="--disable-containers --enable-fdt=system --audio-drv-list=sdl
229                  --disable-user --target-list-exclude=${MAIN_SOFTMMU_TARGETS}"
230
231    - name: "[s390x] GCC (user)"
232      arch: s390x
233      dist: focal
234      addons:
235        apt_packages:
236          - libgcrypt20-dev
237          - libglib2.0-dev
238          - libgnutls28-dev
239          - ninja-build
240          - flex
241          - bison
242      env:
243        - CONFIG="--disable-containers --disable-system"
244
245    - name: "[s390x] Clang (disable-tcg)"
246      arch: s390x
247      dist: focal
248      compiler: clang-10
249      addons:
250        apt_packages:
251          - libaio-dev
252          - libattr1-dev
253          - libbrlapi-dev
254          - libcacard-dev
255          - libcap-ng-dev
256          - libfdt-dev
257          - libgcrypt20-dev
258          - libgnutls28-dev
259          - libgtk-3-dev
260          - libiscsi-dev
261          - liblttng-ust-dev
262          - libncurses5-dev
263          - libnfs-dev
264          - libpixman-1-dev
265          - libpng-dev
266          - librados-dev
267          - libsdl2-dev
268          - libseccomp-dev
269          - liburcu-dev
270          - libusb-1.0-0-dev
271          - libvdeplug-dev
272          - libvte-2.91-dev
273          - ninja-build
274          - clang-10
275      env:
276        - TEST_CMD="make check-unit"
277        - CONFIG="--disable-containers --disable-tcg --enable-kvm --disable-tools
278                  --enable-fdt=system --host-cc=clang --cxx=clang++"
279        - UNRELIABLE=true
280