1 # Currently we have two build stages after our containers are built:
2 # - build (for traditional build and test or first stage build)
3 # - test (for test stages, using build artefacts from a build stage)
11 # We assume GitLab has it's own caching set up for RPM/APT repositories so we
12 # just take care of avocado assets here.
15 - $HOME/avocado/data/cache
18 - local: '/.gitlab-ci.d/edk2.yml'
19 - local: '/.gitlab-ci.d/opensbi.yml'
20 - local: '/.gitlab-ci.d/containers.yml'
22 .native_build_job_template: &native_build_job_definition
24 image: $CI_REGISTRY_IMAGE/qemu/$IMAGE:latest
26 - JOBS=$(expr $(nproc) + 1)
30 - if test -n "$TARGETS";
32 ../configure --enable-werror $CONFIGURE_ARGS --target-list="$TARGETS" ;
34 ../configure --enable-werror $CONFIGURE_ARGS ;
37 - if test -n "$MAKE_CHECK_ARGS";
39 make -j"$JOBS" $MAKE_CHECK_ARGS ;
42 .native_test_job_template: &native_test_job_definition
44 image: $CI_REGISTRY_IMAGE/qemu/$IMAGE:latest
47 - find . -type f -exec touch {} +
48 - make $MAKE_CHECK_ARGS
50 .post_acceptance_template: &post_acceptance
53 - python3 -c 'import json; r = json.load(open("tests/results/latest/results.json")); [print(t["logfile"]) for t in r["tests"] if t["status"] not in ("PASS", "SKIP")]' | xargs cat
54 - du -chs $HOME/avocado/data/cache
56 build-system-ubuntu-main:
57 <<: *native_build_job_definition
60 TARGETS: aarch64-softmmu alpha-softmmu cris-softmmu hppa-softmmu lm32-softmmu
61 moxie-softmmu microblazeel-softmmu mips64el-softmmu m68k-softmmu ppc-softmmu
62 riscv64-softmmu sparc-softmmu
63 MAKE_CHECK_ARGS: check-build
68 check-system-ubuntu-main:
69 <<: *native_test_job_definition
71 - job: build-system-ubuntu-main
75 MAKE_CHECK_ARGS: check
77 acceptance-system-ubuntu-main:
78 <<: *native_test_job_definition
80 - job: build-system-ubuntu-main
84 MAKE_CHECK_ARGS: check-acceptance
87 build-system-fedora-alt:
88 <<: *native_build_job_definition
91 TARGETS: tricore-softmmu unicore32-softmmu microblaze-softmmu mips-softmmu
92 riscv32-softmmu s390x-softmmu sh4-softmmu sparc64-softmmu x86_64-softmmu
93 xtensa-softmmu nios2-softmmu or1k-softmmu
94 MAKE_CHECK_ARGS: check-build
99 check-system-fedora-alt:
100 <<: *native_test_job_definition
102 - job: build-system-fedora-alt
106 MAKE_CHECK_ARGS: check
108 acceptance-system-fedora-alt:
109 <<: *native_test_job_definition
111 - job: build-system-fedora-alt
115 MAKE_CHECK_ARGS: check-acceptance
119 <<: *native_build_job_definition
122 CONFIGURE_ARGS: --disable-rdma --disable-slirp --disable-curl
123 --disable-capstone --disable-live-block-migration --disable-glusterfs
124 --disable-replication --disable-coroutine-pool --disable-smartcard
125 --disable-guest-agent --disable-curses --disable-libxml2 --disable-tpm
126 --disable-qom-cast-debug --disable-spice --disable-vhost-vsock
127 --disable-vhost-net --disable-vhost-crypto --disable-vhost-user
128 TARGETS: i386-softmmu ppc64-softmmu mips64-softmmu i386-linux-user
129 MAKE_CHECK_ARGS: check-qtest SPEED=slow
132 <<: *native_build_job_definition
138 - ../configure --disable-tcg --audio-drv-list=""
141 - make check-qapi-schema
142 - cd tests/qemu-iotests/
143 - ./check -raw 001 002 003 004 005 008 009 010 011 012 021 025 032 033 048
144 052 063 077 086 101 104 106 113 148 150 151 152 157 159 160 163
145 170 171 183 184 192 194 197 208 215 221 222 226 227 236 253 277
146 - ./check -qcow2 028 051 056 057 058 065 067 068 082 085 091 095 096 102 122
147 124 132 139 142 144 145 151 152 155 157 165 194 196 197 200 202
148 208 209 215 216 218 222 227 234 246 247 248 250 254 255 257 258
149 260 261 262 263 264 270 272 273 277 279
152 <<: *native_build_job_definition
154 IMAGE: debian-all-test-cross
155 CONFIGURE_ARGS: --disable-tools --disable-system
156 MAKE_CHECK_ARGS: check-tcg
159 <<: *native_build_job_definition
162 CONFIGURE_ARGS: --cc=clang --cxx=clang++
163 TARGETS: alpha-softmmu arm-softmmu m68k-softmmu mips64-softmmu
164 ppc-softmmu s390x-softmmu arm-linux-user
165 MAKE_CHECK_ARGS: check
168 <<: *native_build_job_definition
172 - mkdir build-oss-fuzz
173 - CC="clang" CXX="clang++" CFLAGS="-fsanitize=address"
174 ./scripts/oss-fuzz/build.sh
175 - for fuzzer in $(find ./build-oss-fuzz/DEST_DIR/ -executable -type f
177 grep "LLVMFuzzerTestOneInput" ${fuzzer} > /dev/null 2>&1 || continue ;
178 echo Testing ${fuzzer} ... ;
179 ASAN_OPTIONS="fast_unwind_on_malloc=0"
180 "${fuzzer}" -runs=1000 -seed=1 || exit 1 ;
184 <<: *native_build_job_definition
188 - TARGETS="aarch64 alpha arm hppa m68k microblaze moxie ppc64 s390x x86_64"
191 - ../configure --enable-tcg-interpreter
192 --target-list="$(for tg in $TARGETS; do echo -n ${tg}'-softmmu '; done)"
194 - make run-tcg-tests-x86_64-softmmu
195 - make tests/qtest/boot-serial-test tests/qtest/cdrom-test tests/qtest/pxe-test
196 - for tg in $TARGETS ; do
197 export QTEST_QEMU_BINARY="${tg}-softmmu/qemu-system-${tg}" ;
198 ./tests/qtest/boot-serial-test || exit 1 ;
199 ./tests/qtest/cdrom-test || exit 1 ;
201 - QTEST_QEMU_BINARY="x86_64-softmmu/qemu-system-x86_64" ./tests/qtest/pxe-test
202 - QTEST_QEMU_BINARY="s390x-softmmu/qemu-system-s390x" ./tests/qtest/pxe-test -m slow