2 FDO_UPSTREAM_REPO: mesa/mesa
5 - project: 'freedesktop/ci-templates'
6 ref: 59de540b620c45739871d1a073d76d5521989d11
7 file: '/templates/debian.yml'
8 - local: '.gitlab-ci/lava-gitlab-ci.yml'
9 - local: '.gitlab-ci/test-source-dep.yml'
28 extends: .ci-run-policy
31 - apk --no-cache add py3-pip
32 - pip3 install sphinx sphinx_rtd_theme
33 - sphinx-build -b html docs public
42 - if: '$CI_PROJECT_NAMESPACE == "mesa" && $CI_COMMIT_REF_NAME == "master"'
47 # Other cases default to never
53 - if: '$CI_PROJECT_NAMESPACE == "mesa"'
55 - if: '$GITLAB_USER_LOGIN == "marge-bot"'
58 - changes: *docs-or-ci
60 # Other cases default to never
62 # When to automatically run the CI
65 # If any files affecting the pipeline are changed, build/test jobs run
66 # automatically once all dependency jobs have passed
70 - bin/install_megadrivers.py
71 - bin/meson_get_version.py
72 - bin/symbols-check.py
88 # Otherwise, build/test jobs won't run
93 - runner_system_failure
94 # Cancel CI run if a newer commit is pushed to the same branch
99 image: debian:stable-slim
101 - if: '$CI_PROJECT_NAMESPACE == "mesa"'
103 - if: '$GITLAB_USER_LOGIN == "marge-bot"'
106 - changes: *all_paths
112 - echo "Dummy job to make sure every merge request pipeline runs at least one job"
117 name: "mesa_${CI_JOB_NAME}"
121 # Watch out! Artifacts are relative to the build dir.
122 # https://gitlab.com/gitlab-org/gitlab-ce/commit/8788fb925706cad594adf6917a6c5f6587dd1521
125 # Build the CI docker images.
127 # FDO_DISTRIBUTION_TAG is the tag of the docker image used by later stage jobs. If the
128 # image doesn't exist yet, the container stage job generates it.
130 # In order to generate a new image, one should generally change the tag.
131 # While removing the image from the registry would also work, that's not
132 # recommended except for ephemeral images during development: Replacing
133 # an image after a significant amount of time might pull in newer
134 # versions of gcc/clang or other packages, which might break the build
135 # with older commits using the same tag.
137 # After merging a change resulting in generating a new image to the
138 # main repository, it's recommended to remove the image from the source
139 # repository's container registry, so that the image from the main
140 # repository's registry will be used there as well.
143 stage: container+docs
147 # Run pipeline by default in the main project if any CI pipeline
148 # configuration files were changed, to ensure docker images are up to date
149 - if: '$CI_PROJECT_PATH == "mesa/mesa"'
154 # Run pipeline by default if it was triggered by Marge Bot, is for a
155 # merge request, and any files affecting the pipeline were changed
156 - if: '$GITLAB_USER_LOGIN == "marge-bot" && $CI_PROJECT_PATH != "mesa/mesa"'
160 # Run pipeline by default in the main project if it was not triggered by
161 # Marge Bot, and any files affecting the pipeline were changed
162 - if: '$GITLAB_USER_LOGIN != "marge-bot" && $CI_PROJECT_PATH == "mesa/mesa"'
166 # Allow triggering jobs manually in other cases if any files affecting the
167 # pipeline were changed
171 # Otherwise, container jobs won't run
174 FDO_DISTRIBUTION_VERSION: buster-slim
175 FDO_REPO_SUFFIX: "debian/$CI_JOB_NAME"
176 FDO_DISTRIBUTION_EXEC: 'bash .gitlab-ci/container/${CI_JOB_NAME}.sh'
177 # no need to pull the whole repo to build the container image
180 # Debian 10 based x86 build image base
183 - .fdo.container-build@debian
186 FDO_DISTRIBUTION_TAG: &x86_build-base "2020-06-12"
194 BASE_TAG: *x86_build-base
195 FDO_BASE_IMAGE: "$CI_REGISTRY_IMAGE/debian/x86_build-base:$BASE_TAG"
199 # Debian 10 based x86 main build image
202 - .use-x86_build-base
204 FDO_DISTRIBUTION_TAG: &x86_build "2020-06-02"
209 image: "$CI_REGISTRY_IMAGE/debian/x86_build:$TAG"
214 # Debian 10 based i386 cross-build image
217 - .use-x86_build-base
219 FDO_DISTRIBUTION_TAG: &i386_build "2020-06-02"
224 image: "$CI_REGISTRY_IMAGE/debian/i386_build:$TAG"
229 # Debian 10 based ppc64el cross-build image
232 - .use-x86_build-base
234 FDO_DISTRIBUTION_TAG: &ppc64el_build "2020-06-02"
239 image: "$CI_REGISTRY_IMAGE/debian/ppc64el_build:$TAG"
244 # Debian 10 based s390x cross-build image
247 - .use-x86_build-base
249 FDO_DISTRIBUTION_TAG: &s390x_build "2020-06-02"
254 image: "$CI_REGISTRY_IMAGE/debian/s390x_build:$TAG"
259 # Debian 10 based x86 test image base
261 extends: x86_build-base
263 FDO_DISTRIBUTION_TAG: &x86_test-base "2020-06-02"
271 BASE_TAG: *x86_test-base
272 FDO_BASE_IMAGE: "$CI_REGISTRY_IMAGE/debian/x86_test-base:$BASE_TAG"
276 # Debian 10 based x86 test image for GL
278 extends: .use-x86_test-base
280 FDO_DISTRIBUTION_TAG: &x86_test-gl "2020-06-23-virgl"
282 # Debian 10 based x86 test image for VK
284 extends: .use-x86_test-base
286 FDO_DISTRIBUTION_TAG: &x86_test-vk "2020-06-18-vkcts"
288 # Debian 9 based x86 build image (old LLVM)
290 extends: x86_build-base
292 FDO_DISTRIBUTION_TAG: &x86_build_old "2020-06-12"
293 FDO_DISTRIBUTION_VERSION: stretch-slim
298 image: "$CI_REGISTRY_IMAGE/debian/x86_build_old:$TAG"
302 # Debian 10 based ARM build image
305 - .fdo.container-build@debian@arm64v8
308 FDO_DISTRIBUTION_TAG: &arm_build "2020-06-22-tracie"
313 image: "$CI_REGISTRY_IMAGE/debian/arm_build:$TAG"
317 # Debian 10 based x86 baremetal image base
320 - .fdo.container-build@debian
323 FDO_DISTRIBUTION_TAG: &arm_test-base "2020-06-22-tracie"
331 BASE_TAG: *arm_test-base
332 FDO_BASE_IMAGE: "$CI_REGISTRY_IMAGE/debian/arm_test-base:$BASE_TAG"
336 # x86 image with ARM64 rootfs for baremetal testing.
341 FDO_DISTRIBUTION_TAG: &arm64_test "2020-06-25-kernelfix"
346 image: "$CI_REGISTRY_IMAGE/debian/arm64_test:$TAG"
351 # Native Windows docker builds
353 # Unlike the above Linux-based builds - including MinGW/SCons builds which
354 # cross-compile for Windows - which use the freedesktop ci-templates, we
355 # cannot use the same scheme here. As Windows lacks support for
356 # Docker-in-Docker, and Podman does not run natively on Windows, we have
357 # to open-code much of the same ourselves.
359 # This is achieved by first running in a native Windows shell instance
360 # (host PowerShell) in the container stage to build and push the image,
361 # then in the build stage by executing inside Docker.
363 .windows-docker-vs2019:
365 WINDOWS_TAG: "2020-05-05-llvm"
366 WINDOWS_IMAGE: "$CI_REGISTRY_IMAGE/windows/x64_build:$WINDOWS_TAG"
367 WINDOWS_UPSTREAM_IMAGE: "$CI_REGISTRY/$FDO_UPSTREAM_REPO/windows/x64_build:$WINDOWS_TAG"
369 .windows_build_vs2019:
372 - .windows-docker-vs2019
373 stage: container+docs
375 GIT_STRATEGY: fetch # we do actually need the full repository though
376 timeout: 4h # LLVM takes ages
383 - .\.gitlab-ci\windows\mesa_container.ps1 $CI_REGISTRY $CI_REGISTRY_USER $CI_REGISTRY_PASSWORD $WINDOWS_IMAGE $WINDOWS_UPSTREAM_IMAGE
385 .use-windows_build_vs2019:
386 extends: .windows-docker-vs2019
387 image: "$WINDOWS_IMAGE"
389 - windows_build_vs2019
393 # Shared between windows and Linux
395 extends: .ci-run-policy
397 name: "mesa_${CI_JOB_NAME}"
400 - _build/meson-logs/*.txt
407 extends: .build-common
409 CCACHE_COMPILERCHECK: "content"
410 CCACHE_COMPRESS: "true"
411 CCACHE_DIR: /cache/mesa/ccache
412 # Use ccache transparently, and print stats before/after
414 - export PATH="/usr/lib/ccache:$PATH"
415 - export CCACHE_BASEDIR="$PWD"
416 - ccache --show-stats
418 - ccache --show-stats
421 extends: .build-common
430 - subprojects/packagecache
440 - .gitlab-ci/meson-build.sh
450 - .gitlab-ci/scons-build.sh
462 -D platforms=x11,drm,surfaceless
465 GALLIUM_DRIVERS: "swrast,virgl"
467 BUILDTYPE: "debugoptimized"
471 - .gitlab-ci/meson-build.sh
472 - .gitlab-ci/prepare-artifacts.sh
475 extends: .meson-build
482 -D platforms=x11,wayland,drm,surfaceless
485 -D gallium-extra-hud=true
486 -D gallium-vdpau=enabled
487 -D gallium-xvmc=enabled
488 -D gallium-omx=bellagio
489 -D gallium-va=enabled
490 -D gallium-xa=enabled
492 -D gallium-opencl=disabled
493 GALLIUM_DRIVERS: "iris,nouveau,kmsro,r300,r600,freedreno,swr,swrast,svga,v3d,vc4,virgl,etnaviv,panfrost,lima,zink"
498 - .gitlab-ci/meson-build.sh
499 - .gitlab-ci/run-shader-db.sh
502 extends: .meson-build
509 -D platforms=x11,wayland,drm,surfaceless
525 -D platforms=surfaceless
529 -D gallium-vdpau=disabled
530 -D gallium-xvmc=disabled
531 -D gallium-omx=disabled
532 -D gallium-va=disabled
533 -D gallium-xa=disabled
534 -D gallium-nine=false
542 VULKAN_DRIVERS: freedreno
543 GALLIUM_DRIVERS: "etnaviv,freedreno,kmsro,lima,nouveau,panfrost,swrast,tegra,v3d,vc4"
544 BUILDTYPE: "debugoptimized"
558 - .gitlab-ci/meson-build.sh
559 - .gitlab-ci/prepare-artifacts.sh
566 VULKAN_DRIVERS: "freedreno"
570 - .gitlab-ci/meson-build.sh
571 - .gitlab-ci/prepare-artifacts.sh
573 meson-arm64-build-test:
578 VULKAN_DRIVERS: "amd"
580 - .gitlab-ci/meson-build.sh
583 extends: .meson-build
589 GALLIUM_DRIVERS: "auto"
590 VULKAN_DRIVERS: intel,amd,freedreno
592 CXX: "ccache clang++-9"
594 .meson-windows-vs2019:
597 - .use-windows_build_vs2019
600 - . .\.gitlab-ci\windows\mesa_build.ps1
603 extends: .scons-build
605 SCONS_TARGET: platform=windows machine=x86_64 debug=1
606 SCONS_CHECK_COMMAND: "true"
610 extends: .meson-build
617 GALLIUM_DRIVERS: "r600,radeonsi"
620 -D gallium-vdpau=disabled
621 -D gallium-xvmc=disabled
622 -D gallium-omx=disabled
623 -D gallium-va=disabled
624 -D gallium-xa=disabled
625 -D gallium-nine=false
626 -D gallium-opencl=icd
628 - .gitlab-ci/meson-build.sh
629 - LLVM_VERSION=8 .gitlab-ci/meson-build.sh
631 meson-clover-old-llvm:
641 -D platforms=drm,surfaceless
642 GALLIUM_DRIVERS: "i915,r600"
644 - LLVM_VERSION=3.9 .gitlab-ci/meson-build.sh
645 - LLVM_VERSION=4.0 .gitlab-ci/meson-build.sh
646 - LLVM_VERSION=5.0 .gitlab-ci/meson-build.sh
647 - LLVM_VERSION=6.0 .gitlab-ci/meson-build.sh
648 - LLVM_VERSION=7 .gitlab-ci/meson-build.sh
651 extends: .meson-build
658 -D platforms=x11,wayland,drm
662 -D gallium-vdpau=disabled
663 -D gallium-xvmc=disabled
664 -D gallium-omx=disabled
665 -D gallium-va=disabled
666 -D gallium-xa=disabled
667 -D gallium-nine=false
668 -D gallium-opencl=disabled
669 -D b_sanitize=undefined
670 -D c_args=-fno-sanitize-recover=all
671 -D cpp_args=-fno-sanitize-recover=all
672 UBSAN_OPTIONS: "print_stacktrace=1"
673 VULKAN_DRIVERS: intel,amd,freedreno
675 -D vulkan-overlay-layer=true
684 VULKAN_DRIVERS: intel,amd
685 GALLIUM_DRIVERS: "iris,r300,radeonsi,swrast,virgl"
687 -D vulkan-overlay-layer=true
700 GALLIUM_DRIVERS: "swrast"
709 GALLIUM_DRIVERS: "nouveau,radeonsi,swrast,virgl"
710 VULKAN_DRIVERS: "amd"
712 meson-mingw32-x86_64:
713 extends: .meson-build
718 GALLIUM_DRIVERS: "swrast"
722 --cross-file=.gitlab-ci/x86_64-w64-mingw32
728 GIT_STRATEGY: none # testing doesn't build anything from source
730 # Note: Build dir (and thus install) may be dirty due to GIT_STRATEGY
732 - tar -xf artifacts/install.tar
733 - LD_LIBRARY_PATH=install/lib find install/lib -name "*.so" -print -exec ldd {} \;
736 name: "mesa_${CI_JOB_NAME}"
745 image: "$CI_REGISTRY_IMAGE/debian/x86_test-gl:$TAG"
760 image: "$CI_REGISTRY_IMAGE/debian/x86_test-vk:$TAG"
776 name: "mesa_${CI_JOB_NAME}"
780 LIBGL_ALWAYS_SOFTWARE: 1
783 - install/piglit/run.sh
786 extends: .piglit-test
791 --process-isolation false
794 -x egl_ext_platform_device
795 -x ext_timer_query@time-elapsed
796 -x glx-multithread-clearbuffer
797 -x glx-multithread-shader-compile
800 PIGLIT_PROFILES: quick_gl
803 extends: .piglit-test
807 PIGLIT_PROFILES: glslparser
810 extends: .piglit-test
814 PIGLIT_PROFILES: quick_shader
818 DEQP_SKIPS: deqp-default-skips.txt
820 - ./install/deqp-runner.sh
837 - ./install/fossilize-runner.sh
840 name: "mesa_${CI_JOB_NAME}"
849 # Don't use threads inside llvmpipe, we've already got all 4 cores
850 # busy with DEQP_PARALLEL.
852 DEQP_EXPECTED_FAILS: deqp-llvmpipe-fails.txt
853 LIBGL_ALWAYS_SOFTWARE: "true"
854 DEQP_EXPECTED_RENDERER: llvmpipe
864 DEQP_EXPECTED_FAILS: deqp-softpipe-fails.txt
865 DEQP_SKIPS: deqp-softpipe-skips.txt
866 GALLIUM_DRIVER: "softpipe"
867 DEQP_EXPECTED_RENDERER: softpipe
873 extends: softpipe-gles2
879 extends: softpipe-gles2
886 DEQP_NO_SAVE_RESULTS: 1
887 # Don't use threads inside llvmpipe, we've already got all 4 cores
888 # busy with DEQP_PARALLEL.
890 DEQP_EXPECTED_FAILS: deqp-virgl-gl-fails.txt
891 DEQP_OPTIONS: "--deqp-log-images=disable"
892 LIBGL_ALWAYS_SOFTWARE: "true"
893 GALLIUM_DRIVER: "virpipe"
894 DEQP_EXPECTED_RENDERER: virgl
903 DEQP_RUNNER_OPTIONS: "--timeout 180"
904 extends: virgl-gles2-on-gl
910 MESA_GLES_VERSION_OVERRIDE: "3.1"
911 MESA_GLSL_VERSION_OVERRIDE: "310"
912 MESA_EXTENSION_OVERRIDE: "-GL_OES_tessellation_shader"
913 extends: virgl-gles3-on-gl
918 extends: virgl-gles2-on-gl
923 extends: virgl-gles2-on-gl
928 extends: virgl-gles2-on-gl
930 # Rules for tests that should not be present in MRs or the main
931 # project's pipeline (don't block marge or report red on
932 # mesa/mesamaster) but should be present on pipelines in personal
933 # branches (so you can opt in to running the flaky test when you want
937 - if: '$CI_PROJECT_PATH != "mesa/mesa" && $CI_MERGE_REQUEST_SOURCE_BRANCH_NAME != $CI_COMMIT_REF_NAME'
946 DEQP_EXPECTED_FAILS: deqp-virgl-gles-fails.txt
954 DEQP_EXPECTED_FAILS: deqp-virgl-gles-fails.txt
959 virgl-gles31-on-gles:
962 DEQP_EXPECTED_FAILS: deqp-virgl-gles-fails.txt
971 BM_KERNEL: /lava-files/cheza-kernel
972 BM_CMDLINE: "ip=dhcp console=ttyMSM0,115200n8 root=/dev/nfs rw nfsrootdebug nfsroot=,tcp,nfsvers=4.2 init=/init"
973 DEQP_EXPECTED_FAILS: deqp-freedreno-a630-fails.txt
974 DEQP_SKIPS: deqp-freedreno-a630-skips.txt
976 DEQP_EXPECTED_RENDERER: FD630
977 DEQP_NO_SAVE_RESULTS: ""
979 - google-freedreno-cheza
981 - ./install/bare-metal/cros-servo.sh
984 extends: arm64_a630_gles2
987 # gles31 is about 12 minutes with validation enabled.
991 extends: arm64_a630_gles2
994 # gles3 is about 15 minutes with validation enabled.
997 # We almost always manage to lower UBOs back to constant uploads in
998 # the test suite, so get a little testing for it here.
1000 extends: arm64_a630_gles31
1003 IR3_SHADER_DEBUG: nouboopt
1004 DEQP_CASELIST_FILTER: "functional.*ubo"
1006 # The driver does some guessing as to whether to render using gmem
1007 # or bypass, and some GLES3.1 features interact with either one.
1008 # Do a little testing with gmem and bypass forced.
1010 extends: arm64_a630_gles31
1014 FD_MESA_DEBUG: nogmem
1015 DEQP_EXPECTED_FAILS: deqp-freedreno-a630-bypass-fails.txt
1021 BARE_METAL_TEST_SCRIPT: "/install/tracie-runner-gl.sh"
1022 DEVICE_NAME: "freedreno-a630"
1023 TRACIE_NO_UNIT_TESTS: 1
1024 # This lets us run several more traces which don't use any features we're
1026 MESA_GLSL_VERSION_OVERRIDE: "460"
1027 MESA_GL_VERSION_OVERRIDE: "4.6"
1029 # Along with checking gmem path, check that we don't get obvious nir
1030 # validation failures (though it's too expensive to have it on for the
1033 extends: arm64_a630_gles31
1037 FD_MESA_DEBUG: nobypass
1041 extends: arm64_a630_gles2
1046 VK_DRIVER: freedreno
1047 # Force binning in the main run, which makes sure we render at
1048 # least 2 bins. This is the path that impacts the most different
1049 # features. However, we end up with flaky results in
1050 # dEQP-VK.binding_model.*.geometry and dEQP-VK.glsl.*_vertex.
1053 # Do a separate sysmem pass over the testcases that really affect sysmem
1054 # rendering. This is currently very flaky, leave it as an option for devs
1055 # to click play on in their branches.
1056 arm64_a630_vk_sysmem:
1062 DEQP_CASELIST_FILTER: "dEQP-VK.renderpass.*"
1063 DEQP_EXPECTED_FAILS: deqp-freedreno-a630-bypass-fails.txt
1073 name: "mesa_${CI_JOB_NAME}"
1084 BM_KERNEL: /lava-files/Image.gz
1085 BM_DTB: /lava-files/apq8016-sbc.dtb
1086 BM_ROOTFS: /lava-files/rootfs-arm64
1087 BM_CMDLINE: "ip=dhcp console=ttyMSM0,115200n8"
1088 FLAKES_CHANNEL: "#freedreno-ci"
1089 BARE_METAL_TEST_SCRIPT: "/install/deqp-runner.sh"
1090 DEQP_EXPECTED_FAILS: deqp-freedreno-a307-fails.txt
1091 DEQP_SKIPS: deqp-freedreno-a307-skips.txt
1094 DEQP_EXPECTED_RENDERER: FD307
1095 # Since we can't get artifacts back yet, skip making them.
1096 DEQP_NO_SAVE_RESULTS: 1
1097 # NIR_VALIDATE=0 left intentionally unset as a3xx is fast enough at its small testsuite.
1099 - ./install/bare-metal/fastboot.sh
1106 - google-freedreno-db410c
1108 # Fractional run, single threaded, due to flaky results
1119 # Fractional runs with debug options. Note that since we're not
1120 # hitting the iommu faults, we can run in parallel (derive from gles2, not gles3).
1121 arm64_a306_gles3_options:
1122 extends: arm64_a306_gles2
1126 # Check that the non-constbuf UBO case works.
1127 - DEQP_RUN_SUFFIX=-nouboopt IR3_SHADER_DEBUG=nouboopt DEQP_CASELIST_FILTER="functional.*ubo" ./install/bare-metal/fastboot.sh
1133 BM_KERNEL: /lava-files/db820c-kernel
1134 BM_DTB: /lava-files/db820c.dtb
1135 # Disable SMP because only CPU 0 is at a freq higher than 19mhz on
1136 # current upstream kernel.
1137 BM_CMDLINE: "ip=dhcp console=ttyMSM0,115200n8 nosmp"
1138 DEQP_EXPECTED_FAILS: deqp-freedreno-a530-fails.txt
1139 DEQP_SKIPS: deqp-freedreno-a530-skips.txt
1140 DEQP_EXPECTED_RENDERER: FD530
1143 - google-freedreno-db820c
1164 extends: .radv-rules
1168 ACO_DEBUG: validateir,validatera
1170 # Can only be triggered manually on personal branches because RADV is the only
1171 # driver that does Vulkan testing at the moment.
1172 radv_polaris10_vkcts:
1178 DEQP_SKIPS: deqp-radv-polaris10-skips.txt
1188 - export RADV_FORCE_FAMILY="pitcairn"
1189 - ./install/fossilize-runner.sh
1191 - export RADV_FORCE_FAMILY="bonaire"
1192 - ./install/fossilize-runner.sh
1194 - export RADV_FORCE_FAMILY="polaris10"
1195 - ./install/fossilize-runner.sh
1197 - export RADV_FORCE_FAMILY="gfx900"
1198 - ./install/fossilize-runner.sh
1200 - export RADV_FORCE_FAMILY="gfx1010"
1201 - ./install/fossilize-runner.sh
1215 - ./install/tracie-runner-gl.sh
1222 - ./install/tracie-runner-vk.sh
1229 LIBGL_ALWAYS_SOFTWARE: "true"
1230 GALLIUM_DRIVER: "llvmpipe"
1231 DEVICE_NAME: "gl-vmware-llvmpipe"
1233 radv-polaris10-traces:
1239 DEVICE_NAME: "vk-amd-polaris10"
1248 LIBGL_ALWAYS_SOFTWARE: "true"
1249 GALLIUM_DRIVER: "virpipe"
1250 DEVICE_NAME: "gl-virgl"
1251 MESA_GLES_VERSION_OVERRIDE: "3.1"
1252 MESA_GLSL_VERSION_OVERRIDE: "310"