ci/freedreno: bump VK coverage to 1/4 of the CTS.
[platform/upstream/mesa.git] / .gitlab-ci.yml
1 variables:
2   FDO_UPSTREAM_REPO: mesa/mesa
3   MESA_TEMPLATES_COMMIT: &ci-templates-commit 52dd4a94044449c8481d18dcdc221a3c636366d2
4   CI_PRE_CLONE_SCRIPT: |-
5           set -o xtrace
6           /usr/bin/wget -q -O- ${CI_PROJECT_URL}/-/raw/${CI_COMMIT_SHA}/.gitlab-ci/download-git-cache.sh | sh -
7           set +o xtrace
8   MINIO_HOST: minio-packet.freedesktop.org
9
10 include:
11   - project: 'freedesktop/ci-templates'
12     ref: 79c325922670137e8f0a4dc5f6f097e0eb57c1af
13     file:
14       - '/templates/ci-fairy.yml'
15   - project: 'freedesktop/ci-templates'
16     ref: *ci-templates-commit
17     file:
18       - '/templates/debian.yml'
19   - local: '.gitlab-ci/lava-gitlab-ci.yml'
20   - local: '.gitlab-ci/test-source-dep.yml'
21
22 stages:
23   - sanity
24   - container
25   - container-2
26   - git-archive
27   - meson-x86_64
28   - build-misc
29   - amd
30   - arm
31   - broadcom
32   - freedreno
33   - software-renderer
34   - layered-backends
35   - deploy
36   - success
37
38 # Generic rule to not run the job during scheduled pipelines
39 # ----------------------------------------------------------
40 .scheduled_pipelines-rules:
41   rules: &ignore_scheduled_pipelines
42     if: &is-scheduled-pipeline '$CI_PIPELINE_SOURCE == "schedule"'
43     when: never
44
45 # YAML anchors for rule conditions
46 # --------------------------------
47 .rules-anchors:
48   rules:
49     # For Marge Bot
50     - if: &is-for-marge '$GITLAB_USER_LOGIN == "marge-bot"'
51       when: never
52     # Forked project branch
53     - if: &is-forked-branch '$CI_PROJECT_NAMESPACE != "mesa" && $CI_MERGE_REQUEST_SOURCE_BRANCH_NAME != $CI_COMMIT_REF_NAME'
54       when: manual
55     # Forked project branch / pre-merge pipeline
56     - if: &is-forked-branch-or-pre-merge '$CI_PROJECT_NAMESPACE != "mesa" || $CI_MERGE_REQUEST_SOURCE_BRANCH_NAME == $CI_COMMIT_REF_NAME'
57       when: manual
58     # Pipeline runs for the master branch of the main project
59     - if: &is-main-master '$CI_PROJECT_NAMESPACE == "mesa" && $CI_COMMIT_REF_NAME == "master" && $CI_MERGE_REQUEST_SOURCE_BRANCH_NAME != "master"'
60       when: always
61     # Post-merge pipeline
62     - if: &is-post-merge '$CI_PROJECT_NAMESPACE == "mesa" && $CI_MERGE_REQUEST_SOURCE_BRANCH_NAME != $CI_COMMIT_REF_NAME'
63       when: on_success
64     # Post-merge pipeline, not for Marge Bot
65     - if: &is-post-merge-not-for-marge '$CI_PROJECT_NAMESPACE == "mesa" && $GITLAB_USER_LOGIN != "marge-bot" && $CI_MERGE_REQUEST_SOURCE_BRANCH_NAME != $CI_COMMIT_REF_NAME'
66       when: on_success
67     # Pre-merge pipeline
68     - if: &is-pre-merge '$CI_MERGE_REQUEST_SOURCE_BRANCH_NAME == $CI_COMMIT_REF_NAME'
69       when: on_success
70     # Pre-merge pipeline for Marge Bot
71     - if: &is-pre-merge-for-marge '$GITLAB_USER_LOGIN == "marge-bot" && $CI_MERGE_REQUEST_SOURCE_BRANCH_NAME == $CI_COMMIT_REF_NAME'
72       when: on_success
73
74
75 .docs-base:
76   extends:
77     - .fdo.ci-fairy
78     - .ci-run-policy
79   script:
80   - apk --no-cache add graphviz
81   - pip3 install sphinx sphinx_rtd_theme
82   - sphinx-build -b html docs public
83
84 pages:
85   extends: .docs-base
86   stage: deploy
87   artifacts:
88     paths:
89     - public
90   needs: []
91   rules:
92     - *ignore_scheduled_pipelines
93     - if: *is-main-master
94       changes: &docs-or-ci
95       - docs/**/*
96       - .gitlab-ci.yml
97       when: always
98     # Other cases default to never
99
100 test-docs:
101   extends: .docs-base
102   # Cancel job if a newer commit is pushed to the same branch
103   interruptible: true
104   stage: deploy
105   needs: []
106   rules:
107     - *ignore_scheduled_pipelines
108     - if: *is-forked-branch
109       changes: *docs-or-ci
110       when: manual
111     # Other cases default to never
112
113 test-docs-mr:
114   extends:
115     - test-docs
116   needs:
117     - sanity
118   rules:
119     - if: *is-pre-merge-for-marge
120       changes: *docs-or-ci
121       when: on_success
122     - if: *is-pre-merge
123       changes: *docs-or-ci
124       when: manual
125     # Other cases default to never
126
127 # When to automatically run the CI
128 .ci-run-policy:
129   rules:
130     - *ignore_scheduled_pipelines
131     # If any files affecting the pipeline are changed, build/test jobs run
132     # automatically once all dependency jobs have passed
133     - changes: &all_paths
134       - VERSION
135       - bin/git_sha1_gen.py
136       - bin/install_megadrivers.py
137       - bin/meson_get_version.py
138       - bin/symbols-check.py
139       # GitLab CI
140       - .gitlab-ci.yml
141       - .gitlab-ci/**/*
142       # Meson
143       - meson*
144       - build-support/**/*
145       - subprojects/**/*
146       # SCons
147       - SConstruct
148       - scons/**/*
149       - common.py
150       # Source code
151       - include/**/*
152       - src/**/*
153       when: on_success
154     # Otherwise, build/test jobs won't run
155     - when: never
156   retry:
157     max: 2
158     when:
159       - runner_system_failure
160
161 success:
162   stage: success
163   image: debian:stable-slim
164   rules:
165     - *ignore_scheduled_pipelines
166     - if: *is-post-merge
167       when: never
168     - if: *is-for-marge
169       changes: *docs-or-ci
170       when: never
171     - changes: *all_paths
172       when: never
173     - if: *is-pre-merge
174       when: on_success
175   variables:
176     GIT_STRATEGY: none
177   script:
178     - echo "Dummy job to make sure every merge request pipeline runs at least one job"
179
180
181 .ci-deqp-artifacts:
182   artifacts:
183     name: "mesa_${CI_JOB_NAME}"
184     when: always
185     untracked: false
186     paths:
187       # Watch out!  Artifacts are relative to the build dir.
188       # https://gitlab.com/gitlab-org/gitlab-ce/commit/8788fb925706cad594adf6917a6c5f6587dd1521
189       - artifacts
190
191 # Build the CI docker images.
192 #
193 # MESA_IMAGE_TAG is the tag of the docker image used by later stage jobs. If the
194 # image doesn't exist yet, the container stage job generates it.
195 #
196 # In order to generate a new image, one should generally change the tag.
197 # While removing the image from the registry would also work, that's not
198 # recommended except for ephemeral images during development: Replacing
199 # an image after a significant amount of time might pull in newer
200 # versions of gcc/clang or other packages, which might break the build
201 # with older commits using the same tag.
202 #
203 # After merging a change resulting in generating a new image to the
204 # main repository, it's recommended to remove the image from the source
205 # repository's container registry, so that the image from the main
206 # repository's registry will be used there as well.
207
208 .container:
209   stage: container
210   extends:
211     - .ci-run-policy
212   rules:
213     - *ignore_scheduled_pipelines
214     # Run pipeline by default in the main project if any CI pipeline
215     # configuration files were changed, to ensure docker images are up to date
216     - if: *is-post-merge
217       changes:
218       - .gitlab-ci.yml
219       - .gitlab-ci/**/*
220       when: on_success
221     # Run pipeline by default if it was triggered by Marge Bot, is for a
222     # merge request, and any files affecting the pipeline were changed
223     - if: *is-pre-merge-for-marge
224       changes:
225         *all_paths
226       when: on_success
227     # Run pipeline by default in the main project if it was not triggered by
228     # Marge Bot, and any files affecting the pipeline were changed
229     - if: *is-post-merge-not-for-marge
230       changes:
231         *all_paths
232       when: on_success
233     # Allow triggering jobs manually in other cases if any files affecting the
234     # pipeline were changed
235     - changes:
236         *all_paths
237       when: manual
238     # Otherwise, container jobs won't run
239     - when: never
240   variables:
241     FDO_DISTRIBUTION_TAG: "${MESA_IMAGE_TAG}--${MESA_TEMPLATES_COMMIT}"
242     FDO_DISTRIBUTION_VERSION: buster-slim
243     FDO_REPO_SUFFIX: "debian/$CI_JOB_NAME"
244     FDO_DISTRIBUTION_EXEC: 'env FDO_CI_CONCURRENT=${FDO_CI_CONCURRENT} bash .gitlab-ci/container/${CI_JOB_NAME}.sh'
245     # no need to pull the whole repo to build the container image
246     GIT_STRATEGY: none
247
248 .use-base-image:
249   extends:
250     - .container
251     # Don't want the .container rules
252     - .ci-run-policy
253   stage: container-2
254   variables:
255     FDO_BASE_IMAGE: "${CI_REGISTRY_IMAGE}/${MESA_BASE_IMAGE}:${MESA_BASE_TAG}--${MESA_TEMPLATES_COMMIT}"
256
257 # Debian 10 based x86 build image base
258 x86_build-base:
259   extends:
260     - .fdo.container-build@debian
261     - .container
262   variables:
263     MESA_IMAGE_TAG: &x86_build-base "2021-01-08-more-vulkan-cross"
264
265 .use-x86_build-base:
266   extends:
267     - .fdo.container-build@debian
268     - .use-base-image
269   variables:
270     MESA_BASE_IMAGE: "debian/x86_build-base"
271     MESA_BASE_TAG: *x86_build-base
272   needs:
273     - x86_build-base
274
275 # Debian 10 based x86 main build image
276 x86_build:
277   extends:
278     - .use-x86_build-base
279   variables:
280     MESA_IMAGE_TAG: &x86_build "2021-02-02-procps"
281
282 .use-x86_build:
283   variables:
284     TAG: *x86_build
285   image: "$CI_REGISTRY_IMAGE/debian/x86_build:${TAG}--${MESA_TEMPLATES_COMMIT}"
286   needs:
287     - x86_build
288
289 # Debian 10 based i386 cross-build image
290 i386_build:
291   extends:
292     - .use-x86_build-base
293   variables:
294     MESA_IMAGE_TAG: &i386_build "2021-01-08-more-vulkan-cross"
295
296 .use-i386_build:
297   variables:
298     TAG: *i386_build
299   image: "$CI_REGISTRY_IMAGE/debian/i386_build:${TAG}--${MESA_TEMPLATES_COMMIT}"
300   needs:
301     - i386_build
302
303 # Debian 10 based ppc64el cross-build image
304 ppc64el_build:
305   extends:
306     - .use-x86_build-base
307   variables:
308     MESA_IMAGE_TAG: &ppc64el_build "2021-01-08-more-vulkan-cross"
309
310 .use-ppc64el_build:
311   variables:
312     TAG: *ppc64el_build
313   image: "$CI_REGISTRY_IMAGE/debian/ppc64el_build:${TAG}--${MESA_TEMPLATES_COMMIT}"
314   needs:
315     - ppc64el_build
316
317 # Debian 10 based s390x cross-build image
318 s390x_build:
319   extends:
320     - .use-x86_build-base
321   variables:
322     MESA_IMAGE_TAG: &s390x_build "2021-01-08-more-vulkan-cross"
323
324 .use-s390x_build:
325   variables:
326     TAG: *s390x_build
327   image: "$CI_REGISTRY_IMAGE/debian/s390x_build:${TAG}--${MESA_TEMPLATES_COMMIT}"
328   needs:
329     - s390x_build
330
331 # Android NDK cross-build image
332 android_build:
333   extends:
334     - .use-x86_build-base
335   variables:
336     MESA_IMAGE_TAG: &android_build "2020-12-17-use-ephemeral"
337
338 .use-android_build:
339   variables:
340     TAG: *android_build
341   image: "$CI_REGISTRY_IMAGE/debian/android_build:${TAG}--${MESA_TEMPLATES_COMMIT}"
342   needs:
343     - android_build
344
345 # Debian 10 based x86 test image base
346 x86_test-base:
347   extends: x86_build-base
348   variables:
349     MESA_IMAGE_TAG: &x86_test-base "2021-01-14-asan"
350
351 .use-x86_test-base:
352   extends:
353     - .fdo.container-build@debian
354     - .use-base-image
355   variables:
356     MESA_BASE_IMAGE: "debian/x86_test-base"
357     MESA_BASE_TAG: *x86_test-base
358   needs:
359     - x86_test-base
360
361 # Debian 10 based x86 test image for GL
362 x86_test-gl:
363   extends: .use-x86_test-base
364   variables:
365     MESA_IMAGE_TAG: &x86_test-gl "2021-02-05-runner"
366
367 # Debian 10 based x86 test image for VK
368 x86_test-vk:
369   extends: .use-x86_test-base
370   variables:
371     MESA_IMAGE_TAG: &x86_test-vk "2021-02-05-runner"
372
373 # Debian 10 based ARM build image
374 arm_build:
375   extends:
376     - .fdo.container-build@debian@arm64v8
377     - .container
378   variables:
379     MESA_IMAGE_TAG: &arm_build "2020-12-23-opengl"
380
381 .use-arm_build:
382   variables:
383     TAG: *arm_build
384   image: "$CI_REGISTRY_IMAGE/debian/arm_build:${TAG}--${MESA_TEMPLATES_COMMIT}"
385   needs:
386     - arm_build
387
388 # Debian 10 based x86 baremetal image base
389 arm_test-base:
390   extends:
391     - .fdo.container-build@debian
392     - .container
393   variables:
394     MESA_IMAGE_TAG: &arm_test-base "2021-01-21-noexpect"
395
396 .use-arm_test-base:
397   extends:
398     - .fdo.container-build@debian
399     - .use-base-image
400   variables:
401     MESA_BASE_IMAGE: "debian/arm_test-base"
402     MESA_BASE_TAG: *arm_test-base
403   needs:
404     - arm_test-base
405
406 # x86 image with ARM64 rootfs for baremetal testing.
407 arm64_test:
408   extends:
409     - .use-arm_test-base
410   variables:
411     MESA_IMAGE_TAG: &arm64_test "2021-02-01-runner"
412
413 .use-arm64_test:
414   variables:
415     TAG: *arm64_test
416   image: "$CI_REGISTRY_IMAGE/debian/arm64_test:${TAG}--${MESA_TEMPLATES_COMMIT}"
417   needs:
418     - arm64_test
419
420 # x86 image with armhf rootfs for baremetal testing
421 armhf_test:
422   extends:
423     - .use-arm_test-base
424   variables:
425     MESA_IMAGE_TAG: &armhf_test "2021-02-01-runner"
426
427 .use-armhf_test:
428   variables:
429     TAG: *armhf_test
430   image: "$CI_REGISTRY_IMAGE/debian/armhf_test:${TAG}--${MESA_TEMPLATES_COMMIT}"
431   needs:
432     - armhf_test
433
434 # Native Windows docker builds
435 #
436 # Unlike the above Linux-based builds - including MinGW/SCons builds which
437 # cross-compile for Windows - which use the freedesktop ci-templates, we
438 # cannot use the same scheme here. As Windows lacks support for
439 # Docker-in-Docker, and Podman does not run natively on Windows, we have
440 # to open-code much of the same ourselves.
441 #
442 # This is achieved by first running in a native Windows shell instance
443 # (host PowerShell) in the container stage to build and push the image,
444 # then in the build stage by executing inside Docker.
445
446 .windows-docker-vs2019:
447   variables:
448     WINDOWS_TAG: "2021-01-29"
449     WINDOWS_IMAGE: "$CI_REGISTRY_IMAGE/windows/x64_build:${WINDOWS_TAG}--${MESA_TEMPLATES_COMMIT}"
450     WINDOWS_UPSTREAM_IMAGE: "$CI_REGISTRY/$FDO_UPSTREAM_REPO/windows/x64_build:${WINDOWS_TAG}--${MESA_TEMPLATES_COMMIT}"
451
452 windows_build_vs2019:
453   extends:
454     - .container
455     - .windows-docker-vs2019
456   stage: container
457   variables:
458     GIT_STRATEGY: fetch # we do actually need the full repository though
459   timeout: 2h 30m # LLVM + piglit takes ages
460   tags:
461     - windows
462     - shell
463     - "1809"
464     - mesa
465   script:
466     - .\.gitlab-ci\windows\mesa_container.ps1 $CI_REGISTRY $CI_REGISTRY_USER $CI_REGISTRY_PASSWORD $WINDOWS_IMAGE $WINDOWS_UPSTREAM_IMAGE
467
468 .use-windows_build_vs2019:
469   extends: .windows-docker-vs2019
470   image: "$WINDOWS_IMAGE"
471   needs:
472     - windows_build_vs2019
473
474
475 # Git archive
476
477 make git archive:
478   extends:
479     - .fdo.ci-fairy
480   stage: git-archive
481   rules:
482     - if: *is-scheduled-pipeline
483       when: on_success
484   # ensure we are running on packet
485   tags:
486     - packet.net
487   script:
488     # Compactify the .git directory
489     - git gc --aggressive
490     # compress the current folder
491     - tar -cvzf ../$CI_PROJECT_NAME.tar.gz .
492
493     # login with the JWT token
494     - ci-fairy minio login $CI_JOB_JWT
495     - ci-fairy minio cp ../$CI_PROJECT_NAME.tar.gz minio://$MINIO_HOST/git-cache/$CI_PROJECT_NAMESPACE/$CI_PROJECT_NAME/$CI_PROJECT_NAME.tar.gz
496
497
498 # Sanity checks of MR settings and commit logs
499 sanity:
500   extends:
501     - .fdo.ci-fairy
502   stage: sanity
503   rules:
504     - if: *is-pre-merge
505       when: on_success
506     # Other cases default to never
507   variables:
508     GIT_STRATEGY: none
509   script:
510     # ci-fairy check-commits --junit-xml=check-commits.xml
511     - ci-fairy check-merge-request --require-allow-collaboration --junit-xml=check-merge-request.xml
512   artifacts:
513     when: on_failure
514     reports:
515       junit: check-*.xml
516
517
518 # BUILD
519
520 # Shared between windows and Linux
521 .build-common:
522   extends: .ci-run-policy
523   # Cancel job if a newer commit is pushed to the same branch
524   interruptible: true
525   artifacts:
526     name: "mesa_${CI_JOB_NAME}"
527     when: always
528     paths:
529       - _build/meson-logs/*.txt
530       # scons:
531       - build/*/config.log
532       - shader-db
533
534 # Just Linux
535 .build-linux:
536   extends: .build-common
537   variables:
538     CCACHE_COMPILERCHECK: "content"
539     CCACHE_COMPRESS: "true"
540     CCACHE_DIR: /cache/mesa/ccache
541   # Use ccache transparently, and print stats before/after
542   before_script:
543     - export PATH="/usr/lib/ccache:$PATH"
544     - export CCACHE_BASEDIR="$PWD"
545     - ccache --show-stats
546   after_script:
547     - ccache --show-stats
548
549 .build-windows:
550   extends: .build-common
551   tags:
552     - windows
553     - docker
554     - "1809"
555     - mesa
556   cache:
557     key: ${CI_JOB_NAME}
558     paths:
559       - subprojects/packagecache
560
561 .meson-build:
562   extends:
563     - .build-linux
564     - .use-x86_build
565   stage: meson-x86_64
566   variables:
567     LLVM_VERSION: 10
568   script:
569     - .gitlab-ci/meson-build.sh
570
571 .scons-build:
572   extends:
573     - .build-linux
574     - .use-x86_build
575   stage: build-misc
576   script:
577     - env SCONSFLAGS="-j${FDO_CI_CONCURRENT:-4}" .gitlab-ci/scons-build.sh
578
579 meson-testing:
580   extends:
581     - .meson-build
582     - .ci-deqp-artifacts
583   variables:
584     UNWIND: "enabled"
585     DRI_LOADERS: >
586       -D glx=dri
587       -D gbm=enabled
588       -D egl=enabled
589       -D platforms=x11
590     GALLIUM_ST: >
591       -D dri3=enabled
592     GALLIUM_DRIVERS: "swrast,virgl,radeonsi"
593     VULKAN_DRIVERS: "swrast,amd"
594     BUILDTYPE: "debugoptimized"
595     EXTRA_OPTION: >
596       -D werror=true
597     UPLOAD_FOR_LAVA: 1
598     DEBIAN_ARCH: amd64
599   script:
600     - .gitlab-ci/meson-build.sh
601     - .gitlab-ci/prepare-artifacts.sh
602
603 meson-testing-asan:
604   extends:
605     - meson-testing
606   variables:
607     EXTRA_OPTION: >
608       -D b_sanitize=address
609     UPLOAD_FOR_LAVA: ""
610     ARTIFACTS_DEBUG_SYMBOLS: 1
611
612 meson-clover-testing:
613   extends:
614     - .meson-build
615     - .ci-deqp-artifacts
616   variables:
617     UNWIND: "enabled"
618     LLVM_VERSION: 10
619     DRI_LOADERS: >
620       -D glx=disabled
621       -D egl=disabled
622       -D gbm=disabled
623     GALLIUM_ST: >
624       -D gallium-opencl=icd
625       -D opencl-spirv=true
626     GALLIUM_DRIVERS: "swrast"
627     BUILDTYPE: "debugoptimized"
628     EXTRA_OPTION: >
629       -D werror=true
630   script:
631     - .gitlab-ci/meson-build.sh
632     - .gitlab-ci/prepare-artifacts.sh
633
634 meson-gallium:
635   extends: .meson-build
636   variables:
637     UNWIND: "enabled"
638     DRI_LOADERS: >
639       -D glx=dri
640       -D gbm=enabled
641       -D egl=enabled
642       -D platforms=x11,wayland
643     GALLIUM_ST: >
644       -D dri3=enabled
645       -D gallium-extra-hud=true
646       -D gallium-vdpau=enabled
647       -D gallium-xvmc=enabled
648       -D gallium-omx=bellagio
649       -D gallium-va=enabled
650       -D gallium-xa=enabled
651       -D gallium-nine=true
652       -D gallium-opencl=disabled
653     GALLIUM_DRIVERS: "iris,nouveau,kmsro,r300,r600,freedreno,swr,swrast,svga,v3d,vc4,virgl,etnaviv,panfrost,lima,zink,d3d12"
654     VULKAN_DRIVERS: swrast
655     EXTRA_OPTION: >
656       -D osmesa=true
657       -D tools=all
658       -D werror=true
659   script:
660     - .gitlab-ci/meson-build.sh
661     - .gitlab-ci/run-shader-db.sh
662     - src/freedreno/.gitlab-ci/run-fdtools.sh
663
664 # Test a release build with -Werror so new warnings don't sneak in.
665 meson-release:
666   extends: .meson-build
667   variables:
668     UNWIND: "enabled"
669     DRI_LOADERS: >
670       -D glx=dri
671       -D gbm=enabled
672       -D egl=enabled
673       -D platforms=x11,wayland
674     GALLIUM_ST: >
675       -D dri3=enabled
676       -D gallium-extra-hud=true
677       -D gallium-vdpau=enabled
678       -D gallium-xvmc=disabled
679       -D gallium-omx=disabled
680       -D gallium-va=enabled
681       -D gallium-xa=enabled
682       -D gallium-nine=false
683       -D gallium-opencl=disabled
684       -D llvm=false
685     GALLIUM_DRIVERS: "nouveau,kmsro,freedreno,r300,svga,swrast,v3d,vc4,virgl,etnaviv,panfrost,lima,zink,d3d12"
686     BUILDTYPE: "release"
687     EXTRA_OPTION: >
688       -D osmesa=true
689       -D tools=all
690       -D werror=true
691   script:
692     - .gitlab-ci/meson-build.sh
693
694 meson-android:
695   extends:
696     - .meson-cross
697     - .use-android_build
698   variables:
699     UNWIND: "disabled"
700     DRI_LOADERS: >
701       -D glx=disabled
702       -D gbm=disabled
703       -D egl=enabled
704       -D platforms=android
705     EXTRA_OPTION: >
706       -D android-stub=true
707       -D llvm=disabled
708       -D platform-sdk-version=26
709     GALLIUM_ST: >
710       -D dri3=disabled
711       -D gallium-vdpau=disabled
712       -D gallium-xvmc=disabled
713       -D gallium-omx=disabled
714       -D gallium-va=disabled
715       -D gallium-xa=disabled
716       -D gallium-nine=false
717       -D gallium-opencl=disabled
718     LLVM_VERSION: ""
719   script:
720     # arm64 build: Can't build v3d/vc4 because they require expat for v3d_decode.
721     - PKG_CONFIG_PATH=/usr/local/lib/aarch64-linux-android/pkgconfig/:/android-ndk-r21d/toolchains/llvm/prebuilt/linux-x86_64/sysroot/usr/lib/aarch64-linux-android/pkgconfig/ CROSS=aarch64-linux-android GALLIUM_DRIVERS=etnaviv,freedreno,lima,panfrost VULKAN_DRIVERS=freedreno .gitlab-ci/meson-build.sh
722     # x86_64 build:
723     # Can't do Intel because gen_decoder.c currently requires libexpat, which
724     # is not a dependency that AOSP wants to accept.  Can't do Radeon because
725     # it requires LLVM, which we don't have an Android build of.
726     # - PKG_CONFIG_PATH=/usr/local/lib/x86_64-linux-android/pkgconfig/ CROSS=x86_64-linux-android GALLIUM_DRIVERS=iris VULKAN_DRIVERS=intel .gitlab-ci/meson-build.sh
727
728 .meson-cross:
729   extends:
730     - .meson-build
731   stage: build-misc
732   variables:
733     UNWIND: "disabled"
734     DRI_LOADERS: >
735       -D glx=dri
736       -D gbm=enabled
737       -D egl=enabled
738       -D platforms=x11
739       -D osmesa=false
740     GALLIUM_ST: >
741       -D dri3=enabled
742       -D gallium-vdpau=disabled
743       -D gallium-xvmc=disabled
744       -D gallium-omx=disabled
745       -D gallium-va=disabled
746       -D gallium-xa=disabled
747       -D gallium-nine=false
748     LLVM_VERSION: "8"
749
750 .meson-arm:
751   extends:
752     - .meson-cross
753     - .use-arm_build
754   needs:
755     - arm_build
756   variables:
757     VULKAN_DRIVERS: freedreno,broadcom
758     GALLIUM_DRIVERS: "etnaviv,freedreno,kmsro,lima,nouveau,panfrost,swrast,tegra,v3d,vc4"
759     BUILDTYPE: "debugoptimized"
760   tags:
761     - aarch64
762
763 meson-armhf:
764   extends:
765     - .meson-arm
766     - .ci-deqp-artifacts
767   variables:
768     CROSS: armhf
769     LLVM_VERSION: "7"
770     EXTRA_OPTION: >
771       -D llvm=disabled
772     UPLOAD_FOR_LAVA: 1
773     DEBIAN_ARCH: armhf
774   script:
775     - .gitlab-ci/meson-build.sh
776     - .gitlab-ci/prepare-artifacts.sh
777
778 meson-arm64:
779   extends:
780     - .meson-arm
781     - .ci-deqp-artifacts
782   variables:
783     VULKAN_DRIVERS: "freedreno,broadcom"
784     EXTRA_OPTION: >
785       -D llvm=disabled
786     UPLOAD_FOR_LAVA: 1
787     DEBIAN_ARCH: arm64
788   script:
789     - .gitlab-ci/meson-build.sh
790     - .gitlab-ci/prepare-artifacts.sh
791
792 meson-arm64-build-test:
793   extends:
794     - .meson-arm
795     - .ci-deqp-artifacts
796   variables:
797     VULKAN_DRIVERS: "amd"
798     EXTRA_OPTION: >
799       -Dtools=panfrost
800       -D werror=true
801   script:
802     - .gitlab-ci/meson-build.sh
803
804 meson-clang:
805   extends: .meson-build
806   variables:
807     UNWIND: "enabled"
808     DRI_LOADERS: >
809       -D glvnd=true
810     DRI_DRIVERS: "auto"
811     GALLIUM_DRIVERS: "iris,nouveau,kmsro,r300,r600,freedreno,swr,swrast,svga,v3d,vc4,virgl,etnaviv,panfrost,lima,zink,radeonsi,tegra,d3d12"
812     VULKAN_DRIVERS: intel,amd,freedreno,broadcom
813     CC: "ccache clang-10"
814     CXX: "ccache clang++-10"
815
816 meson-windows-vs2019:
817   extends:
818     - .build-windows
819     - .use-windows_build_vs2019
820     - .windows-build-rules
821   stage: build-misc
822   script:
823     - . .\.gitlab-ci\windows\mesa_build.ps1
824   artifacts:
825     paths:
826       - _install/
827
828 test-d3d12-windows:
829   extends:
830     - .build-windows
831     - .use-windows_build_vs2019
832     - .windows-test-rules
833   stage: layered-backends
834   dependencies:
835     - meson-windows-vs2019
836   needs:
837     - meson-windows-vs2019
838   variables:
839     GIT_STRATEGY: none # testing doesn't build anything from source
840     GALLIUM_DRIVER: d3d12
841     PIGLIT_PROFILE: quick_gl
842     PIGLIT_OPTIONS: -x nv_copy_depth_to_color -x repeat-wait
843   script:
844     - . _install/piglit_run.ps1
845   artifacts:
846     when: on_failure
847     name: "mesa_${CI_JOB_NAME}"
848     paths:
849       - summary/
850
851 scons-win64:
852   extends: .scons-build
853   variables:
854     SCONS_TARGET: platform=windows machine=x86_64 debug=1
855     SCONS_CHECK_COMMAND: "true"
856   allow_failure: true
857
858 meson-clover:
859   extends: .meson-build
860   variables:
861     UNWIND: "enabled"
862     DRI_LOADERS: >
863       -D glx=disabled
864       -D egl=disabled
865       -D gbm=disabled
866     GALLIUM_DRIVERS: "r600,radeonsi"
867     GALLIUM_ST: >
868       -D dri3=disabled
869       -D gallium-vdpau=disabled
870       -D gallium-xvmc=disabled
871       -D gallium-omx=disabled
872       -D gallium-va=disabled
873       -D gallium-xa=disabled
874       -D gallium-nine=false
875       -D gallium-opencl=icd
876     EXTRA_OPTION: >
877       -D werror=true
878   script:
879     - LLVM_VERSION=8 .gitlab-ci/meson-build.sh
880     - LLVM_VERSION=9 .gitlab-ci/meson-build.sh
881     - .gitlab-ci/meson-build.sh
882
883 meson-vulkan:
884   extends: .meson-build
885   variables:
886     UNWIND: "disabled"
887     DRI_LOADERS: >
888       -D glx=disabled
889       -D gbm=disabled
890       -D egl=disabled
891       -D platforms=x11,wayland
892       -D osmesa=false
893     GALLIUM_ST: >
894       -D dri3=enabled
895       -D gallium-vdpau=disabled
896       -D gallium-xvmc=disabled
897       -D gallium-omx=disabled
898       -D gallium-va=disabled
899       -D gallium-xa=disabled
900       -D gallium-nine=false
901       -D gallium-opencl=disabled
902       -D b_sanitize=undefined
903       -D c_args=-fno-sanitize-recover=all
904       -D cpp_args=-fno-sanitize-recover=all
905     UBSAN_OPTIONS: "print_stacktrace=1"
906     VULKAN_DRIVERS: intel,amd,freedreno,broadcom
907     EXTRA_OPTION: >
908       -D vulkan-overlay-layer=true
909       -D vulkan-device-select-layer=true
910       -D build-aco-tests=true
911       -D werror=true
912
913 meson-i386:
914   extends:
915     - .meson-cross
916     - .use-i386_build
917   variables:
918     CROSS: i386
919     VULKAN_DRIVERS: intel,amd,swrast
920     GALLIUM_DRIVERS: "iris,nouveau,r300,r600,radeonsi,swrast,virgl,zink"
921     DRI_DRIVERS: "i915,i965,r100,r200,nouveau"
922     EXTRA_OPTION: >
923       -D vulkan-overlay-layer=true
924       -D vulkan-device-select-layer=true
925       -D werror=true
926
927 meson-s390x:
928   extends:
929     - .meson-cross
930     - .use-s390x_build
931   tags:
932     - kvm
933   variables:
934     CROSS: s390x
935     EXTRA_OPTION: >
936       -D werror=true
937     GALLIUM_DRIVERS: "swrast,zink"
938     VULKAN_DRIVERS: "swrast"
939
940 meson-ppc64el:
941   extends:
942     - meson-s390x
943     - .use-ppc64el_build
944   variables:
945     CROSS: ppc64el
946     EXTRA_OPTION: >
947       -D werror=true
948     GALLIUM_DRIVERS: "nouveau,radeonsi,swrast,virgl,zink"
949     VULKAN_DRIVERS: "amd,swrast"
950
951 meson-mingw32-x86_64:
952   extends: .meson-build
953   stage: build-misc
954   variables:
955     UNWIND: "disabled"
956     DRI_DRIVERS: ""
957     GALLIUM_DRIVERS: "swrast"
958     EXTRA_OPTION: >
959       -Dllvm=disabled
960       -Dosmesa=true
961       --cross-file=.gitlab-ci/x86_64-w64-mingw32
962
963 .test:
964   extends:
965     - .ci-run-policy
966   # Cancel job if a newer commit is pushed to the same branch
967   interruptible: true
968   variables:
969     GIT_STRATEGY: none # testing doesn't build anything from source
970   before_script:
971     # Note: Build dir (and thus install) may be dirty due to GIT_STRATEGY
972     - rm -rf install
973     - tar -xf artifacts/install.tar
974     - LD_LIBRARY_PATH=install/lib find install/lib -name "*.so" -print -exec ldd {} \;
975   artifacts:
976     when: always
977     name: "mesa_${CI_JOB_NAME}"
978     paths:
979       - results/
980
981 .use-x86_test-gl:
982   extends:
983     - .test
984   variables:
985     TAG: *x86_test-gl
986   image: "$CI_REGISTRY_IMAGE/debian/x86_test-gl:${TAG}--${MESA_TEMPLATES_COMMIT}"
987   needs:
988     - x86_test-gl
989
990 .test-gl:
991   extends:
992     - .use-x86_test-gl
993   needs:
994     - x86_test-gl
995     - meson-testing
996
997 .test-vk:
998   extends:
999     - .test
1000   variables:
1001     TAG: *x86_test-vk
1002   image: "$CI_REGISTRY_IMAGE/debian/x86_test-vk:${TAG}--${MESA_TEMPLATES_COMMIT}"
1003   needs:
1004     - meson-testing
1005     - x86_test-vk
1006
1007 .test-cl:
1008   extends:
1009     - .use-x86_test-gl
1010   needs:
1011     - x86_test-gl
1012     - meson-clover-testing
1013
1014 .piglit-test:
1015   artifacts:
1016     when: on_failure
1017     name: "mesa_${CI_JOB_NAME}"
1018     paths:
1019       - summary/
1020       - results/*.txt
1021   variables:
1022     PIGLIT_NO_WINDOW: 1
1023   script:
1024     - install/piglit/run.sh
1025
1026 .piglit-traces-test:
1027   extends:
1028     - .piglit-test
1029   cache:
1030     key: ${CI_JOB_NAME}
1031     paths:
1032       - replayer-db/
1033   artifacts:
1034     when: on_failure
1035     name: "mesa_${CI_JOB_NAME}"
1036     reports:
1037       junit: results/junit.xml
1038   variables:
1039     PIGLIT_PROFILES: replay
1040     PIGLIT_REPLAY_UPLOAD_TO_MINIO: 1
1041     PIGLIT_REPLAY_EXTRA_ARGS:  --keep-image --db-path ${CI_PROJECT_DIR}/replayer-db/
1042     PIGLIT_REPLAY_REFERENCE_IMAGES_BASE_URL: "/mesa-tracie-results/$FDO_UPSTREAM_REPO"
1043     PIGLIT_REPLAY_ARTIFACTS_BASE_URL: "/artifacts/$CI_PROJECT_PATH/$CI_PIPELINE_ID/$CI_JOB_ID"
1044     PIGLIT_HTML_SUMMARY: 0
1045     PIGLIT_JUNIT_RESULTS: 1
1046
1047 .llvmpipe-test:
1048   extends:
1049     - .llvmpipe-rules
1050   variables:
1051     LIBGL_ALWAYS_SOFTWARE: "true"
1052     GALLIUM_DRIVER: "llvmpipe"
1053
1054 llvmpipe-piglit-cl:
1055   extends:
1056     - .test-cl
1057     - .piglit-test
1058     - .llvmpipe-test
1059     - .llvmpipe-cl-rules
1060   variables:
1061     LP_CL: 1
1062     LP_NUM_THREADS: 1
1063     PIGLIT_PROFILES: cl
1064     PIGLIT_RESULTS: "llvmpipe-cl"
1065     PIGLIT_OPTIONS: >
1066       -x bswap -x phatk -x clz-optimizations
1067   script:
1068     - install/piglit/run_cl.sh
1069
1070 llvmpipe-piglit-quick_gl:
1071   extends:
1072     - .test-gl
1073     - .piglit-test
1074     - .llvmpipe-test
1075   variables:
1076     LP_NUM_THREADS: 0
1077     PIGLIT_OPTIONS: >
1078       --process-isolation false
1079       -x egl_ext_device_
1080       -x egl_ext_platform_device
1081       -x ext_timer_query@time-elapsed
1082       -x glx-multithread-clearbuffer
1083       -x glx-multithread-shader-compile
1084       -x max-texture-size
1085       -x maxsize
1086     PIGLIT_PROFILES: quick_gl
1087     PIGLIT_RESULTS: "llvmpipe-quick_gl"
1088
1089 llvmpipe-piglit-glslparser:
1090   extends:
1091     - .test-gl
1092     - .piglit-test
1093     - .llvmpipe-test
1094   variables:
1095     LP_NUM_THREADS: 0
1096     PIGLIT_PROFILES: glslparser
1097     PIGLIT_RESULTS: "llvmpipe-glslparser"
1098
1099 llvmpipe-piglit-quick_shader:
1100   extends:
1101     - .test-gl
1102     - .piglit-test
1103     - .llvmpipe-test
1104   variables:
1105     LP_NUM_THREADS: 1
1106     PIGLIT_PROFILES: quick_shader
1107     PIGLIT_RESULTS: "llvmpipe-quick_shader"
1108
1109 llvmpipe-traces:
1110   extends:
1111     - .test-gl
1112     - .piglit-traces-test
1113     - .llvmpipe-test
1114   variables:
1115     EGL_PLATFORM: "surfaceless"
1116     PIGLIT_REPLAY_DESCRIPTION_FILE: "${CI_PROJECT_DIR}/install/traces-llvmpipe.yml"
1117     PIGLIT_REPLAY_DEVICE_NAME: "gl-vmware-llvmpipe"
1118     PIGLIT_RESULTS: "llvmpipe-replay"
1119
1120 .virgl-test:
1121   extends:
1122     - .test-gl
1123     - .virgl-rules
1124   variables:
1125     LIBGL_ALWAYS_SOFTWARE: "true"
1126     GALLIUM_DRIVER: "virpipe"
1127
1128 virgl-traces:
1129   extends:
1130     - .piglit-traces-test
1131     - .virgl-test
1132   variables:
1133     EGL_PLATFORM: "surfaceless"
1134     PIGLIT_REPLAY_DESCRIPTION_FILE: "${CI_PROJECT_DIR}/install/traces-virgl.yml"
1135     PIGLIT_REPLAY_DEVICE_NAME: "gl-virgl"
1136     PIGLIT_RESULTS: "virgl-replay"
1137     MESA_GLES_VERSION_OVERRIDE: "3.1"
1138     MESA_GLSL_VERSION_OVERRIDE: "310"
1139
1140 arm64-a630-traces:
1141   extends:
1142     - .piglit-traces-test
1143     - .arm64-a630-test
1144   variables:
1145     BARE_METAL_TEST_SCRIPT: "/install/piglit/run.sh"
1146     BM_START_XORG: 1
1147     PIGLIT_REPLAY_DESCRIPTION_FILE: "/install/traces-freedreno.yml"
1148     PIGLIT_REPLAY_DEVICE_NAME: "freedreno-a630"
1149     PIGLIT_RESULTS: "freedreno-a630-replay"
1150     # This lets us run several more traces which don't use any features we're
1151     # missing.
1152     MESA_GLSL_VERSION_OVERRIDE: "460"
1153     MESA_GL_VERSION_OVERRIDE: "4.6"
1154   artifacts:
1155     reports:
1156       junit: results/junit.xml
1157
1158 radv-polaris10-traces:
1159   extends:
1160     - .piglit-traces-test
1161     - .test-vk
1162     - .test-radv
1163     - .test-manual
1164   variables:
1165     PIGLIT_REPLAY_DESCRIPTION_FILE: "${CI_PROJECT_DIR}/install/traces-radv.yml"
1166     PIGLIT_REPLAY_DEVICE_NAME: "vk-amd-polaris10"
1167     PIGLIT_RESULTS: "radv-polaris10-replay"
1168   tags:
1169     - polaris10
1170
1171 radv-raven-traces:
1172   extends:
1173     - .piglit-traces-test
1174     - .test-vk
1175     - .test-radv
1176     - .test-manual
1177   variables:
1178     PIGLIT_REPLAY_DESCRIPTION_FILE: "${CI_PROJECT_DIR}/install/traces-radv.yml"
1179     PIGLIT_REPLAY_DEVICE_NAME: "vk-amd-raven"
1180     PIGLIT_RESULTS: "radv-raven-replay"
1181   tags:
1182     - raven
1183
1184 .deqp-test:
1185   script:
1186     - ./install/deqp-runner.sh
1187   artifacts:
1188     reports:
1189       junit: results/junit.xml
1190
1191 .deqp-test-vk:
1192   extends:
1193     - .deqp-test
1194   variables:
1195     DEQP_VER: vk
1196
1197 .fossilize-test:
1198   script:
1199     - ./install/fossilize-runner.sh
1200   artifacts:
1201     when: on_failure
1202     name: "mesa_${CI_JOB_NAME}"
1203     paths:
1204       - results/
1205
1206 llvmpipe-gles2:
1207   variables:
1208     DEQP_VER: gles2
1209     # Don't use threads inside llvmpipe, we've already got all cores
1210     # busy at the deqp-runner level.
1211     LP_NUM_THREADS: 0
1212     GPU_VERSION: llvmpipe
1213     DEQP_EXPECTED_RENDERER: llvmpipe
1214   extends:
1215     - .test-gl
1216     - .deqp-test
1217     - .llvmpipe-test
1218
1219 softpipe-gles2:
1220   extends:
1221     - llvmpipe-gles2
1222     - .softpipe-rules
1223   variables:
1224     GPU_VERSION: softpipe
1225     GALLIUM_DRIVER: "softpipe"
1226     DEQP_EXPECTED_RENDERER: softpipe
1227
1228 softpipe-gles3:
1229   variables:
1230     DEQP_VER: gles3
1231   extends: softpipe-gles2
1232
1233 softpipe-gles31:
1234   parallel: 2
1235   variables:
1236     DEQP_VER: gles31
1237   extends: softpipe-gles2
1238
1239 softpipe-asan-gles31:
1240   variables:
1241     GPU_VERSION: softpipe-asan
1242     DEQP_FRACTION: 10
1243     DEQP_VER: gles31
1244     TEST_LD_PRELOAD: libasan.so.5
1245   extends: softpipe-gles2
1246   needs:
1247     - x86_test-gl
1248     - meson-testing-asan
1249
1250 softpipe-piglit-quick:
1251   extends:
1252     - .piglit-test
1253     - .test-gl
1254     - .softpipe-rules
1255   variables:
1256     GALLIUM_DRIVER: softpipe
1257     # rasterpos skipped until we uprev piglit (commit ff2a7650be7349)
1258     # triangle-rasterization skipped due to flakes thanks to it using a time-based random seed.
1259     # glx-multithread-texture is flaky, undiagnosed
1260     PIGLIT_OPTIONS: >
1261       -x rasterpos
1262       -x triangle-rasterization
1263       -x glx-multithread-texture
1264       -x egl_ext_device_
1265       -x egl_ext_platform_device
1266       -x ext_timer_query@time-elapsed
1267       -x glx-multithread-clearbuffer
1268       -x glx-multithread-shader-compile
1269       -x max-texture-size
1270       -x maxsize
1271       -x fs-execution-ordering
1272       -x local-id-explosion
1273       -x arb_pipeline_statistics_query-comp
1274       -x streaming-texture-leak
1275       -x longprim
1276       -x shader-mem-barrier
1277       -x arb_gpu_shader_fp64
1278       -x arb_gpu_shader_int64
1279       -x arb_tessellation_shader
1280       -x glsl-4.00
1281       -x glsl-4.10
1282       -x glsl-4.20
1283       -x glsl-4.30
1284       -x glsl-4.40
1285       -x glsl-4.50
1286       -x gpu_shader4
1287       -x gpu_shader5
1288     PIGLIT_PROFILES: quick_gl quick_shader
1289     PIGLIT_RESULTS: softpipe-quick
1290
1291 # Note that KHR-GL3* test sets include all tests from the previous
1292 # version, so we only need to run one test list (unlike dEQP-GLES,
1293 # where the test sets are separate).
1294 softpipe-gl:
1295   variables:
1296     DEQP_VER: gl33
1297   extends:
1298     - softpipe-gles2
1299
1300 virgl-gles2-on-gl:
1301   variables:
1302     DEQP_VER: gles2
1303     DEQP_NO_SAVE_RESULTS: 1
1304     GPU_VERSION: virgl-gl
1305     # Don't use threads inside llvmpipe, we've already got all cores
1306     # busy at the deqp-runner level.
1307     LP_NUM_THREADS: 0
1308     DEQP_OPTIONS: "--deqp-log-images=disable"
1309     DEQP_EXPECTED_RENDERER: virgl
1310   extends:
1311     - .deqp-test
1312     - .virgl-test
1313
1314 virgl-gles3-on-gl:
1315   variables:
1316     DEQP_VER: gles3
1317     DEQP_RUNNER_OPTIONS: "--timeout 180"
1318   extends: virgl-gles2-on-gl
1319
1320 virgl-gles31-on-gl:
1321   parallel: 2
1322   variables:
1323     DEQP_VER: gles31
1324     MESA_GLES_VERSION_OVERRIDE: "3.1"
1325     MESA_GLSL_VERSION_OVERRIDE: "310"
1326     MESA_EXTENSION_OVERRIDE: "-GL_OES_tessellation_shader"
1327   extends: virgl-gles3-on-gl
1328
1329 virgl-gl30-on-gl:
1330   variables:
1331     DEQP_VER: gl30
1332   extends: virgl-gles2-on-gl
1333
1334 virgl-gl31-on-gl:
1335   variables:
1336     DEQP_VER: gl31
1337   extends: virgl-gles2-on-gl
1338
1339 virgl-gl32-on-gl:
1340   variables:
1341     DEQP_VER: gl32
1342   extends: virgl-gles2-on-gl
1343
1344 # Rules for tests that should not be present in MRs or the main
1345 # project's pipeline (don't block marge or report red on
1346 # mesa/mesamaster) but should be present on pipelines in personal
1347 # branches (so you can opt in to running the flaky test when you want
1348 # to).
1349 .test-manual:
1350   rules:
1351     - *ignore_scheduled_pipelines
1352     - if: *is-forked-branch
1353       changes:
1354         *all_paths
1355       when: manual
1356     - when: never
1357   variables:
1358     GIT_STRATEGY: none
1359
1360 virgl-gles2-on-gles:
1361   variables:
1362     VIRGL_HOST_API: GLES
1363     GPU_VERSION: virgl-gles
1364   extends:
1365     - virgl-gles2-on-gl
1366     - .test-manual
1367
1368 virgl-gles3-on-gles:
1369   variables:
1370     VIRGL_HOST_API: GLES
1371     GPU_VERSION: virgl-gles
1372   extends:
1373     - virgl-gles3-on-gl
1374     - .test-manual
1375
1376 virgl-gles31-on-gles:
1377   variables:
1378     VIRGL_HOST_API: GLES
1379     GPU_VERSION: virgl-gles
1380   extends:
1381     - virgl-gles31-on-gl
1382     - .test-manual
1383
1384 .arm64-a630-test:
1385   extends:
1386     - .freedreno-test
1387   variables:
1388     BM_KERNEL: /lava-files/cheza-kernel
1389     BM_CMDLINE: "ip=dhcp console=ttyMSM0,115200n8 root=/dev/nfs rw nfsrootdebug nfsroot=,tcp,nfsvers=4.2 init=/init"
1390     GPU_VERSION: freedreno-a630
1391     BM_DTB: /lava-files/db820c.dtb
1392     DEQP_EXPECTED_RENDERER: FD630
1393   tags:
1394     - google-freedreno-cheza
1395   script:
1396     - ./install/bare-metal/cros-servo.sh
1397
1398 arm64_a630_gles2:
1399   extends:
1400     - .baremetal-deqp-test
1401     - .arm64-a630-test
1402   variables:
1403     DEQP_VER: gles2
1404
1405 arm64_a630_gles31:
1406   extends:
1407     - .baremetal-deqp-test
1408     - .arm64-a630-test
1409   variables:
1410     DEQP_VER: gles31
1411
1412 arm64_a630_gles3:
1413   extends:
1414     - .baremetal-deqp-test
1415     - .arm64-a630-test
1416   variables:
1417     DEQP_VER: gles3
1418
1419 arm64_a630_gl:
1420   extends:
1421     - .baremetal-deqp-test
1422     - .arm64-a630-test
1423   variables:
1424     DEQP_VER: gl33
1425
1426 arm64_a630_gles_others:
1427   extends:
1428     - .baremetal-deqp-test
1429     - .arm64-a630-test
1430   variables:
1431     BARE_METAL_TEST_SCRIPT: "/install/bare-metal/arm64_a630_gles_others.sh"
1432
1433 arm64_a630_vk:
1434   extends:
1435     - .baremetal-deqp-test-freedreno-vk
1436     - .arm64-a630-test
1437   parallel: 2
1438   variables:
1439     DEQP_FRACTION: 4
1440     # Force binning in the main run, which makes sure we render at
1441     # least 2 bins.  This is the path that impacts the most different
1442     # features.  However, we end up with flaky results in
1443     # dEQP-VK.binding_model.*.geometry and dEQP-VK.glsl.*_vertex.
1444     TU_DEBUG: forcebin
1445
1446 # Do a separate sysmem pass over the testcases that really affect sysmem
1447 # rendering.  This is currently very flaky, leave it as an option for devs
1448 # to click play on in their branches.
1449 arm64_a630_vk_sysmem:
1450   extends:
1451     - .baremetal-deqp-test-freedreno-vk
1452     - .arm64-a630-test
1453   variables:
1454     DEQP_FRACTION: 15
1455     DEQP_CASELIST_FILTER: "dEQP-VK.renderpass.*"
1456     GPU_VERSION: freedreno-a630-bypass
1457     TU_DEBUG: sysmem
1458
1459 .arm64_a630_piglit:
1460   extends:
1461     - .piglit-test
1462     - .arm64-a630-test
1463     - .test-manual
1464   variables:
1465     BARE_METAL_TEST_SCRIPT: "/install/piglit/run.sh"
1466     BM_START_XORG: 1
1467     # Excluding various features we don't support to keep runtime down in
1468     # deciding that they aren't supported.
1469     #
1470     # Also excluding some particularly slow tests (gl-1.3-texture-env takes 100s)
1471     #
1472     # Known flakes in the list are between "arb_blend_func_extended" and
1473     # "varray-disabled"
1474     #
1475     # vs-output-array-vec2-index-wr-before-gs is skipped because it causes
1476     # a flood of GPU hangs and makes the rest of the job flakey
1477     #
1478     # vs-clip-distance/vertex-enables skipped because they seem to be flaky in
1479     # parallel with other tests (reliably fails on its own)
1480     PIGLIT_OPTIONS: >-
1481       -x vs-output-array-vec2-index-wr-before-gs
1482       -x fixed-clip-enables
1483       -x vs-clip-distance-enables
1484       -x vs-clip-vertex-enables
1485       -x arb_blend_func_extended-fbo-extended-blend-pattern_gles2
1486       -x clear-accum
1487       -x copypixels-sync
1488       -x copyteximage-border
1489       -x copytexsubimage
1490       -x draw-sync
1491       -x getteximage-simple
1492       -x gl30basic
1493       -x tcs-input
1494       -x tes-input
1495       -x unaligned-blit
1496       -x user-clip
1497       -x varray-disabled
1498       -x egl_ext_device_
1499       -x egl_ext_platform_device
1500       -x ext_timer_query@time-elapsed
1501       -x glx-multithread-clearbuffer
1502       -x glx-multithread-shader-compile
1503       -x max-texture-size
1504       -x maxsize
1505       -x arb_gpu_shader_fp64
1506       -x arb_gpu_shader_gpu5
1507       -x arb_gpu_shader_int64
1508       -x glsl-4.00
1509       -x glsl-4.10
1510       -x glsl-4.20
1511       -x glsl-4.30
1512       -x glsl-4.40
1513       -x glsl-4.50
1514       -x glsl-4.60
1515       -x gl-1.3-texture-env
1516
1517 # Takes ~20 minutes, so manual-only until we can sort out runtime.
1518 arm64_a630_piglit_gl:
1519   extends:
1520     - .arm64_a630_piglit
1521     - .test-manual
1522   variables:
1523     PIGLIT_PROFILES: quick_gl
1524     PIGLIT_RESULTS: freedreno-a630-gl
1525
1526 arm64_a630_piglit_shader:
1527   extends:
1528     - .arm64_a630_piglit
1529   variables:
1530     PIGLIT_PROFILES: quick_shader
1531     PIGLIT_RESULTS: freedreno-a630-shader
1532
1533 .baremetal-test:
1534   extends:
1535     - .ci-run-policy
1536     - .test
1537   # Cancel job if a newer commit is pushed to the same branch
1538   interruptible: true
1539   stage: test
1540   variables:
1541     DRIVER_URL: https://minio-packet.freedesktop.org/artifacts/${CI_PROJECT_PATH}/${CI_PIPELINE_ID}/mesa-arm64.tar.gz
1542   before_script:
1543     # Use this instead of gitlab's artifacts download because it hits packet.net
1544     # instead of fd.o.  Set FDO_HTTP_CACHE_URI to an http cache for your test lab to
1545     # improve it even more (see https://docs.mesa3d.org/ci/bare-metal.html for
1546     # setup).
1547     - wget ${FDO_HTTP_CACHE_URI:-}${DRIVER_URL} -S --progress=dot:giga -O- | tar -xz
1548   artifacts:
1549     when: always
1550     name: "mesa_${CI_JOB_NAME}"
1551     paths:
1552       - results/
1553       - serial*.txt
1554     exclude:
1555       - results/*.shader_cache
1556     reports:
1557       junit: results/junit.xml
1558
1559 .freedreno-test:
1560   extends:
1561     - .baremetal-test
1562     - .use-arm64_test
1563     - .freedreno-rules
1564   variables:
1565     BM_ROOTFS: /lava-files/rootfs-arm64
1566     FLAKES_CHANNEL: "#freedreno-ci"
1567     PIGLIT_PLATFORM: mixed_glx_egl
1568   script:
1569     - ./install/bare-metal/fastboot.sh
1570   needs:
1571     - arm64_test
1572     - job: meson-arm64
1573       artifacts: false
1574   tags:
1575     - google-freedreno-db410c
1576
1577 .baremetal-deqp-test:
1578   variables:
1579     BARE_METAL_TEST_SCRIPT: "/install/deqp-runner.sh"
1580     DEQP_SKIPS: deqp-default-skips.txt
1581     DEQP_PARALLEL: 0 # Default to number of CPUs
1582
1583 .baremetal-deqp-test-freedreno-vk:
1584   extends:
1585     - .baremetal-deqp-test
1586   variables:
1587     DEQP_VER: vk
1588     VK_DRIVER: freedreno
1589
1590 .arm64-a306-test:
1591   extends:
1592     - .freedreno-test
1593   variables:
1594     BM_KERNEL: /lava-files/Image.gz
1595     BM_DTB: /lava-files/apq8016-sbc.dtb
1596     BM_CMDLINE: "ip=dhcp console=ttyMSM0,115200n8"
1597     GPU_VERSION: freedreno-a307
1598     DEQP_EXPECTED_RENDERER: FD307
1599
1600 arm64_a306_gles2:
1601   extends:
1602     - .baremetal-deqp-test
1603     - .arm64-a306-test
1604   variables:
1605     DEQP_VER: gles2
1606
1607 # Fractional run, single threaded, due to flaky results
1608 arm64_a306_gles3:
1609   extends:
1610     - .baremetal-deqp-test
1611     - .arm64-a306-test
1612   variables:
1613     DEQP_VER: gles3
1614     DEQP_PARALLEL: 1
1615     DEQP_FRACTION: 25
1616
1617 # Fractional runs with debug options.  Note that since we're not
1618 # hitting the iommu faults, we can run in parallel (derive from gles2, not gles3).
1619 arm64_a306_gles3_options:
1620   extends:
1621     - .baremetal-deqp-test
1622     - .arm64-a306-test
1623   variables:
1624     DEQP_VER: gles3
1625   script:
1626     # Check that the non-constbuf UBO case works.
1627     - DEQP_RUN_SUFFIX=-nouboopt IR3_SHADER_DEBUG=nouboopt DEQP_CASELIST_FILTER="functional.*ubo" ./install/bare-metal/fastboot.sh
1628
1629 .arm64-a530-test:
1630   extends:
1631     - .freedreno-test
1632   variables:
1633     BM_KERNEL: /lava-files/db820c-kernel
1634     BM_DTB: /lava-files/db820c.dtb
1635     # Disable SMP because only CPU 0 is at a freq higher than 19mhz on
1636     # current upstream kernel.
1637     BM_CMDLINE: "ip=dhcp console=ttyMSM0,115200n8 nosmp"
1638     FDO_CI_CONCURRENT: 1
1639     GPU_VERSION: freedreno-a530
1640     DEQP_EXPECTED_RENDERER: FD530
1641   tags:
1642     - google-freedreno-db820c
1643
1644 arm64_a530_gles2:
1645   extends:
1646     - .baremetal-deqp-test
1647     - .arm64-a530-test
1648   variables:
1649     DEQP_VER: gles2
1650   parallel: 2
1651
1652 arm64_a530_gles3:
1653   extends:
1654     - .baremetal-deqp-test
1655     - .arm64-a530-test
1656   variables:
1657     DEQP_VER: gles3
1658     DEQP_FRACTION: 40
1659
1660 arm64_a530_gles31:
1661   extends:
1662     - arm64_a530_gles3
1663   variables:
1664     DEQP_VER: gles31
1665     DEQP_FRACTION: 10
1666
1667 .arm64_a530_piglit:
1668   extends:
1669     - .piglit-test
1670     - .arm64-a530-test
1671     - .test-manual
1672   variables:
1673     BARE_METAL_TEST_SCRIPT: "/install/piglit/run.sh"
1674     BM_START_XORG: 1
1675     # SMP is disabled in the current kernels for db820c.
1676     FDO_CI_CONCURRENT: 1
1677     # Excluding for flakes in multisample (MSAA fails covered well by deqp, we
1678     # can enable it once we stabilize that.) and other flakes from
1679     # atomic_counters through userclip in the list.
1680     #
1681     # Also excluding some particularly slow tests (gl-1.3-texture-env)
1682     #
1683     # Check fastboot.sh for more piglit tests being excluded!
1684     PIGLIT_OPTIONS: >-
1685       -x atomic_counters
1686       -x gl-1.0-blend-func
1687       -x glsl-1.30@execution@clipping
1688       -x user-clip
1689       -x arb_texture_multisample
1690       -x ext_framebuffer_multisample
1691       -x egl_ext_device_
1692       -x egl_ext_platform_device
1693       -x ext_timer_query@time-elapsed
1694       -x glx-multithread-clearbuffer
1695       -x glx-multithread-shader-compile
1696       -x max-texture-size
1697       -x maxsize
1698       -x arb_gpu_shader5
1699       -x arb_gpu_shader_fp64
1700       -x arb_gpu_shader_int64
1701       -x arb_tessellation_shader
1702       -x glsl-1.50
1703       -x glsl-4.00
1704       -x glsl-4.10
1705       -x glsl-4.20
1706       -x glsl-4.30
1707       -x glsl-4.40
1708       -x glsl-4.50
1709       -x glsl-4.60
1710       -x gl-1.3-texture-env
1711
1712 # Takes ~25 minutes, so manual-only until we can sort out runtime.
1713 arm64_a530_piglit_gl:
1714   extends:
1715     - .arm64_a530_piglit
1716   variables:
1717     PIGLIT_PROFILES: quick_gl
1718     PIGLIT_RESULTS: freedreno-a530-gl
1719
1720 arm64_a530_piglit_shader:
1721   extends:
1722     - .arm64_a530_piglit
1723   variables:
1724     PIGLIT_PROFILES: quick_shader
1725     PIGLIT_RESULTS: freedreno-a530-shader
1726
1727 .vc4-rpi3-test:armhf:
1728   extends:
1729     - .baremetal-test
1730     - .vc4-rules
1731     - .use-armhf_test
1732   variables:
1733     BM_BOOTFS: /boot/armhf
1734     BM_KERNEL_MODULES: vc4
1735     BM_ROOTFS: /lava-files/rootfs-armhf
1736     BM_ROOTFS_EXTRA: /modules/armhf
1737     GPU_VERSION: vc4-rpi3
1738     DEQP_EXPECTED_RENDERER: VC4
1739     DRIVER_URL: https://minio-packet.freedesktop.org/artifacts/${CI_PROJECT_PATH}/${CI_PIPELINE_ID}/mesa-armhf.tar.gz
1740   script:
1741     - ./install/bare-metal/poe-powered.sh
1742   needs:
1743     - job: armhf_test
1744       artifacts: false
1745     - meson-armhf
1746   tags:
1747     - igalia-rpi3
1748
1749 vc4-rpi3-gles2:armhf:
1750   extends:
1751     - .vc4-rpi3-test:armhf
1752   parallel: 4
1753   variables:
1754     BARE_METAL_TEST_SCRIPT: "/install/deqp-runner.sh"
1755     DEQP_VER: gles2
1756     # The vc4s are so slow that it takes about a minute to get through the
1757     # default 500 tests in a group, triggering the serial watchdog.
1758     DEQP_RUNNER_OPTIONS: "--tests-per-group 250"
1759
1760 .vc4-rpi3-piglit:armhf:
1761   extends:
1762     - .piglit-test
1763     - .vc4-rpi3-test:armhf
1764     - .test-manual
1765   variables:
1766     BARE_METAL_TEST_SCRIPT: "/install/piglit/run.sh"
1767     BM_POE_TIMEOUT: 180
1768     PIGLIT_OPTIONS: >-
1769       --timeout 60
1770       -x .tesc
1771       -x .tese
1772       -x arb_gpu_shader_fp64
1773       -x arb_gpu_shader_gpu5
1774       -x arb_gpu_shader_int64
1775       -x arb_tessellation_shader
1776       -x arb_texture_cube_map
1777       -x clipflat
1778       -x copypixels-sync
1779       -x copyteximage
1780       -x depthstencil-default_fb
1781       -x draw-sync
1782       -x egl_ext_device_
1783       -x egl_ext_platform_device
1784       -x ext_framebuffer_multisample
1785       -x ext_timer_query@time-elapsed
1786       -x gl-1.0-blend-func
1787       -x gl-1.3-texture-env
1788       -x glsl-1.30
1789       -x glsl-3.30
1790       -x glsl-4.00
1791       -x glsl-4.10
1792       -x glsl-4.20
1793       -x glsl-4.30
1794       -x glsl-4.40
1795       -x glsl-4.50
1796       -x glsl-4.60
1797       -x glsl-es-3.00
1798       -x glsl-es-3.20
1799       -x glsl-fs-convolution-2
1800       -x glsl-vs-loop
1801       -x glsl-vs-loop-nested
1802       -x glsl-vs-mov-after-deref
1803       -x glx-multithread-clearbuffer
1804       -x glx-multithread-shader-compile
1805       -x image_load_store
1806       -x longprim
1807       -x masked-clear
1808       -x max-texture-size
1809       -x maxsize
1810       -x ppgtt_memory_alignment
1811       -x streaming-texture-leak
1812       -x texturesize
1813     PIGLIT_PLATFORM: gbm
1814
1815 vc4-rpi3-piglit-quick_gl:armhf:
1816   extends:
1817     - .vc4-rpi3-piglit:armhf
1818   variables:
1819     FDO_CI_CONCURRENT: 1
1820     PIGLIT_PROFILES: quick_gl
1821     PIGLIT_RESULTS: "vc4-rpi3-quick_gl"
1822
1823 vc4-rpi3-piglit-quick_shader:armhf:
1824   extends:
1825     - .vc4-rpi3-piglit:armhf
1826   variables:
1827     FDO_CI_CONCURRENT: 2
1828     PIGLIT_PROFILES: quick_shader
1829     PIGLIT_RESULTS: "vc4-rpi3-quick_shader"
1830
1831 lavapipe-vk:
1832   stage: software-renderer
1833   extends:
1834     - .test-vk
1835     - .llvmpipe-rules
1836     - .deqp-test-vk
1837   variables:
1838     GPU_VERSION: lvp
1839     VK_DRIVER: lvp
1840     DEQP_FRACTION: 10
1841
1842 # RADV CI
1843 .test-radv:
1844   extends:
1845     - .test-vk
1846     - .radv-rules
1847   stage: amd
1848   variables:
1849     VK_DRIVER: radeon
1850     ACO_DEBUG: validateir,validatera
1851
1852 # Can only be triggered manually on personal branches because RADV is the only
1853 # driver that does Vulkan testing at the moment.
1854 radv_polaris10_vkcts:
1855   extends:
1856     - .deqp-test-vk
1857     - .test-radv
1858     - .test-manual
1859   variables:
1860     GPU_VERSION: radv-polaris10
1861   tags:
1862     - polaris10
1863
1864 radv-fossils:
1865   extends:
1866     - .fossilize-test
1867     - .test-radv
1868   script:
1869     # Pitcairn (GFX6)
1870     - export RADV_FORCE_FAMILY="pitcairn"
1871     - ./install/fossilize-runner.sh
1872     # Bonaire (GFX7)
1873     - export RADV_FORCE_FAMILY="bonaire"
1874     - ./install/fossilize-runner.sh
1875     # Polaris10 (GFX8)
1876     - export RADV_FORCE_FAMILY="polaris10"
1877     - ./install/fossilize-runner.sh
1878     # Vega10 (GFX9)
1879     - export RADV_FORCE_FAMILY="gfx900"
1880     - ./install/fossilize-runner.sh
1881     # Navi10 (GFX10)
1882     - export RADV_FORCE_FAMILY="gfx1010"
1883     - ./install/fossilize-runner.sh
1884     # Sienna Cichlid (GFX10)
1885     - export RADV_FORCE_FAMILY="gfx1030"
1886     - ./install/fossilize-runner.sh