gitlab-ci: Remove unneeded python3-pilkit dependency
[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 - local: '.gitlab-ci/test-source-dep.yml'
10
11 stages:
12 - container
13 - meson-x86_64
14 - scons
15 - meson-misc
16 - llvmpipe
17 - softpipe
18 - freedreno
19 - panfrost
20 - misc-tests
21 - success
22
23
24 # When to automatically run the CI
25 .ci-run-policy:
26 rules:
27 # Run pipeline by default for merge requests changing files affecting it
28 - if: '$CI_MERGE_REQUEST_SOURCE_BRANCH_NAME == $CI_COMMIT_REF_NAME'
29 changes: &paths
30 - VERSION
31 - bin/**/*
32 # GitLab CI
33 - .gitlab-ci.yml
34 - .gitlab-ci/**/*
35 # Meson
36 - meson*
37 - build-support/**/*
38 - subprojects/**/*
39 # SCons
40 - SConstruct
41 - scons/**/*
42 - common.py
43 # Source code
44 - include/**/*
45 - src/**/*
46 when: on_success
47 # Run pipeline by default in the main project if files affecting it were
48 # changed
49 - if: '$CI_PROJECT_PATH == "mesa/mesa"'
50 changes:
51 *paths
52 when: on_success
53 # Allow triggering jobs manually on branches of forked projects
54 - if: '$CI_PROJECT_PATH != "mesa/mesa" && $CI_MERGE_REQUEST_SOURCE_BRANCH_NAME != $CI_COMMIT_REF_NAME'
55 when: manual
56 # Otherwise, most jobs won't run
57 - when: never
58 retry:
59 max: 2
60 when:
61 - runner_system_failure
62 # Cancel CI run if a newer commit is pushed to the same branch
63 interruptible: true
64
65 success:
66 stage: success
67 image: debian:stable-slim
68 only:
69 - merge_requests
70 except:
71 changes:
72 *paths
73 variables:
74 GIT_STRATEGY: none
75 script:
76 - echo "Dummy job to make sure every merge request pipeline runs at least one job"
77
78
79 .ci-deqp-artifacts:
80 artifacts:
81 name: "mesa_${CI_JOB_NAME}"
82 when: always
83 untracked: false
84 paths:
85 # Watch out! Artifacts are relative to the build dir.
86 # https://gitlab.com/gitlab-org/gitlab-ce/commit/8788fb925706cad594adf6917a6c5f6587dd1521
87 - artifacts
88
89 # Build the CI docker images.
90 #
91 # DEBIAN_TAG is the tag of the docker image used by later stage jobs. If the
92 # image doesn't exist yet, the container stage job generates it.
93 #
94 # In order to generate a new image, one should generally change the tag.
95 # While removing the image from the registry would also work, that's not
96 # recommended except for ephemeral images during development: Replacing
97 # an image after a significant amount of time might pull in newer
98 # versions of gcc/clang or other packages, which might break the build
99 # with older commits using the same tag.
100 #
101 # After merging a change resulting in generating a new image to the
102 # main repository, it's recommended to remove the image from the source
103 # repository's container registry, so that the image from the main
104 # repository's registry will be used there as well.
105
106 .container:
107 stage: container
108 extends:
109 - .ci-run-policy
110 variables:
111 DEBIAN_VERSION: buster-slim
112 REPO_SUFFIX: $CI_JOB_NAME
113 DEBIAN_EXEC: 'bash .gitlab-ci/container/${CI_JOB_NAME}.sh'
114 # no need to pull the whole repo to build the container image
115 GIT_STRATEGY: none
116
117 # Debian 10 based x86 build image
118 x86_build:
119 extends:
120 - .debian@container-ifnot-exists
121 - .container
122 variables:
123 DEBIAN_TAG: &x86_build "2020-02-15"
124
125 .use-x86_build:
126 variables:
127 TAG: *x86_build
128 image: "$CI_REGISTRY_IMAGE/debian/x86_build:$TAG"
129 needs:
130 - x86_build
131
132 # Debian 10 based x86 test image for GL
133 x86_test-gl:
134 extends: x86_build
135 variables:
136 DEBIAN_TAG: &x86_test-gl "2020-03-11"
137
138 # Debian 10 based x86 test image for VK
139 x86_test-vk:
140 extends: x86_build
141 variables:
142 DEBIAN_TAG: &x86_test-vk "2020-03-05"
143
144 # Debian 9 based x86 build image (old LLVM)
145 x86_build_old:
146 extends: x86_build
147 variables:
148 DEBIAN_TAG: &x86_build_old "2019-09-18"
149 DEBIAN_VERSION: stretch-slim
150
151 .use-x86_build_old:
152 variables:
153 TAG: *x86_build_old
154 image: "$CI_REGISTRY_IMAGE/debian/x86_build_old:$TAG"
155 needs:
156 - x86_build_old
157
158 # Debian 10 based ARM build image
159 arm_build:
160 extends:
161 - .debian@container-ifnot-exists@arm64v8
162 - .container
163 variables:
164 DEBIAN_TAG: &arm_build "2020-02-26"
165
166 .use-arm_build:
167 variables:
168 TAG: *arm_build
169 image: "$CI_REGISTRY_IMAGE/debian/arm_build:$TAG"
170 needs:
171 - arm_build
172
173 # Debian 10 based ARM test image
174 arm_test:
175 extends: arm_build
176 variables:
177 DEBIAN_TAG: &arm_test "2020-01-30"
178
179 .use-arm_test:
180 variables:
181 TAG: *arm_test
182 image: "$CI_REGISTRY_IMAGE/debian/arm_test:$TAG"
183 needs:
184 - meson-arm64
185 - arm_test
186
187
188 # BUILD
189
190 # Shared between windows and Linux
191 .build-common:
192 extends: .ci-run-policy
193 artifacts:
194 name: "mesa_${CI_JOB_NAME}"
195 when: always
196 paths:
197 - _build/meson-logs/*.txt
198 # scons:
199 - build/*/config.log
200 - shader-db
201
202 # Just Linux
203 .build-linux:
204 extends: .build-common
205 variables:
206 CCACHE_COMPILERCHECK: "content"
207 CCACHE_COMPRESS: "true"
208 CCACHE_DIR: /cache/mesa/ccache
209 # Use ccache transparently, and print stats before/after
210 before_script:
211 - export PATH="/usr/lib/ccache:$PATH"
212 - export CCACHE_BASEDIR="$PWD"
213 - ccache --show-stats
214 after_script:
215 - ccache --show-stats
216
217 .build-windows:
218 extends: .build-common
219 tags:
220 - mesa-windows
221 cache:
222 key: ${CI_JOB_NAME}
223 paths:
224 - subprojects/packagecache
225
226 .meson-build:
227 extends:
228 - .build-linux
229 - .use-x86_build
230 stage: meson-x86_64
231 variables:
232 LLVM_VERSION: 9
233 script:
234 - .gitlab-ci/meson-build.sh
235
236 .scons-build:
237 extends:
238 - .build-linux
239 - .use-x86_build
240 stage: scons
241 variables:
242 SCONSFLAGS: "-j4"
243 script:
244 - .gitlab-ci/scons-build.sh
245
246 meson-testing:
247 extends:
248 - .meson-build
249 - .ci-deqp-artifacts
250 variables:
251 UNWIND: "true"
252 DRI_LOADERS: >
253 -D glx=dri
254 -D gbm=true
255 -D egl=true
256 -D platforms=x11,drm,surfaceless
257 GALLIUM_ST: >
258 -D dri3=true
259 GALLIUM_DRIVERS: "swrast"
260 VULKAN_DRIVERS: amd
261 BUILDTYPE: "debugoptimized"
262 EXTRA_OPTION: >
263 -D werror=true
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 stage: meson-misc
300 variables:
301 UNWIND: "false"
302 DRI_LOADERS: >
303 -D glx=disabled
304 -D gbm=false
305 -D egl=true
306 -D platforms=surfaceless
307 -D osmesa=none
308 GALLIUM_ST: >
309 -D dri3=false
310 -D gallium-vdpau=false
311 -D gallium-xvmc=false
312 -D gallium-omx=disabled
313 -D gallium-va=false
314 -D gallium-xa=false
315 -D gallium-nine=false
316 LLVM_VERSION: "8"
317
318 .meson-arm:
319 extends:
320 - .meson-cross
321 - .use-arm_build
322 variables:
323 VULKAN_DRIVERS: freedreno
324 GALLIUM_DRIVERS: "etnaviv,freedreno,kmsro,lima,nouveau,panfrost,swrast,tegra,v3d,vc4"
325 BUILDTYPE: "debugoptimized"
326 tags:
327 - aarch64
328
329 meson-armhf:
330 extends:
331 - .meson-arm
332 - .ci-deqp-artifacts
333 variables:
334 CROSS: armhf
335 LLVM_VERSION: "7"
336 EXTRA_OPTION: >
337 -D llvm=false
338 script:
339 - .gitlab-ci/meson-build.sh
340 - .gitlab-ci/prepare-artifacts.sh
341
342 meson-arm64:
343 extends:
344 - .meson-arm
345 - .ci-deqp-artifacts
346 variables:
347 VULKAN_DRIVERS: "freedreno"
348 EXTRA_OPTION: >
349 -D llvm=false
350 script:
351 - .gitlab-ci/meson-build.sh
352 - .gitlab-ci/prepare-artifacts.sh
353
354 meson-arm64-build-test:
355 extends:
356 - .meson-arm
357 - .ci-deqp-artifacts
358 variables:
359 VULKAN_DRIVERS: "amd"
360 script:
361 - .gitlab-ci/meson-build.sh
362
363 meson-clang:
364 extends: .meson-build
365 variables:
366 UNWIND: "true"
367 DRI_LOADERS: >
368 -D glvnd=true
369 DRI_DRIVERS: "auto"
370 GALLIUM_DRIVERS: "auto"
371 VULKAN_DRIVERS: intel,amd,freedreno
372 CC: "ccache clang-9"
373 CXX: "ccache clang++-9"
374
375 .meson-windows:
376 extends:
377 - .build-windows
378 stage: meson-misc
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 stage: meson-misc
507 variables:
508 UNWIND: "false"
509 DRI_DRIVERS: ""
510 GALLIUM_DRIVERS: "swrast"
511 EXTRA_OPTION: >
512 -Dllvm=false
513 -Dosmesa=gallium
514 --cross-file=.gitlab-ci/x86_64-w64-mingw32
515
516 scons:
517 extends: .scons-build
518 variables:
519 SCONS_TARGET: "llvm=1"
520 SCONS_CHECK_COMMAND: "scons llvm=1 force_scons=1 check"
521 script:
522 - SCONS_TARGET="" SCONS_CHECK_COMMAND="scons check force_scons=1" .gitlab-ci/scons-build.sh
523 - LLVM_VERSION=9 .gitlab-ci/scons-build.sh
524
525 scons-old-llvm:
526 extends:
527 - scons
528 - .use-x86_build_old
529 script:
530 - LLVM_VERSION=3.9 .gitlab-ci/scons-build.sh
531
532 .test:
533 extends:
534 - .ci-run-policy
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: "mesa_${CI_JOB_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:
572 - .test-gl
573 - .llvmpipe-rules
574 artifacts:
575 when: on_failure
576 name: "mesa_${CI_JOB_NAME}"
577 paths:
578 - summary/
579 variables:
580 LIBGL_ALWAYS_SOFTWARE: 1
581 PIGLIT_NO_WINDOW: 1
582 script:
583 - artifacts/piglit/run.sh
584
585 piglit-quick_gl:
586 extends: .piglit-test
587 variables:
588 LP_NUM_THREADS: 0
589 NIR_VALIDATE: 0
590 PIGLIT_OPTIONS: >
591 --process-isolation false
592 -x arb_gpu_shader5
593 -x egl_ext_device_
594 -x egl_ext_platform_device
595 -x ext_timer_query@time-elapsed
596 -x glx-multithread-clearbuffer
597 -x glx-multithread-shader-compile
598 -x max-texture-size
599 -x maxsize
600 PIGLIT_PROFILES: quick_gl
601
602 piglit-glslparser:
603 extends: .piglit-test
604 variables:
605 LP_NUM_THREADS: 0
606 NIR_VALIDATE: 0
607 PIGLIT_PROFILES: glslparser
608
609 piglit-quick_shader:
610 extends: .piglit-test
611 variables:
612 LP_NUM_THREADS: 1
613 NIR_VALIDATE: 0
614 PIGLIT_PROFILES: quick_shader
615
616 .deqp-test:
617 variables:
618 DEQP_SKIPS: deqp-default-skips.txt
619 script:
620 - ./artifacts/deqp-runner.sh
621
622 .deqp-test-gl:
623 extends:
624 - .test-gl
625 - .deqp-test
626
627 .deqp-test-vk:
628 extends:
629 - .test-vk
630 - .deqp-test
631 variables:
632 DEQP_VER: vk
633
634 .fossilize-test:
635 extends: .test-vk
636 script:
637 - ./artifacts/fossilize-runner.sh
638
639 llvmpipe-gles2:
640 variables:
641 DEQP_VER: gles2
642 DEQP_PARALLEL: 4
643 NIR_VALIDATE: 0
644 # Don't use threads inside llvmpipe, we've already got all 4 cores
645 # busy with DEQP_PARALLEL.
646 LP_NUM_THREADS: 0
647 DEQP_EXPECTED_FAILS: deqp-llvmpipe-fails.txt
648 LIBGL_ALWAYS_SOFTWARE: "true"
649 extends:
650 - .deqp-test-gl
651 - .llvmpipe-rules
652
653 softpipe-gles2:
654 extends:
655 - llvmpipe-gles2
656 - .softpipe-rules
657 variables:
658 DEQP_EXPECTED_FAILS: deqp-softpipe-fails.txt
659 DEQP_SKIPS: deqp-softpipe-skips.txt
660 GALLIUM_DRIVER: "softpipe"
661
662 softpipe-gles3:
663 parallel: 2
664 variables:
665 DEQP_VER: gles3
666 extends: softpipe-gles2
667
668 softpipe-gles31:
669 parallel: 4
670 variables:
671 DEQP_VER: gles31
672 extends: softpipe-gles2
673
674 arm64_a630_gles2:
675 extends:
676 - .deqp-test-gl
677 - .use-arm_test
678 - .freedreno-rules
679 variables:
680 DEQP_VER: gles2
681 DEQP_EXPECTED_FAILS: deqp-freedreno-a630-fails.txt
682 DEQP_SKIPS: deqp-freedreno-a630-skips.txt
683 NIR_VALIDATE: 0
684 DEQP_PARALLEL: 4
685 FLAKES_CHANNEL: "#freedreno-ci"
686 tags:
687 - mesa-cheza
688 dependencies:
689 - meson-arm64
690
691 arm64_a630_gles31:
692 extends: arm64_a630_gles2
693 variables:
694 DEQP_VER: gles31
695
696 arm64_a630_gles3:
697 extends: arm64_a630_gles2
698 variables:
699 DEQP_VER: gles3
700
701 arm64_a306_gles2:
702 extends: arm64_a630_gles2
703 variables:
704 DEQP_EXPECTED_FAILS: deqp-freedreno-a307-fails.txt
705 DEQP_SKIPS: deqp-default-skips.txt
706 tags:
707 - db410c
708
709 # RADV CI
710 .test-radv:
711 extends: .radv-rules
712 stage: misc-tests
713 variables:
714 VK_DRIVER: radeon
715 RADV_DEBUG: checkir
716
717 .test-radv-unsafe:
718 extends: .test-radv
719 # Can only be triggered manually on personal branches because RADV is the only
720 # driver that does Vulkan testing at the moment.
721 rules:
722 # Never test RADV by default in the main project.
723 - if: '$CI_PROJECT_PATH == "mesa/mesa"'
724 when: never
725 # Never test RADV by default for merge requests.
726 - if: '$CI_MERGE_REQUEST_SOURCE_BRANCH_NAME == $CI_COMMIT_REF_NAME'
727 when: never
728 # Otherwise, allow testing RADV manually for personal branches.
729 - when: manual
730
731 .test-radv-fossilize:
732 extends:
733 - .fossilize-test
734 - .test-radv
735
736 radv_polaris10_vkcts:
737 extends:
738 - .deqp-test-vk
739 - .test-radv-unsafe
740 variables:
741 DEQP_PARALLEL: 4
742 DEQP_SKIPS: deqp-radv-polaris10-skips.txt
743 tags:
744 - polaris10
745
746 radv-polaris10-fossils:
747 extends: .test-radv-fossilize
748 variables:
749 RADV_FORCE_FAMILY: "polaris10" # Force creating a null device
750
751 # Traces CI
752 .traces-test:
753 stage: misc-tests
754 cache:
755 key: ${CI_JOB_NAME}
756 paths:
757 - .git-lfs-storage/
758
759 .traces-test-gl:
760 extends:
761 - .test-gl
762 - .traces-test
763 script:
764 - ./artifacts/tracie-runner-gl.sh
765
766 .traces-test-vk:
767 extends:
768 - .test-vk
769 - .traces-test
770 script:
771 - ./artifacts/tracie-runner-vk.sh
772
773 llvmpipe-traces:
774 extends:
775 - .traces-test-gl
776 - .llvmpipe-rules
777 variables:
778 LIBGL_ALWAYS_SOFTWARE: "true"
779 GALLIUM_DRIVER: "llvmpipe"
780 DEVICE_NAME: "gl-vmware-llvmpipe"
781
782 radv-polaris10-traces:
783 extends:
784 - .traces-test-vk
785 - .test-radv-unsafe
786 variables:
787 DEVICE_NAME: "vk-amd-polaris10"
788 tags:
789 - polaris10