ci: Include db410c support in the ARM container.
[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 script:
265 - .gitlab-ci/meson-build.sh
266 - .gitlab-ci/prepare-artifacts.sh
267
268 meson-main:
269 extends: .meson-build
270 variables:
271 UNWIND: "true"
272 DRI_LOADERS: >
273 -D glx=dri
274 -D gbm=true
275 -D egl=true
276 -D platforms=x11,wayland,drm,surfaceless
277 DRI_DRIVERS: "i915,i965,r100,r200,nouveau"
278 GALLIUM_ST: >
279 -D dri3=true
280 -D gallium-extra-hud=true
281 -D gallium-vdpau=true
282 -D gallium-xvmc=true
283 -D gallium-omx=bellagio
284 -D gallium-va=true
285 -D gallium-xa=true
286 -D gallium-nine=true
287 -D gallium-opencl=disabled
288 GALLIUM_DRIVERS: "iris,nouveau,kmsro,r300,r600,freedreno,swr,swrast,svga,v3d,vc4,virgl,etnaviv,panfrost,lima,zink"
289 EXTRA_OPTION: >
290 -D osmesa=gallium
291 -D tools=all
292 script:
293 - .gitlab-ci/meson-build.sh
294 - .gitlab-ci/run-shader-db.sh
295
296 .meson-cross:
297 extends:
298 - .meson-build
299 variables:
300 UNWIND: "false"
301 DRI_LOADERS: >
302 -D glx=disabled
303 -D gbm=false
304 -D egl=true
305 -D platforms=surfaceless
306 -D osmesa=none
307 GALLIUM_ST: >
308 -D dri3=false
309 -D gallium-vdpau=false
310 -D gallium-xvmc=false
311 -D gallium-omx=disabled
312 -D gallium-va=false
313 -D gallium-xa=false
314 -D gallium-nine=false
315 LLVM_VERSION: "8"
316
317 .meson-arm:
318 extends:
319 - .meson-cross
320 - .use-arm_build
321 variables:
322 VULKAN_DRIVERS: freedreno
323 GALLIUM_DRIVERS: "etnaviv,freedreno,kmsro,lima,nouveau,panfrost,swrast,tegra,v3d,vc4"
324 BUILDTYPE: "debugoptimized"
325 tags:
326 - aarch64
327
328 meson-armhf:
329 extends:
330 - .meson-arm
331 - .ci-deqp-artifacts
332 variables:
333 CROSS: armhf
334 LLVM_VERSION: "7"
335 EXTRA_OPTION: >
336 -D llvm=false
337 script:
338 - .gitlab-ci/meson-build.sh
339 - .gitlab-ci/prepare-artifacts.sh
340
341 meson-arm64:
342 extends:
343 - .meson-arm
344 - .ci-deqp-artifacts
345 variables:
346 VULKAN_DRIVERS: "freedreno"
347 EXTRA_OPTION: >
348 -D llvm=false
349 script:
350 - .gitlab-ci/meson-build.sh
351 - .gitlab-ci/prepare-artifacts.sh
352
353 meson-arm64-build-test:
354 extends:
355 - .meson-arm
356 - .ci-deqp-artifacts
357 variables:
358 VULKAN_DRIVERS: "amd"
359 script:
360 - .gitlab-ci/meson-build.sh
361
362 meson-clang:
363 extends: .meson-build
364 variables:
365 UNWIND: "true"
366 DRI_LOADERS: >
367 -D glvnd=true
368 DRI_DRIVERS: "auto"
369 GALLIUM_DRIVERS: "auto"
370 VULKAN_DRIVERS: intel,amd,freedreno
371 CC: "ccache clang-9"
372 CXX: "ccache clang++-9"
373
374 .meson-windows:
375 extends:
376 - .build-windows
377 before_script:
378 - $ENV:ARCH = "x86"
379 - $ENV:VERSION = "2019\Community"
380 script:
381 - cmd /C .gitlab-ci\meson-build.bat
382
383 scons-swr:
384 extends: .scons-build
385 variables:
386 SCONS_TARGET: "swr=1"
387 SCONS_CHECK_COMMAND: "true"
388 LLVM_VERSION: "6.0"
389
390 scons-win64:
391 extends: .scons-build
392 variables:
393 SCONS_TARGET: platform=windows machine=x86_64
394 SCONS_CHECK_COMMAND: "true"
395
396 meson-clover:
397 extends: .meson-build
398 variables:
399 UNWIND: "true"
400 DRI_LOADERS: >
401 -D glx=disabled
402 -D egl=false
403 -D gbm=false
404 GALLIUM_ST: >
405 -D dri3=false
406 -D gallium-vdpau=false
407 -D gallium-xvmc=false
408 -D gallium-omx=disabled
409 -D gallium-va=false
410 -D gallium-xa=false
411 -D gallium-nine=false
412 -D gallium-opencl=icd
413 script:
414 - export GALLIUM_DRIVERS="r600,radeonsi"
415 - .gitlab-ci/meson-build.sh
416 - LLVM_VERSION=8 .gitlab-ci/meson-build.sh
417 - export GALLIUM_DRIVERS="i915,r600"
418 - LLVM_VERSION=6.0 .gitlab-ci/meson-build.sh
419 - LLVM_VERSION=7 .gitlab-ci/meson-build.sh
420
421 meson-clover-old-llvm:
422 extends:
423 - meson-clover
424 - .use-x86_build_old
425 variables:
426 UNWIND: "false"
427 DRI_LOADERS: >
428 -D glx=disabled
429 -D egl=false
430 -D gbm=false
431 -D platforms=drm,surfaceless
432 GALLIUM_DRIVERS: "i915,r600"
433 script:
434 - LLVM_VERSION=3.9 .gitlab-ci/meson-build.sh
435 - LLVM_VERSION=4.0 .gitlab-ci/meson-build.sh
436 - LLVM_VERSION=5.0 .gitlab-ci/meson-build.sh
437
438 meson-vulkan:
439 extends: .meson-build
440 variables:
441 UNWIND: "false"
442 DRI_LOADERS: >
443 -D glx=disabled
444 -D gbm=false
445 -D egl=false
446 -D platforms=x11,wayland,drm
447 -D osmesa=none
448 GALLIUM_ST: >
449 -D dri3=true
450 -D gallium-vdpau=false
451 -D gallium-xvmc=false
452 -D gallium-omx=disabled
453 -D gallium-va=false
454 -D gallium-xa=false
455 -D gallium-nine=false
456 -D gallium-opencl=disabled
457 -D b_sanitize=undefined
458 -D c_args=-fno-sanitize-recover=all
459 -D cpp_args=-fno-sanitize-recover=all
460 UBSAN_OPTIONS: "print_stacktrace=1"
461 VULKAN_DRIVERS: intel,amd,freedreno
462 EXTRA_OPTION: >
463 -D vulkan-overlay-layer=true
464
465 # While the main point of this build is testing the i386 cross build,
466 # we also use this one to test some other options that are exclusive
467 # with meson-main's choices (classic swrast and osmesa)
468 meson-i386:
469 extends: .meson-cross
470 variables:
471 CROSS: i386
472 VULKAN_DRIVERS: intel
473 DRI_DRIVERS: "swrast"
474 GALLIUM_DRIVERS: "iris"
475 EXTRA_OPTION: >
476 -D vulkan-overlay-layer=true
477 -D llvm=false
478 -D osmesa=classic
479 -D werror=true
480
481 meson-s390x:
482 extends:
483 - .meson-cross
484 tags:
485 - gstreamer
486 variables:
487 CROSS: s390x
488 GALLIUM_DRIVERS: "swrast"
489 script:
490 - dpkg -i /var/cache/apt/archives/$CROSS/*.deb
491 - .gitlab-ci/meson-build.sh
492
493 meson-ppc64el:
494 extends:
495 - meson-s390x
496 variables:
497 CROSS: ppc64el
498 GALLIUM_DRIVERS: "nouveau,radeonsi,swrast,virgl"
499 VULKAN_DRIVERS: "amd"
500
501 meson-mingw32-x86_64:
502 extends: .meson-build
503 variables:
504 UNWIND: "false"
505 DRI_DRIVERS: ""
506 GALLIUM_DRIVERS: "swrast"
507 EXTRA_OPTION: >
508 -Dllvm=false
509 -Dosmesa=gallium
510 --cross-file=.gitlab-ci/x86_64-w64-mingw32
511
512 scons:
513 extends: .scons-build
514 variables:
515 SCONS_TARGET: "llvm=1"
516 SCONS_CHECK_COMMAND: "scons llvm=1 force_scons=1 check"
517 script:
518 - SCONS_TARGET="" SCONS_CHECK_COMMAND="scons check force_scons=1" .gitlab-ci/scons-build.sh
519 - LLVM_VERSION=9 .gitlab-ci/scons-build.sh
520
521 scons-old-llvm:
522 extends:
523 - scons
524 - .use-x86_build_old
525 script:
526 - LLVM_VERSION=3.9 .gitlab-ci/scons-build.sh
527
528 .test:
529 extends:
530 - .ci-run-policy
531 stage: test
532 variables:
533 GIT_STRATEGY: none # testing doesn't build anything from source
534 before_script:
535 # Note: Build dir (and thus install) may be dirty due to GIT_STRATEGY
536 - rm -rf install
537 - tar -xf artifacts/install.tar
538 - LD_LIBRARY_PATH=install/lib find install/lib -name "*.so" -print -exec ldd {} \;
539 artifacts:
540 when: always
541 name: "$CI_JOB_NAME-$CI_COMMIT_REF_NAME"
542 paths:
543 - results/
544 dependencies:
545 - meson-testing
546
547 .test-gl:
548 extends:
549 - .test
550 variables:
551 TAG: *x86_test-gl
552 image: "$CI_REGISTRY_IMAGE/debian/x86_test-gl:$TAG"
553 needs:
554 - meson-testing
555 - x86_test-gl
556
557 .test-vk:
558 extends:
559 - .test
560 variables:
561 TAG: *x86_test-vk
562 image: "$CI_REGISTRY_IMAGE/debian/x86_test-vk:$TAG"
563 needs:
564 - meson-testing
565 - x86_test-vk
566
567 .piglit-test:
568 extends: .test-gl
569 artifacts:
570 when: on_failure
571 name: "$CI_JOB_NAME-$CI_COMMIT_REF_NAME"
572 paths:
573 - summary/
574 variables:
575 LIBGL_ALWAYS_SOFTWARE: 1
576 PIGLIT_NO_WINDOW: 1
577 script:
578 - artifacts/piglit/run.sh
579
580 piglit-quick_gl:
581 extends: .piglit-test
582 variables:
583 LP_NUM_THREADS: 0
584 NIR_VALIDATE: 0
585 PIGLIT_OPTIONS: >
586 --process-isolation false
587 -x arb_gpu_shader5
588 -x egl_ext_device_
589 -x egl_ext_platform_device
590 -x ext_timer_query@time-elapsed
591 -x glx-multithread-clearbuffer
592 -x glx-multithread-shader-compile
593 -x max-texture-size
594 -x maxsize
595 PIGLIT_PROFILES: quick_gl
596
597 piglit-glslparser:
598 extends: .piglit-test
599 variables:
600 LP_NUM_THREADS: 0
601 NIR_VALIDATE: 0
602 PIGLIT_PROFILES: glslparser
603
604 piglit-quick_shader:
605 extends: .piglit-test
606 variables:
607 LP_NUM_THREADS: 1
608 NIR_VALIDATE: 0
609 PIGLIT_PROFILES: quick_shader
610
611 .deqp-test:
612 variables:
613 DEQP_SKIPS: deqp-default-skips.txt
614 script:
615 - ./artifacts/deqp-runner.sh
616
617 .deqp-test-gl:
618 extends:
619 - .test-gl
620 - .deqp-test
621
622 .deqp-test-vk:
623 extends:
624 - .test-vk
625 - .deqp-test
626 variables:
627 DEQP_VER: vk
628
629 test-llvmpipe-gles2:
630 variables:
631 DEQP_VER: gles2
632 DEQP_PARALLEL: 4
633 NIR_VALIDATE: 0
634 # Don't use threads inside llvmpipe, we've already got all 4 cores
635 # busy with DEQP_PARALLEL.
636 LP_NUM_THREADS: 0
637 DEQP_EXPECTED_FAILS: deqp-llvmpipe-fails.txt
638 LIBGL_ALWAYS_SOFTWARE: "true"
639 extends: .deqp-test-gl
640
641 test-softpipe-gles2:
642 extends: test-llvmpipe-gles2
643 variables:
644 DEQP_EXPECTED_FAILS: deqp-softpipe-fails.txt
645 DEQP_SKIPS: deqp-softpipe-skips.txt
646 GALLIUM_DRIVER: "softpipe"
647
648 test-softpipe-gles3:
649 parallel: 2
650 variables:
651 DEQP_VER: gles3
652 extends: test-softpipe-gles2
653
654 test-softpipe-gles31:
655 parallel: 4
656 variables:
657 DEQP_VER: gles31
658 extends: test-softpipe-gles2
659
660 arm64_a630_gles2:
661 extends:
662 - .deqp-test-gl
663 - .use-arm_test
664 variables:
665 DEQP_VER: gles2
666 DEQP_EXPECTED_FAILS: deqp-freedreno-a630-fails.txt
667 DEQP_SKIPS: deqp-freedreno-a630-skips.txt
668 NIR_VALIDATE: 0
669 DEQP_PARALLEL: 4
670 FLAKES_CHANNEL: "#freedreno-ci"
671 tags:
672 - mesa-cheza
673 dependencies:
674 - meson-arm64
675
676 arm64_a630_gles31:
677 extends: arm64_a630_gles2
678 variables:
679 DEQP_VER: gles31
680
681 arm64_a630_gles3:
682 extends: arm64_a630_gles2
683 variables:
684 DEQP_VER: gles3
685
686 arm64_a306_gles2:
687 extends: arm64_a630_gles2
688 variables:
689 DEQP_EXPECTED_FAILS: deqp-freedreno-a307-fails.txt
690 DEQP_SKIPS: deqp-default-skips.txt
691 tags:
692 - db410c
693
694 # RADV CI
695 .test-radv:
696 variables:
697 VK_DRIVER: radeon
698 RADV_DEBUG: checkir
699 # Can only be triggered manually on personal branches because RADV is the only
700 # driver that does Vulkan testing at the moment.
701 rules:
702 # Never test RADV by default in the main project.
703 - if: '$CI_PROJECT_PATH == "mesa/mesa"'
704 when: never
705 # Never test RADV by default for merge requests.
706 - if: '$CI_MERGE_REQUEST_SOURCE_BRANCH_NAME == $CI_COMMIT_REF_NAME'
707 when: never
708 # Otherwise, allow testing RADV if the test image for VK has been manually
709 # started.
710 - when: on_success
711
712 radv_polaris10_vkcts:
713 extends:
714 - .deqp-test-vk
715 - .test-radv
716 variables:
717 DEQP_PARALLEL: 4
718 DEQP_SKIPS: deqp-radv-polaris10-skips.txt
719 tags:
720 - polaris10
721
722 .traces-test:
723 extends:
724 - .test-gl
725 cache:
726 key: ${CI_JOB_NAME}
727 paths:
728 - .git-lfs-storage/
729 script:
730 - ./artifacts/tracie-runner.sh
731
732 llvmpipe-traces:
733 variables:
734 LIBGL_ALWAYS_SOFTWARE: "true"
735 GALLIUM_DRIVER: "llvmpipe"
736 DEVICE_NAME: "vmware-llvmpipe"
737 extends: .traces-test