qemu-option: Simplify around find_default_by_name()
[qemu.git] / .gitlab-ci.yml
1 include:
2   - local: '/.gitlab-ci.d/edk2.yml'
3   - local: '/.gitlab-ci.d/opensbi.yml'
4
5 .update_apt_template: &before_script_apt
6  before_script:
7   - apt-get update -qq
8   - apt-get install -y -qq git gcc libglib2.0-dev libpixman-1-dev make
9         genisoimage
10   - JOBS=$(expr $(nproc) + 1)
11
12 .update_dnf_template: &before_script_dnf
13  before_script:
14   - dnf update -y
15   - dnf install -y bzip2 diffutils gcc git genisoimage findutils glib2-devel
16         make python3 perl-podlators perl-Test-Harness pixman-devel zlib-devel
17   - JOBS=$(expr $(nproc) + 1)
18
19 build-system1:
20  image: ubuntu:19.10
21  <<: *before_script_apt
22  script:
23  - apt-get install -y -qq libgtk-3-dev libvte-dev nettle-dev libcacard-dev
24       libusb-dev libvde-dev libspice-protocol-dev libgl1-mesa-dev libvdeplug-dev
25  - mkdir build
26  - cd build
27  - ../configure --enable-werror --target-list="aarch64-softmmu alpha-softmmu
28       cris-softmmu hppa-softmmu lm32-softmmu moxie-softmmu microblazeel-softmmu
29       mips64el-softmmu m68k-softmmu ppc-softmmu riscv64-softmmu sparc-softmmu"
30  - make -j"$JOBS"
31  - make -j"$JOBS" check
32
33 build-system2:
34  image: fedora:latest
35  <<: *before_script_dnf
36  script:
37  - yum install -y SDL2-devel libgcrypt-devel brlapi-devel libaio-devel
38        libfdt-devel lzo-devel librdmacm-devel libibverbs-devel libibumad-devel
39        libzstd-devel
40  - mkdir build
41  - cd build
42  - ../configure --enable-werror --target-list="tricore-softmmu unicore32-softmmu
43       microblaze-softmmu mips-softmmu riscv32-softmmu s390x-softmmu sh4-softmmu
44       sparc64-softmmu x86_64-softmmu xtensa-softmmu nios2-softmmu or1k-softmmu"
45  - make -j"$JOBS"
46  - make -j"$JOBS" check
47
48 build-disabled:
49  image: fedora:latest
50  <<: *before_script_dnf
51  script:
52  - mkdir build
53  - cd build
54  - ../configure --enable-werror --disable-rdma --disable-slirp --disable-curl
55       --disable-capstone --disable-live-block-migration --disable-glusterfs
56       --disable-replication --disable-coroutine-pool --disable-smartcard
57       --disable-guest-agent --disable-curses --disable-libxml2 --disable-tpm
58       --disable-qom-cast-debug --disable-spice --disable-vhost-vsock
59       --disable-vhost-net --disable-vhost-crypto --disable-vhost-user
60       --target-list="i386-softmmu ppc64-softmmu mips64-softmmu i386-linux-user"
61  - make -j"$JOBS"
62  - make -j"$JOBS" check-qtest SPEED=slow
63
64 build-tcg-disabled:
65  image: centos:8
66  <<: *before_script_dnf
67  script:
68  - dnf install -y clang gtk3-devel libusbx-devel libgcrypt-devel
69  - mkdir build
70  - cd build
71  - ../configure --cc=clang --enable-werror --disable-tcg --audio-drv-list=""
72  - make -j"$JOBS"
73  - make check-unit
74  - make check-qapi-schema
75  - cd tests/qemu-iotests/
76  - ./check -raw 001 002 003 004 005 008 009 010 011 012 021 025 032 033 048
77             052 063 077 086 101 104 106 113 148 150 151 152 157 159 160 163
78             170 171 183 184 192 194 197 208 215 221 222 226 227 236 253 277
79  - ./check -qcow2 028 051 056 057 058 065 067 068 082 085 091 095 096 102 122
80             124 132 139 142 144 145 151 152 155 157 165 194 196 197 200 202
81             208 209 215 216 218 222 227 234 246 247 248 250 254 255 257 258
82             260 261 262 263 264 270 272 273 277 279
83
84 build-user:
85  <<: *before_script_apt
86  script:
87  - mkdir build
88  - cd build
89  - ../configure --enable-werror --disable-system --disable-guest-agent
90                --disable-capstone --disable-slirp --disable-fdt
91  - make -j"$JOBS"
92  - make run-tcg-tests-i386-linux-user run-tcg-tests-x86_64-linux-user
93
94 build-clang:
95  image: fedora:latest
96  <<: *before_script_dnf
97  script:
98  - yum install -y clang SDL2-devel libattr-devel libcap-ng-devel xfsprogs-devel
99        libiscsi-devel libnfs-devel libseccomp-devel gnutls-devel librbd-devel
100  - mkdir build
101  - cd build
102  - ../configure --cc=clang --cxx=clang++ --enable-werror
103       --target-list="alpha-softmmu arm-softmmu m68k-softmmu mips64-softmmu
104                      ppc-softmmu s390x-softmmu x86_64-softmmu arm-linux-user"
105  - make -j"$JOBS"
106  - make -j"$JOBS" check
107
108 build-tci:
109  image: centos:8
110  <<: *before_script_dnf
111  script:
112  - TARGETS="aarch64 alpha arm hppa m68k microblaze moxie ppc64 s390x x86_64"
113  - mkdir build
114  - cd build
115  - ../configure --enable-tcg-interpreter
116       --target-list="$(for tg in $TARGETS; do echo -n ${tg}'-softmmu '; done)"
117  - make -j"$JOBS"
118  - make run-tcg-tests-x86_64-softmmu
119  - make tests/qtest/boot-serial-test tests/qtest/cdrom-test tests/qtest/pxe-test
120  - for tg in $TARGETS ; do
121      export QTEST_QEMU_BINARY="${tg}-softmmu/qemu-system-${tg}" ;
122      ./tests/qtest/boot-serial-test || exit 1 ;
123      ./tests/qtest/cdrom-test || exit 1 ;
124    done
125  - QTEST_QEMU_BINARY="x86_64-softmmu/qemu-system-x86_64" ./tests/qtest/pxe-test
126  - QTEST_QEMU_BINARY="s390x-softmmu/qemu-system-s390x"
127    ./tests/qtest/pxe-test -m slow