gitlab: enable check-tcg for linux-user tests
[qemu.git] / .gitlab-ci.yml
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)
4 stages:
5   - containers
6   - containers-layer2
7   - containers-layer3
8   - build
9   - test
10
11 include:
12   - local: '/.gitlab-ci.d/edk2.yml'
13   - local: '/.gitlab-ci.d/opensbi.yml'
14   - local: '/.gitlab-ci.d/containers.yml'
15
16 .native_build_job_template: &native_build_job_definition
17   stage: build
18   image: $CI_REGISTRY_IMAGE/qemu/$IMAGE:latest
19   before_script:
20     - JOBS=$(expr $(nproc) + 1)
21   script:
22     - mkdir build
23     - cd build
24     - if test -n "$TARGETS";
25       then
26         ../configure --enable-werror $CONFIGURE_ARGS --target-list="$TARGETS" ;
27       else
28         ../configure --enable-werror $CONFIGURE_ARGS ;
29       fi
30     - make -j"$JOBS"
31     - if test -n "$MAKE_CHECK_ARGS";
32       then
33         make $MAKE_CHECK_ARGS ;
34       fi
35
36 .native_test_job_template: &native_test_job_definition
37   stage: test
38   image: $CI_REGISTRY_IMAGE/qemu/$IMAGE:latest
39   script:
40     - cd build
41     - find . -type f -exec touch {} +
42     - make $MAKE_CHECK_ARGS
43
44 .post_acceptance_template: &post_acceptance
45   after_script:
46     - cd build
47     - 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
48     - du -chs $HOME/avocado/data/cache
49
50 build-system-ubuntu-main:
51   <<: *native_build_job_definition
52   variables:
53     IMAGE: ubuntu2004
54     TARGETS: aarch64-softmmu alpha-softmmu cris-softmmu hppa-softmmu lm32-softmmu
55       moxie-softmmu microblazeel-softmmu mips64el-softmmu m68k-softmmu ppc-softmmu
56       riscv64-softmmu sparc-softmmu
57   artifacts:
58     paths:
59       - build
60
61 check-system-ubuntu-main:
62   <<: *native_test_job_definition
63   needs:
64     - job: build-system-ubuntu-main
65       artifacts: true
66   variables:
67     IMAGE: ubuntu2004
68     MAKE_CHECK_ARGS: check
69
70 acceptance-system-ubuntu-main:
71   <<: *native_test_job_definition
72   needs:
73     - job: build-system-ubuntu-main
74       artifacts: true
75   variables:
76     IMAGE: ubuntu2004
77     MAKE_CHECK_ARGS: check-acceptance
78   <<: *post_acceptance
79
80 build-system-fedora-alt:
81   <<: *native_build_job_definition
82   variables:
83     IMAGE: fedora
84     TARGETS: tricore-softmmu unicore32-softmmu microblaze-softmmu mips-softmmu
85       riscv32-softmmu s390x-softmmu sh4-softmmu sparc64-softmmu x86_64-softmmu
86       xtensa-softmmu nios2-softmmu or1k-softmmu
87   artifacts:
88     paths:
89       - build
90
91 check-system-fedora-alt:
92   <<: *native_test_job_definition
93   needs:
94     - job: build-system-fedora-alt
95       artifacts: true
96   variables:
97     IMAGE: fedora
98     MAKE_CHECK_ARGS: check
99
100 acceptance-system-fedora-alt:
101   <<: *native_test_job_definition
102   needs:
103     - job: build-system-fedora-alt
104       artifacts: true
105   variables:
106     IMAGE: fedora
107     MAKE_CHECK_ARGS: check-acceptance
108   <<: *post_acceptance
109
110 build-disabled:
111   <<: *native_build_job_definition
112   variables:
113     IMAGE: fedora
114     CONFIGURE_ARGS: --disable-rdma --disable-slirp --disable-curl
115       --disable-capstone --disable-live-block-migration --disable-glusterfs
116       --disable-replication --disable-coroutine-pool --disable-smartcard
117       --disable-guest-agent --disable-curses --disable-libxml2 --disable-tpm
118       --disable-qom-cast-debug --disable-spice --disable-vhost-vsock
119       --disable-vhost-net --disable-vhost-crypto --disable-vhost-user
120     TARGETS: i386-softmmu ppc64-softmmu mips64-softmmu i386-linux-user
121     MAKE_CHECK_ARGS: check-qtest SPEED=slow
122
123 build-tcg-disabled:
124   <<: *native_build_job_definition
125   variables:
126     IMAGE: centos8
127   script:
128     - mkdir build
129     - cd build
130     - ../configure --disable-tcg --audio-drv-list=""
131     - make -j"$JOBS"
132     - make check-unit
133     - make check-qapi-schema
134     - cd tests/qemu-iotests/
135     - ./check -raw 001 002 003 004 005 008 009 010 011 012 021 025 032 033 048
136             052 063 077 086 101 104 106 113 148 150 151 152 157 159 160 163
137             170 171 183 184 192 194 197 208 215 221 222 226 227 236 253 277
138     - ./check -qcow2 028 051 056 057 058 065 067 068 082 085 091 095 096 102 122
139             124 132 139 142 144 145 151 152 155 157 165 194 196 197 200 202
140             208 209 215 216 218 222 227 234 246 247 248 250 254 255 257 258
141             260 261 262 263 264 270 272 273 277 279
142
143 build-user:
144   <<: *native_build_job_definition
145   variables:
146     IMAGE: debian-all-test-cross
147     CONFIGURE_ARGS: --disable-tools --disable-system
148     MAKE_CHECK_ARGS: check-tcg
149
150 build-clang:
151   <<: *native_build_job_definition
152   variables:
153     IMAGE: fedora
154     CONFIGURE_ARGS: --cc=clang --cxx=clang++
155     TARGETS: alpha-softmmu arm-softmmu m68k-softmmu mips64-softmmu
156       ppc-softmmu s390x-softmmu x86_64-softmmu arm-linux-user
157     MAKE_CHECK_ARGS: check
158
159 build-tci:
160   <<: *native_build_job_definition
161   variables:
162     IMAGE: fedora
163   script:
164     - TARGETS="aarch64 alpha arm hppa m68k microblaze moxie ppc64 s390x x86_64"
165     - mkdir build
166     - cd build
167     - ../configure --enable-tcg-interpreter
168         --target-list="$(for tg in $TARGETS; do echo -n ${tg}'-softmmu '; done)"
169     - make -j"$JOBS"
170     - make run-tcg-tests-x86_64-softmmu
171     - make tests/qtest/boot-serial-test tests/qtest/cdrom-test tests/qtest/pxe-test
172     - for tg in $TARGETS ; do
173         export QTEST_QEMU_BINARY="${tg}-softmmu/qemu-system-${tg}" ;
174         ./tests/qtest/boot-serial-test || exit 1 ;
175         ./tests/qtest/cdrom-test || exit 1 ;
176       done
177     - QTEST_QEMU_BINARY="x86_64-softmmu/qemu-system-x86_64" ./tests/qtest/pxe-test
178     - QTEST_QEMU_BINARY="s390x-softmmu/qemu-system-s390x" ./tests/qtest/pxe-test -m slow