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