ci: Switch testing on db410c over to LAVA.
[mesa.git] / .gitlab-ci.yml
1 variables:
2 UPSTREAM_REPO: mesa/mesa
3
4 include:
5 - project: 'wayland/ci-templates'
6 ref: b7030c2cd0d6ccc5f6d4f8299bafa4daa9240d71
7 file: '/templates/debian.yml'
8 - local: '.gitlab-ci/lava-gitlab-ci.yml'
9
10 stages:
11 - container
12 - build
13 - test
14 - success
15
16
17 # When to automatically run the CI
18 .ci-run-policy:
19 rules:
20 # Run pipeline by default for merge requests changing files affecting it
21 - if: '$CI_MERGE_REQUEST_SOURCE_BRANCH_NAME == $CI_COMMIT_REF_NAME'
22 changes: &paths
23 - VERSION
24 - bin/**/*
25 # GitLab CI
26 - .gitlab-ci.yml
27 - .gitlab-ci/**/*
28 # Meson
29 - meson*
30 - build-support/**/*
31 - subprojects/**/*
32 # SCons
33 - SConstruct
34 - scons/**/*
35 - common.py
36 # Source code
37 - include/**/*
38 - src/**/*
39 when: on_success
40 # Run pipeline by default in the main project if files affecting it were
41 # changed
42 - if: '$CI_PROJECT_PATH == "mesa/mesa"'
43 changes:
44 *paths
45 when: on_success
46 # Allow triggering jobs manually on branches of forked projects
47 - if: '$CI_PROJECT_PATH != "mesa/mesa" && $CI_MERGE_REQUEST_SOURCE_BRANCH_NAME != $CI_COMMIT_REF_NAME'
48 when: manual
49 # Otherwise, most jobs won't run
50 - when: never
51 retry:
52 max: 2
53 when:
54 - runner_system_failure
55 # Cancel CI run if a newer commit is pushed to the same branch
56 interruptible: true
57
58 success:
59 stage: success
60 image: debian:stable-slim
61 only:
62 - merge_requests
63 except:
64 changes:
65 *paths
66 variables:
67 GIT_STRATEGY: none
68 script:
69 - echo "Dummy job to make sure every merge request pipeline runs at least one job"
70
71
72 .ci-deqp-artifacts:
73 artifacts:
74 when: always
75 untracked: false
76 paths:
77 # Watch out! Artifacts are relative to the build dir.
78 # https://gitlab.com/gitlab-org/gitlab-ce/commit/8788fb925706cad594adf6917a6c5f6587dd1521
79 - artifacts
80
81 # Build the CI docker images.
82 #
83 # DEBIAN_TAG is the tag of the docker image used by later stage jobs. If the
84 # image doesn't exist yet, the container stage job generates it.
85 #
86 # In order to generate a new image, one should generally change the tag.
87 # While removing the image from the registry would also work, that's not
88 # recommended except for ephemeral images during development: Replacing
89 # an image after a significant amount of time might pull in newer
90 # versions of gcc/clang or other packages, which might break the build
91 # with older commits using the same tag.
92 #
93 # After merging a change resulting in generating a new image to the
94 # main repository, it's recommended to remove the image from the source
95 # repository's container registry, so that the image from the main
96 # repository's registry will be used there as well.
97
98 .container:
99 stage: container
100 extends:
101 - .ci-run-policy
102 variables:
103 DEBIAN_VERSION: buster-slim
104 REPO_SUFFIX: $CI_JOB_NAME
105 DEBIAN_EXEC: 'bash .gitlab-ci/container/${CI_JOB_NAME}.sh'
106 # no need to pull the whole repo to build the container image
107 GIT_STRATEGY: none
108
109 # Debian 10 based x86 build image
110 x86_build:
111 extends:
112 - .debian@container-ifnot-exists
113 - .container
114 variables:
115 DEBIAN_TAG: &x86_build "2020-02-15"
116
117 .use-x86_build:
118 variables:
119 TAG: *x86_build
120 image: "$CI_REGISTRY_IMAGE/debian/x86_build:$TAG"
121 needs:
122 - x86_build
123
124 # Debian 10 based x86 test image for GL
125 x86_test-gl:
126 extends: x86_build
127 variables:
128 DEBIAN_TAG: &x86_test-gl "2020-02-14"
129
130 # Debian 10 based x86 test image for VK
131 x86_test-vk:
132 extends: x86_build
133 variables:
134 DEBIAN_TAG: &x86_test-vk "2020-01-14"
135 # Can only be triggered manually on personal branches because RADV is the only
136 # driver that does Vulkan testing at the moment.
137 rules:
138 # Never build the test image for VK by default in the main project.
139 - if: '$CI_PROJECT_PATH == "mesa/mesa"'
140 when: never
141 # Never build the test image for VK by default for merge requests.
142 - if: '$CI_MERGE_REQUEST_SOURCE_BRANCH_NAME == $CI_COMMIT_REF_NAME'
143 when: never
144 # Otherwise, allow building it manually for personal branches.
145 - when: manual
146
147
148 # Debian 9 based x86 build image (old LLVM)
149 x86_build_old:
150 extends: x86_build
151 variables:
152 DEBIAN_TAG: &x86_build_old "2019-09-18"
153 DEBIAN_VERSION: stretch-slim
154
155 .use-x86_build_old:
156 variables:
157 TAG: *x86_build_old
158 image: "$CI_REGISTRY_IMAGE/debian/x86_build_old:$TAG"
159 needs:
160 - x86_build_old
161
162 # Debian 10 based ARM build image
163 arm_build:
164 extends:
165 - .debian@container-ifnot-exists@arm64v8
166 - .container
167 variables:
168 DEBIAN_TAG: &arm_build "2020-02-26"
169
170 .use-arm_build:
171 variables:
172 TAG: *arm_build
173 image: "$CI_REGISTRY_IMAGE/debian/arm_build:$TAG"
174 needs:
175 - arm_build
176
177 # Debian 10 based ARM test image
178 arm_test:
179 extends: arm_build
180 variables:
181 DEBIAN_TAG: &arm_test "2020-01-30"
182
183 .use-arm_test:
184 variables:
185 TAG: *arm_test
186 image: "$CI_REGISTRY_IMAGE/debian/arm_test:$TAG"
187 needs:
188 - meson-arm64
189 - arm_test
190
191
192 # BUILD
193
194 # Shared between windows and Linux
195 .build-common:
196 extends: .ci-run-policy
197 stage: build
198 artifacts:
199 when: always
200 paths:
201 - _build/meson-logs/*.txt
202 # scons:
203 - build/*/config.log
204 - shader-db
205
206 # Just Linux
207 .build-linux:
208 extends: .build-common
209 variables:
210 CCACHE_COMPILERCHECK: "content"
211 CCACHE_COMPRESS: "true"
212 CCACHE_DIR: /cache/mesa/ccache
213 # Use ccache transparently, and print stats before/after
214 before_script:
215 - export PATH="/usr/lib/ccache:$PATH"
216 - export CCACHE_BASEDIR="$PWD"
217 - ccache --show-stats
218 after_script:
219 - ccache --show-stats
220
221 .build-windows:
222 extends: .build-common
223 tags:
224 - mesa-windows
225 cache:
226 key: ${CI_JOB_NAME}
227 paths:
228 - subprojects/packagecache
229
230 .meson-build:
231 extends:
232 - .build-linux
233 - .use-x86_build
234 variables:
235 LLVM_VERSION: 9
236 script:
237 - .gitlab-ci/meson-build.sh
238
239 .scons-build:
240 extends:
241 - .build-linux
242 - .use-x86_build
243 variables:
244 SCONSFLAGS: "-j4"
245 script:
246 - .gitlab-ci/scons-build.sh
247
248 meson-testing:
249 extends:
250 - .meson-build
251 - .ci-deqp-artifacts
252 variables:
253 UNWIND: "true"
254 DRI_LOADERS: >
255 -D glx=dri
256 -D gbm=true
257 -D egl=true
258 -D platforms=x11,drm,surfaceless
259 GALLIUM_ST: >
260 -D dri3=true
261 GALLIUM_DRIVERS: "swrast"
262 VULKAN_DRIVERS: amd
263 BUILDTYPE: "debugoptimized"
264 EXTRA_OPTION: >
265 -D werror=true
266 script:
267 - .gitlab-ci/meson-build.sh
268 - .gitlab-ci/prepare-artifacts.sh
269
270 meson-main:
271 extends: .meson-build
272 variables:
273 UNWIND: "true"
274 DRI_LOADERS: >
275 -D glx=dri
276 -D gbm=true
277 -D egl=true
278 -D platforms=x11,wayland,drm,surfaceless
279 DRI_DRIVERS: "i915,i965,r100,r200,nouveau"
280 GALLIUM_ST: >
281 -D dri3=true
282 -D gallium-extra-hud=true
283 -D gallium-vdpau=true
284 -D gallium-xvmc=true
285 -D gallium-omx=bellagio
286 -D gallium-va=true
287 -D gallium-xa=true
288 -D gallium-nine=true
289 -D gallium-opencl=disabled
290 GALLIUM_DRIVERS: "iris,nouveau,kmsro,r300,r600,freedreno,swr,swrast,svga,v3d,vc4,virgl,etnaviv,panfrost,lima,zink"
291 EXTRA_OPTION: >
292 -D osmesa=gallium
293 -D tools=all
294 script:
295 - .gitlab-ci/meson-build.sh
296 - .gitlab-ci/run-shader-db.sh
297
298 .meson-cross:
299 extends:
300 - .meson-build
301 variables:
302 UNWIND: "false"
303 DRI_LOADERS: >
304 -D glx=disabled
305 -D gbm=false
306 -D egl=true
307 -D platforms=surfaceless
308 -D osmesa=none
309 GALLIUM_ST: >
310 -D dri3=false
311 -D gallium-vdpau=false
312 -D gallium-xvmc=false
313 -D gallium-omx=disabled
314 -D gallium-va=false
315 -D gallium-xa=false
316 -D gallium-nine=false
317 LLVM_VERSION: "8"
318
319 .meson-arm:
320 extends:
321 - .meson-cross
322 - .use-arm_build
323 variables:
324 VULKAN_DRIVERS: freedreno
325 GALLIUM_DRIVERS: "etnaviv,freedreno,kmsro,lima,nouveau,panfrost,swrast,tegra,v3d,vc4"
326 BUILDTYPE: "debugoptimized"
327 tags:
328 - aarch64
329
330 meson-armhf:
331 extends:
332 - .meson-arm
333 - .ci-deqp-artifacts
334 variables:
335 CROSS: armhf
336 LLVM_VERSION: "7"
337 EXTRA_OPTION: >
338 -D llvm=false
339 script:
340 - .gitlab-ci/meson-build.sh
341 - .gitlab-ci/prepare-artifacts.sh
342
343 meson-arm64:
344 extends:
345 - .meson-arm
346 - .ci-deqp-artifacts
347 variables:
348 VULKAN_DRIVERS: "freedreno"
349 EXTRA_OPTION: >
350 -D llvm=false
351 script:
352 - .gitlab-ci/meson-build.sh
353 - .gitlab-ci/prepare-artifacts.sh
354
355 meson-arm64-build-test:
356 extends:
357 - .meson-arm
358 - .ci-deqp-artifacts
359 variables:
360 VULKAN_DRIVERS: "amd"
361 script:
362 - .gitlab-ci/meson-build.sh
363
364 meson-clang:
365 extends: .meson-build
366 variables:
367 UNWIND: "true"
368 DRI_LOADERS: >
369 -D glvnd=true
370 DRI_DRIVERS: "auto"
371 GALLIUM_DRIVERS: "auto"
372 VULKAN_DRIVERS: intel,amd,freedreno
373 CC: "ccache clang-9"
374 CXX: "ccache clang++-9"
375
376 .meson-windows:
377 extends:
378 - .build-windows
379 before_script:
380 - $ENV:ARCH = "x86"
381 - $ENV:VERSION = "2019\Community"
382 script:
383 - cmd /C .gitlab-ci\meson-build.bat
384
385 scons-swr:
386 extends: .scons-build
387 variables:
388 SCONS_TARGET: "swr=1"
389 SCONS_CHECK_COMMAND: "true"
390 LLVM_VERSION: "6.0"
391
392 scons-win64:
393 extends: .scons-build
394 variables:
395 SCONS_TARGET: platform=windows machine=x86_64
396 SCONS_CHECK_COMMAND: "true"
397
398 meson-clover:
399 extends: .meson-build
400 variables:
401 UNWIND: "true"
402 DRI_LOADERS: >
403 -D glx=disabled
404 -D egl=false
405 -D gbm=false
406 GALLIUM_ST: >
407 -D dri3=false
408 -D gallium-vdpau=false
409 -D gallium-xvmc=false
410 -D gallium-omx=disabled
411 -D gallium-va=false
412 -D gallium-xa=false
413 -D gallium-nine=false
414 -D gallium-opencl=icd
415 script:
416 - export GALLIUM_DRIVERS="r600,radeonsi"
417 - .gitlab-ci/meson-build.sh
418 - LLVM_VERSION=8 .gitlab-ci/meson-build.sh
419 - export GALLIUM_DRIVERS="i915,r600"
420 - LLVM_VERSION=6.0 .gitlab-ci/meson-build.sh
421 - LLVM_VERSION=7 .gitlab-ci/meson-build.sh
422
423 meson-clover-old-llvm:
424 extends:
425 - meson-clover
426 - .use-x86_build_old
427 variables:
428 UNWIND: "false"
429 DRI_LOADERS: >
430 -D glx=disabled
431 -D egl=false
432 -D gbm=false
433 -D platforms=drm,surfaceless
434 GALLIUM_DRIVERS: "i915,r600"
435 script:
436 - LLVM_VERSION=3.9 .gitlab-ci/meson-build.sh
437 - LLVM_VERSION=4.0 .gitlab-ci/meson-build.sh
438 - LLVM_VERSION=5.0 .gitlab-ci/meson-build.sh
439
440 meson-vulkan:
441 extends: .meson-build
442 variables:
443 UNWIND: "false"
444 DRI_LOADERS: >
445 -D glx=disabled
446 -D gbm=false
447 -D egl=false
448 -D platforms=x11,wayland,drm
449 -D osmesa=none
450 GALLIUM_ST: >
451 -D dri3=true
452 -D gallium-vdpau=false
453 -D gallium-xvmc=false
454 -D gallium-omx=disabled
455 -D gallium-va=false
456 -D gallium-xa=false
457 -D gallium-nine=false
458 -D gallium-opencl=disabled
459 -D b_sanitize=undefined
460 -D c_args=-fno-sanitize-recover=all
461 -D cpp_args=-fno-sanitize-recover=all
462 UBSAN_OPTIONS: "print_stacktrace=1"
463 VULKAN_DRIVERS: intel,amd,freedreno
464 EXTRA_OPTION: >
465 -D vulkan-overlay-layer=true
466 -D werror=true
467
468 # While the main point of this build is testing the i386 cross build,
469 # we also use this one to test some other options that are exclusive
470 # with meson-main's choices (classic swrast and osmesa)
471 meson-i386:
472 extends: .meson-cross
473 variables:
474 CROSS: i386
475 VULKAN_DRIVERS: intel
476 DRI_DRIVERS: "swrast"
477 GALLIUM_DRIVERS: "iris"
478 EXTRA_OPTION: >
479 -D vulkan-overlay-layer=true
480 -D llvm=false
481 -D osmesa=classic
482 -D werror=true
483
484 meson-s390x:
485 extends:
486 - .meson-cross
487 tags:
488 - gstreamer
489 variables:
490 CROSS: s390x
491 GALLIUM_DRIVERS: "swrast"
492 script:
493 - dpkg -i /var/cache/apt/archives/$CROSS/*.deb
494 - .gitlab-ci/meson-build.sh
495
496 meson-ppc64el:
497 extends:
498 - meson-s390x
499 variables:
500 CROSS: ppc64el
501 GALLIUM_DRIVERS: "nouveau,radeonsi,swrast,virgl"
502 VULKAN_DRIVERS: "amd"
503
504 meson-mingw32-x86_64:
505 extends: .meson-build
506 variables:
507 UNWIND: "false"
508 DRI_DRIVERS: ""
509 GALLIUM_DRIVERS: "swrast"
510 EXTRA_OPTION: >
511 -Dllvm=false
512 -Dosmesa=gallium
513 --cross-file=.gitlab-ci/x86_64-w64-mingw32
514
515 scons:
516 extends: .scons-build
517 variables:
518 SCONS_TARGET: "llvm=1"
519 SCONS_CHECK_COMMAND: "scons llvm=1 force_scons=1 check"
520 script:
521 - SCONS_TARGET="" SCONS_CHECK_COMMAND="scons check force_scons=1" .gitlab-ci/scons-build.sh
522 - LLVM_VERSION=9 .gitlab-ci/scons-build.sh
523
524 scons-old-llvm:
525 extends:
526 - scons
527 - .use-x86_build_old
528 script:
529 - LLVM_VERSION=3.9 .gitlab-ci/scons-build.sh
530
531 .test:
532 extends:
533 - .ci-run-policy
534 stage: test
535 variables:
536 GIT_STRATEGY: none # testing doesn't build anything from source
537 before_script:
538 # Note: Build dir (and thus install) may be dirty due to GIT_STRATEGY
539 - rm -rf install
540 - tar -xf artifacts/install.tar
541 - LD_LIBRARY_PATH=install/lib find install/lib -name "*.so" -print -exec ldd {} \;
542 artifacts:
543 when: always
544 name: "$CI_JOB_NAME-$CI_COMMIT_REF_NAME"
545 paths:
546 - results/
547 dependencies:
548 - meson-testing
549
550 .test-gl:
551 extends:
552 - .test
553 variables:
554 TAG: *x86_test-gl
555 image: "$CI_REGISTRY_IMAGE/debian/x86_test-gl:$TAG"
556 needs:
557 - meson-testing
558 - x86_test-gl
559
560 .test-vk:
561 extends:
562 - .test
563 variables:
564 TAG: *x86_test-vk
565 image: "$CI_REGISTRY_IMAGE/debian/x86_test-vk:$TAG"
566 needs:
567 - meson-testing
568 - x86_test-vk
569
570 .piglit-test:
571 extends: .test-gl
572 artifacts:
573 when: on_failure
574 name: "$CI_JOB_NAME-$CI_COMMIT_REF_NAME"
575 paths:
576 - summary/
577 variables:
578 LIBGL_ALWAYS_SOFTWARE: 1
579 PIGLIT_NO_WINDOW: 1
580 script:
581 - artifacts/piglit/run.sh
582
583 piglit-quick_gl:
584 extends: .piglit-test
585 variables:
586 LP_NUM_THREADS: 0
587 NIR_VALIDATE: 0
588 PIGLIT_OPTIONS: >
589 --process-isolation false
590 -x arb_gpu_shader5
591 -x egl_ext_device_
592 -x egl_ext_platform_device
593 -x ext_timer_query@time-elapsed
594 -x glx-multithread-clearbuffer
595 -x glx-multithread-shader-compile
596 -x max-texture-size
597 -x maxsize
598 PIGLIT_PROFILES: quick_gl
599
600 piglit-glslparser:
601 extends: .piglit-test
602 variables:
603 LP_NUM_THREADS: 0
604 NIR_VALIDATE: 0
605 PIGLIT_PROFILES: glslparser
606
607 piglit-quick_shader:
608 extends: .piglit-test
609 variables:
610 LP_NUM_THREADS: 1
611 NIR_VALIDATE: 0
612 PIGLIT_PROFILES: quick_shader
613
614 .deqp-test:
615 variables:
616 DEQP_SKIPS: deqp-default-skips.txt
617 script:
618 - ./artifacts/deqp-runner.sh
619
620 .deqp-test-gl:
621 extends:
622 - .test-gl
623 - .deqp-test
624
625 .deqp-test-vk:
626 extends:
627 - .test-vk
628 - .deqp-test
629 variables:
630 DEQP_VER: vk
631
632 test-llvmpipe-gles2:
633 variables:
634 DEQP_VER: gles2
635 DEQP_PARALLEL: 4
636 NIR_VALIDATE: 0
637 # Don't use threads inside llvmpipe, we've already got all 4 cores
638 # busy with DEQP_PARALLEL.
639 LP_NUM_THREADS: 0
640 DEQP_EXPECTED_FAILS: deqp-llvmpipe-fails.txt
641 LIBGL_ALWAYS_SOFTWARE: "true"
642 extends: .deqp-test-gl
643
644 test-softpipe-gles2:
645 extends: test-llvmpipe-gles2
646 variables:
647 DEQP_EXPECTED_FAILS: deqp-softpipe-fails.txt
648 DEQP_SKIPS: deqp-softpipe-skips.txt
649 GALLIUM_DRIVER: "softpipe"
650
651 test-softpipe-gles3:
652 parallel: 2
653 variables:
654 DEQP_VER: gles3
655 extends: test-softpipe-gles2
656
657 test-softpipe-gles31:
658 parallel: 4
659 variables:
660 DEQP_VER: gles31
661 extends: test-softpipe-gles2
662
663 arm64_a630_gles2:
664 extends:
665 - .deqp-test-gl
666 - .use-arm_test
667 variables:
668 DEQP_VER: gles2
669 DEQP_EXPECTED_FAILS: deqp-freedreno-a630-fails.txt
670 DEQP_SKIPS: deqp-freedreno-a630-skips.txt
671 NIR_VALIDATE: 0
672 DEQP_PARALLEL: 4
673 FLAKES_CHANNEL: "#freedreno-ci"
674 tags:
675 - mesa-cheza
676 dependencies:
677 - meson-arm64
678
679 arm64_a630_gles31:
680 extends: arm64_a630_gles2
681 variables:
682 DEQP_VER: gles31
683
684 arm64_a630_gles3:
685 extends: arm64_a630_gles2
686 variables:
687 DEQP_VER: gles3
688
689 # RADV CI
690 .test-radv:
691 variables:
692 VK_DRIVER: radeon
693 RADV_DEBUG: checkir
694 # Can only be triggered manually on personal branches because RADV is the only
695 # driver that does Vulkan testing at the moment.
696 rules:
697 # Never test RADV by default in the main project.
698 - if: '$CI_PROJECT_PATH == "mesa/mesa"'
699 when: never
700 # Never test RADV by default for merge requests.
701 - if: '$CI_MERGE_REQUEST_SOURCE_BRANCH_NAME == $CI_COMMIT_REF_NAME'
702 when: never
703 # Otherwise, allow testing RADV if the test image for VK has been manually
704 # started.
705 - when: on_success
706
707 radv_polaris10_vkcts:
708 extends:
709 - .deqp-test-vk
710 - .test-radv
711 variables:
712 DEQP_PARALLEL: 4
713 DEQP_SKIPS: deqp-radv-polaris10-skips.txt
714 tags:
715 - polaris10
716
717 .traces-test:
718 extends:
719 - .test-gl
720 cache:
721 key: ${CI_JOB_NAME}
722 paths:
723 - .git-lfs-storage/
724 script:
725 - ./artifacts/tracie-runner.sh
726
727 llvmpipe-traces:
728 variables:
729 LIBGL_ALWAYS_SOFTWARE: "true"
730 GALLIUM_DRIVER: "llvmpipe"
731 DEVICE_NAME: "vmware-llvmpipe"
732 extends: .traces-test