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