gitlab-ci: Remove indirect dependencies from needs:
[mesa.git] / .gitlab-ci.yml
1 variables:
2 FDO_UPSTREAM_REPO: mesa/mesa
3 CI_PRE_CLONE_SCRIPT: |-
4 set -o xtrace
5 /usr/bin/wget -q -O- ${CI_PROJECT_URL}/-/raw/${CI_COMMIT_SHA}/.gitlab-ci/download-git-cache.sh | sh -
6 set +o xtrace
7
8 include:
9 - project: 'freedesktop/ci-templates'
10 ref: &ci-templates-sha 52dd4a94044449c8481d18dcdc221a3c636366d2
11 file: '/templates/debian.yml'
12 - project: 'freedesktop/ci-templates'
13 ref: *ci-templates-sha
14 file: '/templates/alpine.yml'
15 - local: '.gitlab-ci/lava-gitlab-ci.yml'
16 - local: '.gitlab-ci/test-source-dep.yml'
17
18 stages:
19 - container+docs
20 - container-2
21 - git-archive
22 - deploy
23 - meson-x86_64
24 - scons
25 - meson-misc
26 - llvmpipe
27 - softpipe
28 - freedreno
29 - panfrost
30 - radv
31 - lima
32 - virgl
33 - success
34
35 # Generic rule to not run the job during scheduled pipelines
36 # ----------------------------------------------------------
37 .scheduled_pipelines-rules:
38 rules: &ignore_scheduled_pipelines
39 if: '$CI_PIPELINE_SOURCE == "schedule"'
40 when: never
41
42 .docs-base:
43 extends: .ci-run-policy
44 image: alpine
45 script:
46 - apk --no-cache add py3-pip graphviz
47 - pip3 install sphinx sphinx_rtd_theme
48 - sphinx-build -b html docs public
49
50 pages:
51 extends: .docs-base
52 stage: deploy
53 artifacts:
54 paths:
55 - public
56 rules:
57 - *ignore_scheduled_pipelines
58 - if: '$CI_PROJECT_NAMESPACE == "mesa" && $CI_COMMIT_REF_NAME == "master"'
59 changes: &docs-or-ci
60 - docs/**/*
61 - .gitlab-ci.yml
62 when: always
63 # Other cases default to never
64
65 test-docs:
66 extends: .docs-base
67 stage: container+docs
68 rules:
69 - *ignore_scheduled_pipelines
70 - if: '$CI_PROJECT_NAMESPACE == "mesa"'
71 when: never
72 - if: '$GITLAB_USER_LOGIN == "marge-bot"'
73 changes: *docs-or-ci
74 when: on_success
75 - changes: *docs-or-ci
76 when: manual
77 # Other cases default to never
78
79 # When to automatically run the CI
80 .ci-run-policy:
81 rules:
82 - *ignore_scheduled_pipelines
83 # If any files affecting the pipeline are changed, build/test jobs run
84 # automatically once all dependency jobs have passed
85 - changes: &all_paths
86 - VERSION
87 - bin/git_sha1_gen.py
88 - bin/install_megadrivers.py
89 - bin/meson_get_version.py
90 - bin/symbols-check.py
91 # GitLab CI
92 - .gitlab-ci.yml
93 - .gitlab-ci/**/*
94 # Meson
95 - meson*
96 - build-support/**/*
97 - subprojects/**/*
98 # SCons
99 - SConstruct
100 - scons/**/*
101 - common.py
102 # Source code
103 - include/**/*
104 - src/**/*
105 when: on_success
106 # Otherwise, build/test jobs won't run
107 - when: never
108 retry:
109 max: 2
110 when:
111 - runner_system_failure
112 # Cancel CI run if a newer commit is pushed to the same branch
113 interruptible: true
114
115 success:
116 stage: success
117 image: debian:stable-slim
118 rules:
119 - *ignore_scheduled_pipelines
120 - if: '$CI_PROJECT_NAMESPACE == "mesa"'
121 when: never
122 - if: '$GITLAB_USER_LOGIN == "marge-bot"'
123 changes: *docs-or-ci
124 when: never
125 - changes: *all_paths
126 when: never
127 - when: on_success
128 variables:
129 GIT_STRATEGY: none
130 script:
131 - echo "Dummy job to make sure every merge request pipeline runs at least one job"
132
133
134 .ci-deqp-artifacts:
135 artifacts:
136 name: "mesa_${CI_JOB_NAME}"
137 when: always
138 untracked: false
139 paths:
140 # Watch out! Artifacts are relative to the build dir.
141 # https://gitlab.com/gitlab-org/gitlab-ce/commit/8788fb925706cad594adf6917a6c5f6587dd1521
142 - artifacts
143
144 # Build the CI docker images.
145 #
146 # FDO_DISTRIBUTION_TAG is the tag of the docker image used by later stage jobs. If the
147 # image doesn't exist yet, the container stage job generates it.
148 #
149 # In order to generate a new image, one should generally change the tag.
150 # While removing the image from the registry would also work, that's not
151 # recommended except for ephemeral images during development: Replacing
152 # an image after a significant amount of time might pull in newer
153 # versions of gcc/clang or other packages, which might break the build
154 # with older commits using the same tag.
155 #
156 # After merging a change resulting in generating a new image to the
157 # main repository, it's recommended to remove the image from the source
158 # repository's container registry, so that the image from the main
159 # repository's registry will be used there as well.
160
161 .container:
162 stage: container+docs
163 extends:
164 - .ci-run-policy
165 rules:
166 - *ignore_scheduled_pipelines
167 # Run pipeline by default in the main project if any CI pipeline
168 # configuration files were changed, to ensure docker images are up to date
169 - if: '$CI_PROJECT_PATH == "mesa/mesa"'
170 changes:
171 - .gitlab-ci.yml
172 - .gitlab-ci/**/*
173 when: on_success
174 # Run pipeline by default if it was triggered by Marge Bot, is for a
175 # merge request, and any files affecting the pipeline were changed
176 - if: '$GITLAB_USER_LOGIN == "marge-bot" && $CI_PROJECT_PATH != "mesa/mesa"'
177 changes:
178 *all_paths
179 when: on_success
180 # Run pipeline by default in the main project if it was not triggered by
181 # Marge Bot, and any files affecting the pipeline were changed
182 - if: '$GITLAB_USER_LOGIN != "marge-bot" && $CI_PROJECT_PATH == "mesa/mesa"'
183 changes:
184 *all_paths
185 when: on_success
186 # Allow triggering jobs manually in other cases if any files affecting the
187 # pipeline were changed
188 - changes:
189 *all_paths
190 when: manual
191 # Otherwise, container jobs won't run
192 - when: never
193 variables:
194 FDO_DISTRIBUTION_VERSION: buster-slim
195 FDO_REPO_SUFFIX: "debian/$CI_JOB_NAME"
196 FDO_DISTRIBUTION_EXEC: 'bash .gitlab-ci/container/${CI_JOB_NAME}.sh'
197 # no need to pull the whole repo to build the container image
198 GIT_STRATEGY: none
199
200 # Debian 10 based x86 build image base
201 x86_build-base:
202 extends:
203 - .fdo.container-build@debian
204 - .container
205 variables:
206 FDO_DISTRIBUTION_TAG: &x86_build-base "2020-06-12"
207
208 .use-x86_build-base:
209 extends:
210 - x86_build-base
211 - .ci-run-policy
212 stage: container-2
213 variables:
214 BASE_TAG: *x86_build-base
215 FDO_BASE_IMAGE: "$CI_REGISTRY_IMAGE/debian/x86_build-base:$BASE_TAG"
216 needs:
217 - x86_build-base
218
219 # Debian 10 based x86 main build image
220 x86_build:
221 extends:
222 - .use-x86_build-base
223 variables:
224 FDO_DISTRIBUTION_TAG: &x86_build "2020-06-02"
225
226 .use-x86_build:
227 variables:
228 TAG: *x86_build
229 image: "$CI_REGISTRY_IMAGE/debian/x86_build:$TAG"
230 needs:
231 - x86_build
232
233 # Debian 10 based i386 cross-build image
234 i386_build:
235 extends:
236 - .use-x86_build-base
237 variables:
238 FDO_DISTRIBUTION_TAG: &i386_build "2020-06-02"
239
240 .use-i386_build:
241 variables:
242 TAG: *i386_build
243 image: "$CI_REGISTRY_IMAGE/debian/i386_build:$TAG"
244 needs:
245 - i386_build
246
247 # Debian 10 based ppc64el cross-build image
248 ppc64el_build:
249 extends:
250 - .use-x86_build-base
251 variables:
252 FDO_DISTRIBUTION_TAG: &ppc64el_build "2020-06-02"
253
254 .use-ppc64el_build:
255 variables:
256 TAG: *ppc64el_build
257 image: "$CI_REGISTRY_IMAGE/debian/ppc64el_build:$TAG"
258 needs:
259 - ppc64el_build
260
261 # Debian 10 based s390x cross-build image
262 s390x_build:
263 extends:
264 - .use-x86_build-base
265 variables:
266 FDO_DISTRIBUTION_TAG: &s390x_build "2020-06-02"
267
268 .use-s390x_build:
269 variables:
270 TAG: *s390x_build
271 image: "$CI_REGISTRY_IMAGE/debian/s390x_build:$TAG"
272 needs:
273 - s390x_build
274
275 # Debian 10 based x86 test image base
276 x86_test-base:
277 extends: x86_build-base
278 variables:
279 FDO_DISTRIBUTION_TAG: &x86_test-base "2020-06-02"
280
281 .use-x86_test-base:
282 extends:
283 - x86_build-base
284 - .ci-run-policy
285 stage: container-2
286 variables:
287 BASE_TAG: *x86_test-base
288 FDO_BASE_IMAGE: "$CI_REGISTRY_IMAGE/debian/x86_test-base:$BASE_TAG"
289 needs:
290 - x86_test-base
291
292 # Debian 10 based x86 test image for GL
293 x86_test-gl:
294 extends: .use-x86_test-base
295 variables:
296 FDO_DISTRIBUTION_TAG: &x86_test-gl "2020-06-23-virgl"
297
298 # Debian 10 based x86 test image for VK
299 x86_test-vk:
300 extends: .use-x86_test-base
301 variables:
302 FDO_DISTRIBUTION_TAG: &x86_test-vk "2020-06-18-vkcts"
303
304 # Debian 9 based x86 build image (old LLVM)
305 x86_build_old:
306 extends: x86_build-base
307 variables:
308 FDO_DISTRIBUTION_TAG: &x86_build_old "2020-06-12"
309 FDO_DISTRIBUTION_VERSION: stretch-slim
310
311 .use-x86_build_old:
312 variables:
313 TAG: *x86_build_old
314 image: "$CI_REGISTRY_IMAGE/debian/x86_build_old:$TAG"
315 needs:
316 - x86_build_old
317
318 # Debian 10 based ARM build image
319 arm_build:
320 extends:
321 - .fdo.container-build@debian@arm64v8
322 - .container
323 variables:
324 FDO_DISTRIBUTION_TAG: &arm_build "2020-07-07"
325
326 .use-arm_build:
327 variables:
328 TAG: *arm_build
329 image: "$CI_REGISTRY_IMAGE/debian/arm_build:$TAG"
330 needs:
331 - arm_build
332
333 # Debian 10 based x86 baremetal image base
334 arm_test-base:
335 extends:
336 - .fdo.container-build@debian
337 - .container
338 variables:
339 FDO_DISTRIBUTION_TAG: &arm_test-base "2020-06-22-tracie"
340
341 .use-arm_test-base:
342 extends:
343 - arm_test-base
344 - .ci-run-policy
345 stage: container-2
346 variables:
347 BASE_TAG: *arm_test-base
348 FDO_BASE_IMAGE: "$CI_REGISTRY_IMAGE/debian/arm_test-base:$BASE_TAG"
349 needs:
350 - arm_test-base
351
352 # x86 image with ARM64 rootfs for baremetal testing.
353 arm64_test:
354 extends:
355 - .use-arm_test-base
356 variables:
357 FDO_DISTRIBUTION_TAG: &arm64_test "2020-06-25-kernelfix"
358
359 .use-arm64_test:
360 variables:
361 TAG: *arm64_test
362 image: "$CI_REGISTRY_IMAGE/debian/arm64_test:$TAG"
363 needs:
364 - arm64_test
365
366 # Native Windows docker builds
367 #
368 # Unlike the above Linux-based builds - including MinGW/SCons builds which
369 # cross-compile for Windows - which use the freedesktop ci-templates, we
370 # cannot use the same scheme here. As Windows lacks support for
371 # Docker-in-Docker, and Podman does not run natively on Windows, we have
372 # to open-code much of the same ourselves.
373 #
374 # This is achieved by first running in a native Windows shell instance
375 # (host PowerShell) in the container stage to build and push the image,
376 # then in the build stage by executing inside Docker.
377
378 .windows-docker-vs2019:
379 variables:
380 WINDOWS_TAG: "2020-05-05-llvm"
381 WINDOWS_IMAGE: "$CI_REGISTRY_IMAGE/windows/x64_build:$WINDOWS_TAG"
382 WINDOWS_UPSTREAM_IMAGE: "$CI_REGISTRY/$FDO_UPSTREAM_REPO/windows/x64_build:$WINDOWS_TAG"
383
384 .windows_build_vs2019:
385 extends:
386 - .container
387 - .windows-docker-vs2019
388 stage: container+docs
389 variables:
390 GIT_STRATEGY: fetch # we do actually need the full repository though
391 timeout: 4h # LLVM takes ages
392 tags:
393 - windows
394 - shell
395 - "1809"
396 - mesa
397 script:
398 - .\.gitlab-ci\windows\mesa_container.ps1 $CI_REGISTRY $CI_REGISTRY_USER $CI_REGISTRY_PASSWORD $WINDOWS_IMAGE $WINDOWS_UPSTREAM_IMAGE
399
400 .use-windows_build_vs2019:
401 extends: .windows-docker-vs2019
402 image: "$WINDOWS_IMAGE"
403 needs:
404 - windows_build_vs2019
405
406 git_archive:
407 extends: .fdo.container-build@alpine
408 stage: container+docs
409 rules:
410 - if: '$CI_PIPELINE_SOURCE == "schedule"'
411 when: always
412 variables:
413 FDO_REPO_SUFFIX: &git-archive-suffix "alpine/git_archive"
414 FDO_DISTRIBUTION_EXEC: 'pip3 install git+http://gitlab.freedesktop.org/freedesktop/ci-templates@6f5af7e5574509726c79109e3c147cee95e81366'
415 # no need to pull the whole repo to build the container image
416 GIT_STRATEGY: none
417 FDO_DISTRIBUTION_TAG: &git-archive-tag "2020-07-07"
418 FDO_DISTRIBUTION_PACKAGES: git py3-pip
419
420
421 # Git archive
422
423 make git archive:
424 stage: git-archive
425 extends: .fdo.suffixed-image@alpine
426 rules:
427 - if: '$CI_PIPELINE_SOURCE == "schedule"'
428 when: on_success
429 # ensure we are running on packet
430 tags:
431 - packet.net
432 variables:
433 FDO_DISTRIBUTION_TAG: *git-archive-tag
434 FDO_REPO_SUFFIX: *git-archive-suffix
435 needs:
436 - git_archive
437
438 script:
439 # compress the current folder
440 - tar -cvzf ../$CI_PROJECT_NAME.tar.gz .
441
442 # login with the JWT token
443 - ci-fairy minio login $CI_JOB_JWT
444 - ci-fairy minio cp ../$CI_PROJECT_NAME.tar.gz minio://minio-packet.freedesktop.org/git-cache/$CI_PROJECT_NAMESPACE/$CI_PROJECT_NAME/$CI_PROJECT_NAME.tar.gz
445
446
447 # BUILD
448
449 # Shared between windows and Linux
450 .build-common:
451 extends: .ci-run-policy
452 artifacts:
453 name: "mesa_${CI_JOB_NAME}"
454 when: always
455 paths:
456 - _build/meson-logs/*.txt
457 # scons:
458 - build/*/config.log
459 - shader-db
460
461 # Just Linux
462 .build-linux:
463 extends: .build-common
464 variables:
465 CCACHE_COMPILERCHECK: "content"
466 CCACHE_COMPRESS: "true"
467 CCACHE_DIR: /cache/mesa/ccache
468 # Use ccache transparently, and print stats before/after
469 before_script:
470 - export PATH="/usr/lib/ccache:$PATH"
471 - export CCACHE_BASEDIR="$PWD"
472 - ccache --show-stats
473 after_script:
474 - ccache --show-stats
475
476 .build-windows:
477 extends: .build-common
478 tags:
479 - windows
480 - docker
481 - "1809"
482 - mesa
483 cache:
484 key: ${CI_JOB_NAME}
485 paths:
486 - subprojects/packagecache
487
488 .meson-build:
489 extends:
490 - .build-linux
491 - .use-x86_build
492 stage: meson-x86_64
493 variables:
494 LLVM_VERSION: 9
495 script:
496 - .gitlab-ci/meson-build.sh
497
498 .scons-build:
499 extends:
500 - .build-linux
501 - .use-x86_build
502 stage: scons
503 variables:
504 SCONSFLAGS: "-j4"
505 script:
506 - .gitlab-ci/scons-build.sh
507
508 meson-testing:
509 extends:
510 - .meson-build
511 - .ci-deqp-artifacts
512 variables:
513 UNWIND: "enabled"
514 DRI_LOADERS: >
515 -D glx=dri
516 -D gbm=enabled
517 -D egl=enabled
518 -D platforms=x11
519 GALLIUM_ST: >
520 -D dri3=enabled
521 GALLIUM_DRIVERS: "swrast,virgl"
522 VULKAN_DRIVERS: amd
523 BUILDTYPE: "debugoptimized"
524 EXTRA_OPTION: >
525 -D werror=true
526 script:
527 - .gitlab-ci/meson-build.sh
528 - .gitlab-ci/prepare-artifacts.sh
529
530 meson-gallium:
531 extends: .meson-build
532 variables:
533 UNWIND: "enabled"
534 DRI_LOADERS: >
535 -D glx=dri
536 -D gbm=enabled
537 -D egl=enabled
538 -D platforms=x11,wayland
539 GALLIUM_ST: >
540 -D dri3=enabled
541 -D gallium-extra-hud=true
542 -D gallium-vdpau=enabled
543 -D gallium-xvmc=enabled
544 -D gallium-omx=bellagio
545 -D gallium-va=enabled
546 -D gallium-xa=enabled
547 -D gallium-nine=true
548 -D gallium-opencl=disabled
549 GALLIUM_DRIVERS: "iris,nouveau,kmsro,r300,r600,freedreno,swr,swrast,svga,v3d,vc4,virgl,etnaviv,panfrost,lima,zink"
550 EXTRA_OPTION: >
551 -D osmesa=gallium
552 -D tools=all
553 -D werror=true
554 script:
555 - .gitlab-ci/meson-build.sh
556 - .gitlab-ci/run-shader-db.sh
557
558 meson-classic:
559 extends: .meson-build
560 variables:
561 UNWIND: "enabled"
562 DRI_LOADERS: >
563 -D glx=dri
564 -D gbm=enabled
565 -D egl=enabled
566 -D platforms=x11,wayland,drm,surfaceless
567 DRI_DRIVERS: "auto"
568 EXTRA_OPTION: >
569 -D osmesa=classic
570 -D tools=all
571 -D werror=true
572
573 .meson-cross:
574 extends:
575 - .meson-build
576 stage: meson-misc
577 variables:
578 UNWIND: "disabled"
579 DRI_LOADERS: >
580 -D glx=disabled
581 -D gbm=disabled
582 -D egl=enabled
583 -D platforms=[]
584 -D osmesa=none
585 GALLIUM_ST: >
586 -D dri3=disabled
587 -D gallium-vdpau=disabled
588 -D gallium-xvmc=disabled
589 -D gallium-omx=disabled
590 -D gallium-va=disabled
591 -D gallium-xa=disabled
592 -D gallium-nine=false
593 LLVM_VERSION: "8"
594
595 .meson-arm:
596 extends:
597 - .meson-cross
598 - .use-arm_build
599 variables:
600 VULKAN_DRIVERS: freedreno
601 GALLIUM_DRIVERS: "etnaviv,freedreno,kmsro,lima,nouveau,panfrost,swrast,tegra,v3d,vc4"
602 BUILDTYPE: "debugoptimized"
603 tags:
604 - aarch64
605
606 meson-armhf:
607 extends:
608 - .meson-arm
609 - .ci-deqp-artifacts
610 variables:
611 CROSS: armhf
612 LLVM_VERSION: "7"
613 EXTRA_OPTION: >
614 -D llvm=disabled
615 UPLOAD_FOR_LAVA: 1
616 DEBIAN_ARCH: armhf
617 script:
618 - .gitlab-ci/meson-build.sh
619 - .gitlab-ci/prepare-artifacts.sh
620
621 meson-arm64:
622 extends:
623 - .meson-arm
624 - .ci-deqp-artifacts
625 variables:
626 VULKAN_DRIVERS: "freedreno"
627 EXTRA_OPTION: >
628 -D llvm=disabled
629 UPLOAD_FOR_LAVA: 1
630 DEBIAN_ARCH: arm64
631 script:
632 - .gitlab-ci/meson-build.sh
633 - .gitlab-ci/prepare-artifacts.sh
634
635 meson-arm64-build-test:
636 extends:
637 - .meson-arm
638 - .ci-deqp-artifacts
639 variables:
640 VULKAN_DRIVERS: "amd"
641 script:
642 - .gitlab-ci/meson-build.sh
643
644 meson-clang:
645 extends: .meson-build
646 variables:
647 UNWIND: "enabled"
648 DRI_LOADERS: >
649 -D glvnd=true
650 DRI_DRIVERS: "auto"
651 GALLIUM_DRIVERS: "auto"
652 VULKAN_DRIVERS: intel,amd,freedreno
653 CC: "ccache clang-9"
654 CXX: "ccache clang++-9"
655
656 .meson-windows-vs2019:
657 extends:
658 - .build-windows
659 - .use-windows_build_vs2019
660 stage: meson-misc
661 script:
662 - . .\.gitlab-ci\windows\mesa_build.ps1
663
664 scons-win64:
665 extends: .scons-build
666 variables:
667 SCONS_TARGET: platform=windows machine=x86_64 debug=1
668 SCONS_CHECK_COMMAND: "true"
669 allow_failure: true
670
671 meson-clover:
672 extends: .meson-build
673 variables:
674 UNWIND: "enabled"
675 DRI_LOADERS: >
676 -D glx=disabled
677 -D egl=disabled
678 -D gbm=disabled
679 GALLIUM_DRIVERS: "r600,radeonsi"
680 GALLIUM_ST: >
681 -D dri3=disabled
682 -D gallium-vdpau=disabled
683 -D gallium-xvmc=disabled
684 -D gallium-omx=disabled
685 -D gallium-va=disabled
686 -D gallium-xa=disabled
687 -D gallium-nine=false
688 -D gallium-opencl=icd
689 script:
690 - .gitlab-ci/meson-build.sh
691 - LLVM_VERSION=8 .gitlab-ci/meson-build.sh
692
693 meson-clover-old-llvm:
694 extends:
695 - meson-clover
696 - .use-x86_build_old
697 variables:
698 UNWIND: "disabled"
699 DRI_LOADERS: >
700 -D glx=disabled
701 -D egl=disabled
702 -D gbm=disabled
703 -D platforms=[]
704 GALLIUM_DRIVERS: "i915,r600"
705 script:
706 - LLVM_VERSION=3.9 .gitlab-ci/meson-build.sh
707 - LLVM_VERSION=4.0 .gitlab-ci/meson-build.sh
708 - LLVM_VERSION=5.0 .gitlab-ci/meson-build.sh
709 - LLVM_VERSION=6.0 .gitlab-ci/meson-build.sh
710 - LLVM_VERSION=7 .gitlab-ci/meson-build.sh
711
712 meson-vulkan:
713 extends: .meson-build
714 variables:
715 UNWIND: "disabled"
716 DRI_LOADERS: >
717 -D glx=disabled
718 -D gbm=disabled
719 -D egl=disabled
720 -D platforms=x11,wayland
721 -D osmesa=none
722 GALLIUM_ST: >
723 -D dri3=enabled
724 -D gallium-vdpau=disabled
725 -D gallium-xvmc=disabled
726 -D gallium-omx=disabled
727 -D gallium-va=disabled
728 -D gallium-xa=disabled
729 -D gallium-nine=false
730 -D gallium-opencl=disabled
731 -D b_sanitize=undefined
732 -D c_args=-fno-sanitize-recover=all
733 -D cpp_args=-fno-sanitize-recover=all
734 UBSAN_OPTIONS: "print_stacktrace=1"
735 VULKAN_DRIVERS: intel,amd,freedreno
736 EXTRA_OPTION: >
737 -D vulkan-overlay-layer=true
738 -D werror=true
739
740 meson-i386:
741 extends:
742 - .meson-cross
743 - .use-i386_build
744 variables:
745 CROSS: i386
746 VULKAN_DRIVERS: intel,amd
747 GALLIUM_DRIVERS: "iris,r300,radeonsi,swrast,virgl"
748 EXTRA_OPTION: >
749 -D vulkan-overlay-layer=true
750 -D werror=true
751
752 meson-s390x:
753 extends:
754 - .meson-cross
755 - .use-s390x_build
756 tags:
757 - kvm
758 variables:
759 CROSS: s390x
760 EXTRA_OPTION: >
761 -D werror=true
762 GALLIUM_DRIVERS: "swrast"
763
764 meson-ppc64el:
765 extends:
766 - meson-s390x
767 - .use-ppc64el_build
768 variables:
769 CROSS: ppc64el
770 EXTRA_OPTION: ""
771 GALLIUM_DRIVERS: "nouveau,radeonsi,swrast,virgl"
772 VULKAN_DRIVERS: "amd"
773
774 meson-mingw32-x86_64:
775 extends: .meson-build
776 stage: meson-misc
777 variables:
778 UNWIND: "disabled"
779 DRI_DRIVERS: ""
780 GALLIUM_DRIVERS: "swrast"
781 EXTRA_OPTION: >
782 -Dllvm=disabled
783 -Dosmesa=gallium
784 --cross-file=.gitlab-ci/x86_64-w64-mingw32
785
786 .test:
787 extends:
788 - .ci-run-policy
789 variables:
790 GIT_STRATEGY: none # testing doesn't build anything from source
791 before_script:
792 # Note: Build dir (and thus install) may be dirty due to GIT_STRATEGY
793 - rm -rf install
794 - tar -xf artifacts/install.tar
795 - LD_LIBRARY_PATH=install/lib find install/lib -name "*.so" -print -exec ldd {} \;
796 artifacts:
797 when: always
798 name: "mesa_${CI_JOB_NAME}"
799 paths:
800 - results/
801
802 .test-gl:
803 extends:
804 - .test
805 variables:
806 TAG: *x86_test-gl
807 image: "$CI_REGISTRY_IMAGE/debian/x86_test-gl:$TAG"
808 needs:
809 - meson-testing
810 - x86_test-gl
811 dependencies:
812 - meson-testing
813
814 .test-vk:
815 extends:
816 - .test
817 variables:
818 TAG: *x86_test-vk
819 image: "$CI_REGISTRY_IMAGE/debian/x86_test-vk:$TAG"
820 needs:
821 - meson-testing
822 - x86_test-vk
823 dependencies:
824 - meson-testing
825
826 .piglit-test:
827 extends:
828 - .test-gl
829 - .llvmpipe-rules
830 artifacts:
831 when: on_failure
832 name: "mesa_${CI_JOB_NAME}"
833 paths:
834 - summary/
835 variables:
836 LIBGL_ALWAYS_SOFTWARE: 1
837 PIGLIT_NO_WINDOW: 1
838 script:
839 - install/piglit/run.sh
840
841 piglit-quick_gl:
842 extends: .piglit-test
843 variables:
844 LP_NUM_THREADS: 0
845 NIR_VALIDATE: 0
846 PIGLIT_OPTIONS: >
847 --process-isolation false
848 -x arb_gpu_shader5
849 -x egl_ext_device_
850 -x egl_ext_platform_device
851 -x ext_timer_query@time-elapsed
852 -x glx-multithread-clearbuffer
853 -x glx-multithread-shader-compile
854 -x max-texture-size
855 -x maxsize
856 PIGLIT_PROFILES: quick_gl
857
858 piglit-glslparser:
859 extends: .piglit-test
860 variables:
861 LP_NUM_THREADS: 0
862 NIR_VALIDATE: 0
863 PIGLIT_PROFILES: glslparser
864
865 piglit-quick_shader:
866 extends: .piglit-test
867 variables:
868 LP_NUM_THREADS: 1
869 NIR_VALIDATE: 0
870 PIGLIT_PROFILES: quick_shader
871
872 .deqp-test:
873 variables:
874 DEQP_SKIPS: deqp-default-skips.txt
875 script:
876 - ./install/deqp-runner.sh
877
878 .deqp-test-gl:
879 extends:
880 - .test-gl
881 - .deqp-test
882
883 .deqp-test-vk:
884 extends:
885 - .test-vk
886 - .deqp-test
887 variables:
888 DEQP_VER: vk
889
890 .fossilize-test:
891 extends: .test-vk
892 script:
893 - ./install/fossilize-runner.sh
894 artifacts:
895 when: on_failure
896 name: "mesa_${CI_JOB_NAME}"
897 paths:
898 - results/
899
900 llvmpipe-gles2:
901 variables:
902 DEQP_VER: gles2
903 DEQP_PARALLEL: 4
904 NIR_VALIDATE: 0
905 # Don't use threads inside llvmpipe, we've already got all 4 cores
906 # busy with DEQP_PARALLEL.
907 LP_NUM_THREADS: 0
908 DEQP_EXPECTED_FAILS: deqp-llvmpipe-fails.txt
909 LIBGL_ALWAYS_SOFTWARE: "true"
910 DEQP_EXPECTED_RENDERER: llvmpipe
911 extends:
912 - .deqp-test-gl
913 - .llvmpipe-rules
914
915 softpipe-gles2:
916 extends:
917 - llvmpipe-gles2
918 - .softpipe-rules
919 variables:
920 DEQP_EXPECTED_FAILS: deqp-softpipe-fails.txt
921 DEQP_SKIPS: deqp-softpipe-skips.txt
922 GALLIUM_DRIVER: "softpipe"
923 DEQP_EXPECTED_RENDERER: softpipe
924
925 softpipe-gles3:
926 parallel: 2
927 variables:
928 DEQP_VER: gles3
929 extends: softpipe-gles2
930
931 softpipe-gles31:
932 parallel: 4
933 variables:
934 DEQP_VER: gles31
935 extends: softpipe-gles2
936
937 virgl-gles2-on-gl:
938 variables:
939 DEQP_VER: gles2
940 DEQP_PARALLEL: 4
941 NIR_VALIDATE: 0
942 DEQP_NO_SAVE_RESULTS: 1
943 # Don't use threads inside llvmpipe, we've already got all 4 cores
944 # busy with DEQP_PARALLEL.
945 LP_NUM_THREADS: 0
946 DEQP_EXPECTED_FAILS: deqp-virgl-gl-fails.txt
947 DEQP_OPTIONS: "--deqp-log-images=disable"
948 LIBGL_ALWAYS_SOFTWARE: "true"
949 GALLIUM_DRIVER: "virpipe"
950 DEQP_EXPECTED_RENDERER: virgl
951 extends:
952 - .deqp-test-gl
953 - .virgl-rules
954
955 virgl-gles3-on-gl:
956 parallel: 2
957 variables:
958 DEQP_VER: gles3
959 DEQP_RUNNER_OPTIONS: "--timeout 180"
960 extends: virgl-gles2-on-gl
961
962 virgl-gles31-on-gl:
963 parallel: 4
964 variables:
965 DEQP_VER: gles31
966 MESA_GLES_VERSION_OVERRIDE: "3.1"
967 MESA_GLSL_VERSION_OVERRIDE: "310"
968 MESA_EXTENSION_OVERRIDE: "-GL_OES_tessellation_shader"
969 extends: virgl-gles3-on-gl
970
971 virgl-gl30-on-gl:
972 variables:
973 DEQP_VER: gl30
974 extends: virgl-gles2-on-gl
975
976 virgl-gl31-on-gl:
977 variables:
978 DEQP_VER: gl31
979 extends: virgl-gles2-on-gl
980
981 virgl-gl32-on-gl:
982 variables:
983 DEQP_VER: gl32
984 extends: virgl-gles2-on-gl
985
986 # Rules for tests that should not be present in MRs or the main
987 # project's pipeline (don't block marge or report red on
988 # mesa/mesamaster) but should be present on pipelines in personal
989 # branches (so you can opt in to running the flaky test when you want
990 # to).
991 .test-manual:
992 rules:
993 - *ignore_scheduled_pipelines
994 - if: '$CI_PROJECT_PATH != "mesa/mesa" && $CI_MERGE_REQUEST_SOURCE_BRANCH_NAME != $CI_COMMIT_REF_NAME'
995 changes:
996 *all_paths
997 when: manual
998 - when: never
999
1000 virgl-gles2-on-gles:
1001 variables:
1002 VIRGL_HOST_API: GLES
1003 DEQP_EXPECTED_FAILS: deqp-virgl-gles-fails.txt
1004 extends:
1005 - virgl-gles2-on-gl
1006 - .test-manual
1007
1008 virgl-gles3-on-gles:
1009 variables:
1010 VIRGL_HOST_API: GLES
1011 DEQP_EXPECTED_FAILS: deqp-virgl-gles-fails.txt
1012 extends:
1013 - virgl-gles3-on-gl
1014 - .test-manual
1015
1016 virgl-gles31-on-gles:
1017 variables:
1018 VIRGL_HOST_API: GLES
1019 DEQP_EXPECTED_FAILS: deqp-virgl-gles-fails.txt
1020 extends:
1021 - virgl-gles31-on-gl
1022 - .test-manual
1023
1024 arm64_a630_gles2:
1025 extends:
1026 - arm64_a306_gles2
1027 variables:
1028 BM_KERNEL: /lava-files/cheza-kernel
1029 BM_CMDLINE: "ip=dhcp console=ttyMSM0,115200n8 root=/dev/nfs rw nfsrootdebug nfsroot=,tcp,nfsvers=4.2 init=/init"
1030 DEQP_EXPECTED_FAILS: deqp-freedreno-a630-fails.txt
1031 DEQP_SKIPS: deqp-freedreno-a630-skips.txt
1032 GIT_STRATEGY: none
1033 DEQP_EXPECTED_RENDERER: FD630
1034 DEQP_NO_SAVE_RESULTS: ""
1035 tags:
1036 - google-freedreno-cheza
1037 script:
1038 - ./install/bare-metal/cros-servo.sh
1039
1040 arm64_a630_gles31:
1041 extends: arm64_a630_gles2
1042 variables:
1043 CI_NODE_INDEX: 1
1044 CI_NODE_TOTAL: 2
1045 DEQP_VER: gles31
1046 # gles31 is about 12 minutes with validation enabled.
1047 NIR_VALIDATE: 0
1048
1049 arm64_a630_gles3:
1050 extends: arm64_a630_gles2
1051 variables:
1052 CI_NODE_INDEX: 1
1053 CI_NODE_TOTAL: 2
1054 DEQP_VER: gles3
1055 # gles3 is about 15 minutes with validation enabled.
1056 NIR_VALIDATE: 0
1057
1058 # We almost always manage to lower UBOs back to constant uploads in
1059 # the test suite, so get a little testing for it here.
1060 .arm64_a630_noubo:
1061 extends: arm64_a630_gles31
1062 variables:
1063 DEQP_VER: gles31
1064 IR3_SHADER_DEBUG: nouboopt
1065 DEQP_CASELIST_FILTER: "functional.*ubo"
1066
1067 # The driver does some guessing as to whether to render using gmem
1068 # or bypass, and some GLES3.1 features interact with either one.
1069 # Do a little testing with gmem and bypass forced.
1070 .arm64_a630_bypass:
1071 extends: arm64_a630_gles31
1072 variables:
1073 CI_NODE_INDEX: 1
1074 CI_NODE_TOTAL: 5
1075 FD_MESA_DEBUG: nogmem
1076 DEQP_EXPECTED_FAILS: deqp-freedreno-a630-bypass-fails.txt
1077
1078 .arm64_a630_traces:
1079 extends:
1080 - arm64_a630_gles2
1081 variables:
1082 BARE_METAL_TEST_SCRIPT: "/install/tracie-runner-gl.sh"
1083 DEVICE_NAME: "freedreno-a630"
1084 TRACIE_NO_UNIT_TESTS: 1
1085 # This lets us run several more traces which don't use any features we're
1086 # missing.
1087 MESA_GLSL_VERSION_OVERRIDE: "460"
1088 MESA_GL_VERSION_OVERRIDE: "4.6"
1089
1090 # Along with checking gmem path, check that we don't get obvious nir
1091 # validation failures (though it's too expensive to have it on for the
1092 # full CTS)
1093 .arm64_a630_gmem:
1094 extends: arm64_a630_gles31
1095 variables:
1096 CI_NODE_INDEX: 1
1097 CI_NODE_TOTAL: 5
1098 FD_MESA_DEBUG: nobypass
1099 NIR_VALIDATE: 1
1100
1101 .arm64_a630_vk:
1102 extends: arm64_a630_gles2
1103 variables:
1104 DEQP_VER: vk
1105 CI_NODE_INDEX: 1
1106 CI_NODE_TOTAL: 50
1107 VK_DRIVER: freedreno
1108 # Force binning in the main run, which makes sure we render at
1109 # least 2 bins. This is the path that impacts the most different
1110 # features. However, we end up with flaky results in
1111 # dEQP-VK.binding_model.*.geometry and dEQP-VK.glsl.*_vertex.
1112 TU_DEBUG: forcebin
1113
1114 # Do a separate sysmem pass over the testcases that really affect sysmem
1115 # rendering. This is currently very flaky, leave it as an option for devs
1116 # to click play on in their branches.
1117 .arm64_a630_vk_sysmem:
1118 extends:
1119 - .arm64_a630_vk
1120 variables:
1121 CI_NODE_INDEX: 1
1122 CI_NODE_TOTAL: 10
1123 DEQP_CASELIST_FILTER: "dEQP-VK.renderpass.*"
1124 DEQP_EXPECTED_FAILS: deqp-freedreno-a630-bypass-fails.txt
1125 TU_DEBUG: sysmem
1126
1127 .baremetal-test:
1128 extends:
1129 - .ci-run-policy
1130 - .test
1131 stage: test
1132 artifacts:
1133 when: always
1134 name: "mesa_${CI_JOB_NAME}"
1135 paths:
1136 - results/
1137 - serial*.txt
1138
1139 arm64_a306_gles2:
1140 extends:
1141 - .baremetal-test
1142 - .use-arm64_test
1143 - .freedreno-rules
1144 variables:
1145 BM_KERNEL: /lava-files/Image.gz
1146 BM_DTB: /lava-files/apq8016-sbc.dtb
1147 BM_ROOTFS: /lava-files/rootfs-arm64
1148 BM_CMDLINE: "ip=dhcp console=ttyMSM0,115200n8"
1149 FLAKES_CHANNEL: "#freedreno-ci"
1150 BARE_METAL_TEST_SCRIPT: "/install/deqp-runner.sh"
1151 DEQP_EXPECTED_FAILS: deqp-freedreno-a307-fails.txt
1152 DEQP_SKIPS: deqp-freedreno-a307-skips.txt
1153 DEQP_VER: gles2
1154 DEQP_PARALLEL: 4
1155 DEQP_EXPECTED_RENDERER: FD307
1156 # Since we can't get artifacts back yet, skip making them.
1157 DEQP_NO_SAVE_RESULTS: 1
1158 # NIR_VALIDATE=0 left intentionally unset as a3xx is fast enough at its small testsuite.
1159 script:
1160 - ./install/bare-metal/fastboot.sh
1161 needs:
1162 - arm64_test
1163 - meson-arm64
1164 tags:
1165 - google-freedreno-db410c
1166
1167 # Fractional run, single threaded, due to flaky results
1168 arm64_a306_gles3:
1169 extends:
1170 - arm64_a306_gles2
1171 variables:
1172 DEQP_VER: gles3
1173 DEQP_PARALLEL: 1
1174 CI_NODE_INDEX: 1
1175 CI_NODE_TOTAL: 25
1176 NIR_VALIDATE: 0
1177
1178 # Fractional runs with debug options. Note that since we're not
1179 # hitting the iommu faults, we can run in parallel (derive from gles2, not gles3).
1180 arm64_a306_gles3_options:
1181 extends: arm64_a306_gles2
1182 variables:
1183 DEQP_VER: gles3
1184 script:
1185 # Check that the non-constbuf UBO case works.
1186 - DEQP_RUN_SUFFIX=-nouboopt IR3_SHADER_DEBUG=nouboopt DEQP_CASELIST_FILTER="functional.*ubo" ./install/bare-metal/fastboot.sh
1187
1188 arm64_a530_gles2:
1189 extends:
1190 - arm64_a306_gles2
1191 variables:
1192 BM_KERNEL: /lava-files/db820c-kernel
1193 BM_DTB: /lava-files/db820c.dtb
1194 # Disable SMP because only CPU 0 is at a freq higher than 19mhz on
1195 # current upstream kernel.
1196 BM_CMDLINE: "ip=dhcp console=ttyMSM0,115200n8 nosmp"
1197 DEQP_EXPECTED_FAILS: deqp-freedreno-a530-fails.txt
1198 DEQP_SKIPS: deqp-freedreno-a530-skips.txt
1199 DEQP_EXPECTED_RENDERER: FD530
1200 NIR_VALIDATE: 0
1201 tags:
1202 - google-freedreno-db820c
1203
1204 arm64_a530_gles3:
1205 extends:
1206 - arm64_a530_gles2
1207 variables:
1208 DEQP_VER: gles3
1209 DEQP_PARALLEL: 1
1210 CI_NODE_INDEX: 1
1211 CI_NODE_TOTAL: 40
1212
1213 arm64_a530_gles31:
1214 extends:
1215 - arm64_a530_gles3
1216 variables:
1217 DEQP_VER: gles31
1218 CI_NODE_INDEX: 1
1219 CI_NODE_TOTAL: 10
1220
1221 # RADV CI
1222 .test-radv:
1223 extends: .radv-rules
1224 stage: radv
1225 variables:
1226 VK_DRIVER: radeon
1227 ACO_DEBUG: validateir,validatera
1228
1229 # Can only be triggered manually on personal branches because RADV is the only
1230 # driver that does Vulkan testing at the moment.
1231 radv_polaris10_vkcts:
1232 extends:
1233 - .deqp-test-vk
1234 - .test-radv
1235 - .test-manual
1236 variables:
1237 DEQP_SKIPS: deqp-radv-polaris10-skips.txt
1238 tags:
1239 - polaris10
1240
1241 radv-fossils:
1242 extends:
1243 - .fossilize-test
1244 - .test-radv
1245 script:
1246 # Pitcairn (GFX6)
1247 - export RADV_FORCE_FAMILY="pitcairn"
1248 - ./install/fossilize-runner.sh
1249 # Bonaire (GFX7)
1250 - export RADV_FORCE_FAMILY="bonaire"
1251 - ./install/fossilize-runner.sh
1252 # Polaris10 (GFX8)
1253 - export RADV_FORCE_FAMILY="polaris10"
1254 - ./install/fossilize-runner.sh
1255 # Vega10 (GFX9)
1256 - export RADV_FORCE_FAMILY="gfx900"
1257 - ./install/fossilize-runner.sh
1258 # Navi10 (GFX10)
1259 - export RADV_FORCE_FAMILY="gfx1010"
1260 - ./install/fossilize-runner.sh
1261
1262 # Traces CI
1263 .traces-test:
1264 cache:
1265 key: ${CI_JOB_NAME}
1266 paths:
1267 - traces-db/
1268
1269 .traces-test-gl:
1270 extends:
1271 - .test-gl
1272 - .traces-test
1273 script:
1274 - ./install/tracie-runner-gl.sh
1275
1276 .traces-test-vk:
1277 extends:
1278 - .test-vk
1279 - .traces-test
1280 script:
1281 - ./install/tracie-runner-vk.sh
1282
1283 llvmpipe-traces:
1284 extends:
1285 - .traces-test-gl
1286 - .llvmpipe-rules
1287 variables:
1288 LIBGL_ALWAYS_SOFTWARE: "true"
1289 GALLIUM_DRIVER: "llvmpipe"
1290 DEVICE_NAME: "gl-vmware-llvmpipe"
1291
1292 radv-polaris10-traces:
1293 extends:
1294 - .traces-test-vk
1295 - .test-radv
1296 - .test-manual
1297 variables:
1298 DEVICE_NAME: "vk-amd-polaris10"
1299 tags:
1300 - polaris10
1301
1302 virgl-traces:
1303 extends:
1304 - .traces-test-gl
1305 - .virgl-rules
1306 variables:
1307 LIBGL_ALWAYS_SOFTWARE: "true"
1308 GALLIUM_DRIVER: "virpipe"
1309 DEVICE_NAME: "gl-virgl"
1310 MESA_GLES_VERSION_OVERRIDE: "3.1"
1311 MESA_GLSL_VERSION_OVERRIDE: "310"