gitlab-ci: Add needs: for x86 buster docker image
[mesa.git] / .gitlab-ci.yml
1 # This is the tag of the docker image used for the build jobs. If the
2 # image doesn't exist yet, the containers stage generates it.
3 #
4 # In order to generate a new image, one should generally change the tag.
5 # While removing the image from the registry would also work, that's not
6 # recommended except for ephemeral images during development: Replacing
7 # an image after a significant amount of time might pull in newer
8 # versions of gcc/clang or other packages, which might break the build
9 # with older commits using the same tag.
10 #
11 # After merging a change resulting in generating a new image to the
12 # main repository, it's recommended to remove the image from the source
13 # repository's container registry, so that the image from the main
14 # repository's registry will be used there as well.
15 variables:
16 UPSTREAM_REPO: mesa/mesa
17 DEBIAN_TAG: "2019-09-18"
18 DEBIAN_ARM64_TAG: "arm64v8-2019-08-09"
19 STRETCH_TAG: "2019-09-18"
20 DEBIAN_VERSION: buster-slim
21 STRETCH_VERSION: stretch-slim
22 DEBIAN_IMAGE: "$CI_REGISTRY_IMAGE/debian/$DEBIAN_VERSION:$DEBIAN_TAG"
23 DEBIAN_ARM64_IMAGE: "$CI_REGISTRY_IMAGE/debian/$DEBIAN_VERSION:$DEBIAN_ARM64_TAG"
24 STRETCH_IMAGE: "$CI_REGISTRY_IMAGE/debian/$STRETCH_VERSION:$STRETCH_TAG"
25
26 include:
27 - project: 'wayland/ci-templates'
28 ref: 1f7f57c64ff4ebbf7292e3b7a13600518b8cb24c
29 file: '/templates/debian.yml'
30
31 stages:
32 - containers
33 - build
34 - test
35
36
37 # When to automatically run the CI
38 .ci-run-policy:
39 only:
40 - branches@mesa/mesa
41 - merge_requests
42 - /^ci([-/].*)?$/
43 retry:
44 max: 2
45 when:
46 - runner_system_failure
47
48 .ci-deqp-artifacts:
49 artifacts:
50 when: always
51 untracked: false
52 paths:
53 # Watch out! Artifacts are relative to the build dir.
54 # https://gitlab.com/gitlab-org/gitlab-ce/commit/8788fb925706cad594adf6917a6c5f6587dd1521
55 - artifacts
56
57 # Build the normal CI native and cross-build docker images.
58
59 debian-10:
60 extends:
61 - .debian@container-ifnot-exists
62 - .ci-run-policy
63 stage: containers
64 variables:
65 GIT_STRATEGY: none # no need to pull the whole tree for rebuilding the image
66 DEBIAN_EXEC: 'bash .gitlab-ci/debian-install.sh'
67
68 debian-9:
69 extends: debian-10
70 variables:
71 DEBIAN_TAG: $STRETCH_TAG
72 DEBIAN_VERSION: $STRETCH_VERSION
73 DEBIAN_IMAGE: $STRETCH_IMAGE
74 DEBIAN_EXEC: 'bash .gitlab-ci/debian-stretch-install.sh'
75
76 .use-debian-9:
77 image: $STRETCH_IMAGE
78 needs:
79 - debian-9
80
81 # Builds a Docker image with the native environment and VK-GL-CTS for testing.
82 test-container:arm64:
83 extends:
84 - .debian@container-ifnot-exists@arm64v8
85 - .ci-run-policy
86 stage: containers
87 variables:
88 DEBIAN_TAG: "$DEBIAN_ARM64_TAG"
89 GIT_STRATEGY: none # no need to pull the whole tree for rebuilding the image
90 DEBIAN_EXEC: 'bash .gitlab-ci/debian-test-install.sh'
91
92 # BUILD
93
94 .build:
95 extends: .ci-run-policy
96 image: $DEBIAN_IMAGE
97 needs:
98 - debian-10
99 stage: build
100 cache:
101 paths:
102 - ccache
103 artifacts:
104 when: always
105 paths:
106 - _build/meson-logs/*.txt
107 # scons:
108 - build/*/config.log
109 - shader-db
110 variables:
111 CCACHE_COMPILERCHECK: "content"
112 # Use ccache transparently, and print stats before/after
113 before_script:
114 - export PATH="/usr/lib/ccache:$PATH"
115 - export CCACHE_BASEDIR="$PWD"
116 - export CCACHE_DIR="$PWD/ccache"
117 - ccache --zero-stats || true
118 - ccache --show-stats || true
119 after_script:
120 # In case the install dir is being saved as artifacts, tar it up
121 # so that symlinks and hardlinks aren't each packed separately in
122 # the zip file.
123 - if [ -d install ]; then
124 tar -cf artifacts/install.tar install;
125 fi
126 - export CCACHE_DIR="$PWD/ccache"
127 - ccache --show-stats
128
129 .meson-build:
130 extends: .build
131 script:
132 - .gitlab-ci/meson-build.sh
133
134 .scons-build:
135 extends: .build
136 variables:
137 SCONSFLAGS: "-j4"
138 script:
139 - .gitlab-ci/scons-build.sh
140
141 meson-main:
142 extends:
143 - .meson-build
144 - .ci-deqp-artifacts
145 variables:
146 UNWIND: "true"
147 DRI_LOADERS: >
148 -D glx=dri
149 -D gbm=true
150 -D egl=true
151 -D platforms=x11,wayland,drm,surfaceless
152 DRI_DRIVERS: "i915,i965,r100,r200,nouveau"
153 GALLIUM_ST: >
154 -D dri3=true
155 -D gallium-extra-hud=true
156 -D gallium-vdpau=true
157 -D gallium-xvmc=true
158 -D gallium-omx=bellagio
159 -D gallium-va=true
160 -D gallium-xa=true
161 -D gallium-nine=true
162 -D gallium-opencl=disabled
163 GALLIUM_DRIVERS: "iris,nouveau,kmsro,r300,r600,freedreno,swrast,svga,v3d,vc4,virgl,etnaviv,panfrost,lima"
164 LLVM_VERSION: "7"
165 EXTRA_OPTION: >
166 -D osmesa=gallium
167 -D tools=all
168 MESON_SHADERDB: "true"
169 BUILDTYPE: "debugoptimized"
170
171 .meson-cross:
172 extends:
173 - .meson-build
174 - .ci-deqp-artifacts
175 variables:
176 UNWIND: "false"
177 DRI_LOADERS: >
178 -D glx=disabled
179 -D gbm=false
180 -D egl=true
181 -D platforms=surfaceless
182 -D osmesa=none
183 GALLIUM_ST: >
184 -D dri3=false
185 -D gallium-vdpau=false
186 -D gallium-xvmc=false
187 -D gallium-omx=disabled
188 -D gallium-va=false
189 -D gallium-xa=false
190 -D gallium-nine=false
191 -D llvm=false
192 script:
193 - .gitlab-ci/meson-build.sh
194
195 meson-armhf:
196 extends: .meson-cross
197 variables:
198 CROSS: armhf
199 VULKAN_DRIVERS: freedreno
200 GALLIUM_DRIVERS: "etnaviv,freedreno,kmsro,lima,nouveau,panfrost,tegra,v3d,vc4"
201 # Disable the tests since we're cross compiling.
202 EXTRA_OPTION: >
203 -D build-tests=false
204 -D I-love-half-baked-turnips=true
205 -D vulkan-overlay-layer=true
206
207 meson-arm64:
208 extends: meson-armhf
209 variables:
210 CROSS: arm64
211 BUILDTYPE: "debugoptimized"
212
213 # NOTE: Building SWR is 2x (yes two) times slower than all the other
214 # gallium drivers combined.
215 # Start this early so that it doesn't limit the total run time.
216 #
217 # We also stick the glvnd build here, since we want non-glvnd in
218 # meson-main for actual driver CI.
219 meson-swr-glvnd:
220 extends: .meson-build
221 variables:
222 UNWIND: "true"
223 DRI_LOADERS: >
224 -D glvnd=true
225 -D egl=true
226 GALLIUM_ST: >
227 -D dri3=true
228 -D gallium-vdpau=false
229 -D gallium-xvmc=false
230 -D gallium-omx=disabled
231 -D gallium-va=false
232 -D gallium-xa=false
233 -D gallium-nine=false
234 -D gallium-opencl=disabled
235 GALLIUM_DRIVERS: "swr,iris"
236 LLVM_VERSION: "6.0"
237
238 meson-clang:
239 extends: .meson-build
240 variables:
241 UNWIND: "true"
242 DRI_DRIVERS: "auto"
243 GALLIUM_DRIVERS: "auto"
244 VULKAN_DRIVERS: intel,amd,freedreno
245 CC: "ccache clang-8"
246 CXX: "ccache clang++-8"
247
248 scons-swr:
249 extends: .scons-build
250 variables:
251 SCONS_TARGET: "swr=1"
252 SCONS_CHECK_COMMAND: "true"
253 LLVM_VERSION: "6.0"
254
255 scons-win64:
256 extends: .scons-build
257 variables:
258 SCONS_TARGET: platform=windows machine=x86_64
259 SCONS_CHECK_COMMAND: "true"
260
261 meson-clover:
262 extends: .meson-build
263 variables:
264 UNWIND: "true"
265 DRI_LOADERS: >
266 -D glx=disabled
267 -D egl=false
268 -D gbm=false
269 GALLIUM_ST: >
270 -D dri3=false
271 -D gallium-vdpau=false
272 -D gallium-xvmc=false
273 -D gallium-omx=disabled
274 -D gallium-va=false
275 -D gallium-xa=false
276 -D gallium-nine=false
277 -D gallium-opencl=icd
278 script:
279 - export GALLIUM_DRIVERS="r600,radeonsi"
280 - .gitlab-ci/meson-build.sh
281 - LLVM_VERSION=8 .gitlab-ci/meson-build.sh
282 - export GALLIUM_DRIVERS="i915,r600"
283 - LLVM_VERSION=6.0 .gitlab-ci/meson-build.sh
284 - LLVM_VERSION=7 .gitlab-ci/meson-build.sh
285
286 meson-clover-old-llvm:
287 extends:
288 - meson-clover
289 - .use-debian-9
290 variables:
291 UNWIND: "false"
292 DRI_LOADERS: >
293 -D glx=disabled
294 -D egl=false
295 -D gbm=false
296 -D platforms=drm,surfaceless
297 GALLIUM_DRIVERS: "i915,r600"
298 script:
299 - LLVM_VERSION=3.9 .gitlab-ci/meson-build.sh
300 - LLVM_VERSION=4.0 .gitlab-ci/meson-build.sh
301 - LLVM_VERSION=5.0 .gitlab-ci/meson-build.sh
302
303 meson-vulkan:
304 extends: .meson-build
305 variables:
306 UNWIND: "false"
307 DRI_LOADERS: >
308 -D glx=disabled
309 -D gbm=false
310 -D egl=false
311 -D platforms=x11,wayland,drm
312 -D osmesa=none
313 GALLIUM_ST: >
314 -D dri3=true
315 -D gallium-vdpau=false
316 -D gallium-xvmc=false
317 -D gallium-omx=disabled
318 -D gallium-va=false
319 -D gallium-xa=false
320 -D gallium-nine=false
321 -D gallium-opencl=disabled
322 VULKAN_DRIVERS: intel,amd,freedreno
323 LLVM_VERSION: "8"
324 EXTRA_OPTION: >
325 -D vulkan-overlay-layer=true
326
327 # While the main point of this build is testing the i386 cross build,
328 # we also use this one to test some other options that are exclusive
329 # with meson-main's choices (classic swrast and osmesa)
330 meson-i386:
331 extends: .meson-cross
332 variables:
333 CROSS: i386
334 VULKAN_DRIVERS: intel
335 DRI_DRIVERS: "swrast"
336 GALLIUM_DRIVERS: "iris"
337 EXTRA_OPTION: >
338 -D vulkan-overlay-layer=true
339 -D llvm=false
340 -D osmesa=classic
341
342 scons:
343 extends: .scons-build
344 variables:
345 SCONS_TARGET: "llvm=1"
346 SCONS_CHECK_COMMAND: "scons llvm=1 check"
347 script:
348 - SCONS_TARGET="" SCONS_CHECK_COMMAND="scons check" .gitlab-ci/scons-build.sh
349 - LLVM_VERSION=6.0 .gitlab-ci/scons-build.sh
350 - LLVM_VERSION=7 .gitlab-ci/scons-build.sh
351 - LLVM_VERSION=8 .gitlab-ci/scons-build.sh
352
353 scons-old-llvm:
354 extends:
355 - scons
356 - .use-debian-9
357 script:
358 - LLVM_VERSION=3.9 .gitlab-ci/scons-build.sh
359 - LLVM_VERSION=4.0 .gitlab-ci/scons-build.sh
360 - LLVM_VERSION=5.0 .gitlab-ci/scons-build.sh
361
362 .deqp-test:
363 extends: .ci-run-policy
364 stage: test
365 image: $DEBIAN_IMAGE
366 variables:
367 GIT_STRATEGY: none # testing doesn't build anything from source
368 DEQP_SKIPS: deqp-default-skips.txt
369 script:
370 # Note: Build dir (and thus install) may be dirty due to GIT_STRATEGY
371 - rm -rf install
372 - tar -xf artifacts/install.tar
373 - ./artifacts/deqp-runner.sh
374 artifacts:
375 when: on_failure
376 name: "$CI_JOB_NAME-$CI_COMMIT_REF_NAME"
377 paths:
378 - results/
379 dependencies:
380 - meson-main
381 needs: [meson-main]
382
383 test-llvmpipe-gles2:
384 parallel: 4
385 variables:
386 DEQP_VER: gles2
387 DEQP_EXPECTED_FAILS: deqp-llvmpipe-fails.txt
388 LIBGL_ALWAYS_SOFTWARE: "true"
389 DEQP_RENDERER_MATCH: "llvmpipe"
390 extends: .deqp-test
391
392 test-softpipe-gles2:
393 extends: test-llvmpipe-gles2
394 variables:
395 DEQP_EXPECTED_FAILS: deqp-softpipe-fails.txt
396 DEQP_RENDERER_MATCH: "softpipe"
397 GALLIUM_DRIVER: "softpipe"
398
399 # The GLES2 CTS run takes about 8 minutes of CPU time, while GLES3 is
400 # 25 minutes. Until we can get its runtime down, just do a partial
401 # (every 10 tests) run.
402 test-softpipe-gles3-limited:
403 variables:
404 DEQP_VER: gles3
405 DEQP_EXPECTED_FAILS: deqp-softpipe-fails.txt
406 LIBGL_ALWAYS_SOFTWARE: "true"
407 DEQP_RENDERER_MATCH: "softpipe"
408 GALLIUM_DRIVER: "softpipe"
409 CI_NODE_INDEX: 1
410 CI_NODE_TOTAL: 10
411 extends: .deqp-test
412
413 arm64_a630_gles2:
414 extends: .deqp-test
415 image: $DEBIAN_ARM64_IMAGE
416 variables:
417 DEQP_VER: gles2
418 DEQP_RENDERER_MATCH: "FD630"
419 DEQP_EXPECTED_FAILS: deqp-freedreno-a630-fails.txt
420 DEQP_SKIPS: deqp-freedreno-a630-skips.txt
421 NIR_VALIDATE: 0
422 tags:
423 - mesa-cheza
424 dependencies:
425 - meson-arm64
426 needs: [ meson-arm64 ]
427
428 arm64_a630_gles31:
429 extends: arm64_a630_gles2
430 parallel: 4
431 variables:
432 DEQP_VER: gles31
433
434 arm64_a630_gles3:
435 parallel: 6
436 extends: arm64_a630_gles2
437 variables:
438 DEQP_VER: gles3
439
440 arm64_a306_gles2:
441 parallel: 4
442 extends: arm64_a630_gles2
443 variables:
444 DEQP_EXPECTED_FAILS: deqp-freedreno-a307-fails.txt
445 DEQP_SKIPS: deqp-default-skips.txt
446 DEQP_RENDERER_MATCH: "FD307"
447 tags:
448 - db410c