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