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'
31 - apk --no-cache add py3-pip
32 - pip3 install sphinx sphinx_rtd_theme
33 - sphinx-build -b html docs public
40 # When to automatically run the CI
43 # If any files affecting the pipeline are changed, build/test jobs run
44 # automatically once all dependency jobs have passed
48 - bin/install_megadrivers.py
49 - bin/meson_get_version.py
50 - bin/symbols-check.py
66 # Otherwise, build/test jobs won't run
71 - runner_system_failure
72 # Cancel CI run if a newer commit is pushed to the same branch
77 image: debian:stable-slim
86 - echo "Dummy job to make sure every merge request pipeline runs at least one job"
91 name: "mesa_${CI_JOB_NAME}"
95 # Watch out! Artifacts are relative to the build dir.
96 # https://gitlab.com/gitlab-org/gitlab-ce/commit/8788fb925706cad594adf6917a6c5f6587dd1521
99 # Build the CI docker images.
101 # FDO_DISTRIBUTION_TAG is the tag of the docker image used by later stage jobs. If the
102 # image doesn't exist yet, the container stage job generates it.
104 # In order to generate a new image, one should generally change the tag.
105 # While removing the image from the registry would also work, that's not
106 # recommended except for ephemeral images during development: Replacing
107 # an image after a significant amount of time might pull in newer
108 # versions of gcc/clang or other packages, which might break the build
109 # with older commits using the same tag.
111 # After merging a change resulting in generating a new image to the
112 # main repository, it's recommended to remove the image from the source
113 # repository's container registry, so that the image from the main
114 # repository's registry will be used there as well.
121 # Run pipeline by default in the main project if any CI pipeline
122 # configuration files were changed, to ensure docker images are up to date
123 - if: '$CI_PROJECT_PATH == "mesa/mesa"'
128 # Run pipeline by default if it was triggered by Marge Bot, is for a
129 # merge request, and any files affecting the pipeline were changed
130 - if: '$GITLAB_USER_LOGIN == "marge-bot" && $CI_PROJECT_PATH != "mesa/mesa"'
134 # Run pipeline by default in the main project if it was not triggered by
135 # Marge Bot, and any files affecting the pipeline were changed
136 - if: '$GITLAB_USER_LOGIN != "marge-bot" && $CI_PROJECT_PATH == "mesa/mesa"'
140 # Allow triggering jobs manually in other cases if any files affecting the
141 # pipeline were changed
145 # Otherwise, container jobs won't run
148 FDO_DISTRIBUTION_VERSION: buster-slim
149 FDO_REPO_SUFFIX: "debian/$CI_JOB_NAME"
150 FDO_DISTRIBUTION_EXEC: 'bash .gitlab-ci/container/${CI_JOB_NAME}.sh'
151 # no need to pull the whole repo to build the container image
154 # Debian 10 based x86 build image base
157 - .fdo.container-build@debian
160 FDO_DISTRIBUTION_TAG: &x86_build-base "2020-06-12"
168 BASE_TAG: *x86_build-base
169 FDO_BASE_IMAGE: "$CI_REGISTRY_IMAGE/debian/x86_build-base:$BASE_TAG"
173 # Debian 10 based x86 main build image
176 - .use-x86_build-base
178 FDO_DISTRIBUTION_TAG: &x86_build "2020-06-02"
183 image: "$CI_REGISTRY_IMAGE/debian/x86_build:$TAG"
188 # Debian 10 based i386 cross-build image
191 - .use-x86_build-base
193 FDO_DISTRIBUTION_TAG: &i386_build "2020-06-02"
198 image: "$CI_REGISTRY_IMAGE/debian/i386_build:$TAG"
203 # Debian 10 based ppc64el cross-build image
206 - .use-x86_build-base
208 FDO_DISTRIBUTION_TAG: &ppc64el_build "2020-06-02"
213 image: "$CI_REGISTRY_IMAGE/debian/ppc64el_build:$TAG"
218 # Debian 10 based s390x cross-build image
221 - .use-x86_build-base
223 FDO_DISTRIBUTION_TAG: &s390x_build "2020-06-02"
228 image: "$CI_REGISTRY_IMAGE/debian/s390x_build:$TAG"
233 # Debian 10 based x86 test image base
235 extends: x86_build-base
237 FDO_DISTRIBUTION_TAG: &x86_test-base "2020-06-02"
245 BASE_TAG: *x86_test-base
246 FDO_BASE_IMAGE: "$CI_REGISTRY_IMAGE/debian/x86_test-base:$BASE_TAG"
250 # Debian 10 based x86 test image for GL
252 extends: .use-x86_test-base
254 FDO_DISTRIBUTION_TAG: &x86_test-gl "2020-06-23-virgl"
256 # Debian 10 based x86 test image for VK
258 extends: .use-x86_test-base
260 FDO_DISTRIBUTION_TAG: &x86_test-vk "2020-06-18-vkcts"
262 # Debian 9 based x86 build image (old LLVM)
264 extends: x86_build-base
266 FDO_DISTRIBUTION_TAG: &x86_build_old "2020-06-12"
267 FDO_DISTRIBUTION_VERSION: stretch-slim
272 image: "$CI_REGISTRY_IMAGE/debian/x86_build_old:$TAG"
276 # Debian 10 based ARM build image
279 - .fdo.container-build@debian@arm64v8
282 FDO_DISTRIBUTION_TAG: &arm_build "2020-06-22-tracie"
287 image: "$CI_REGISTRY_IMAGE/debian/arm_build:$TAG"
291 # Debian 10 based x86 baremetal image base
294 - .fdo.container-build@debian
297 FDO_DISTRIBUTION_TAG: &arm_test-base "2020-06-22-tracie"
305 BASE_TAG: *arm_test-base
306 FDO_BASE_IMAGE: "$CI_REGISTRY_IMAGE/debian/arm_test-base:$BASE_TAG"
310 # x86 image with ARM64 rootfs for baremetal testing.
315 FDO_DISTRIBUTION_TAG: &arm64_test "2020-06-25-kernelfix"
320 image: "$CI_REGISTRY_IMAGE/debian/arm64_test:$TAG"
325 # Native Windows docker builds
327 # Unlike the above Linux-based builds - including MinGW/SCons builds which
328 # cross-compile for Windows - which use the freedesktop ci-templates, we
329 # cannot use the same scheme here. As Windows lacks support for
330 # Docker-in-Docker, and Podman does not run natively on Windows, we have
331 # to open-code much of the same ourselves.
333 # This is achieved by first running in a native Windows shell instance
334 # (host PowerShell) in the container stage to build and push the image,
335 # then in the build stage by executing inside Docker.
337 .windows-docker-vs2019:
339 WINDOWS_TAG: "2020-05-05-llvm"
340 WINDOWS_IMAGE: "$CI_REGISTRY_IMAGE/windows/x64_build:$WINDOWS_TAG"
341 WINDOWS_UPSTREAM_IMAGE: "$CI_REGISTRY/$FDO_UPSTREAM_REPO/windows/x64_build:$WINDOWS_TAG"
343 windows_build_vs2019:
346 - .windows-docker-vs2019
349 GIT_STRATEGY: fetch # we do actually need the full repository though
350 timeout: 4h # LLVM takes ages
357 - .\.gitlab-ci\windows\mesa_container.ps1 $CI_REGISTRY $CI_REGISTRY_USER $CI_REGISTRY_PASSWORD $WINDOWS_IMAGE $WINDOWS_UPSTREAM_IMAGE
359 .use-windows_build_vs2019:
360 extends: .windows-docker-vs2019
361 image: "$WINDOWS_IMAGE"
363 - windows_build_vs2019
367 # Shared between windows and Linux
369 extends: .ci-run-policy
371 name: "mesa_${CI_JOB_NAME}"
374 - _build/meson-logs/*.txt
381 extends: .build-common
383 CCACHE_COMPILERCHECK: "content"
384 CCACHE_COMPRESS: "true"
385 CCACHE_DIR: /cache/mesa/ccache
386 # Use ccache transparently, and print stats before/after
388 - export PATH="/usr/lib/ccache:$PATH"
389 - export CCACHE_BASEDIR="$PWD"
390 - ccache --show-stats
392 - ccache --show-stats
395 extends: .build-common
404 - subprojects/packagecache
414 - .gitlab-ci/meson-build.sh
424 - .gitlab-ci/scons-build.sh
436 -D platforms=x11,drm,surfaceless
439 GALLIUM_DRIVERS: "swrast,virgl"
441 BUILDTYPE: "debugoptimized"
445 - .gitlab-ci/meson-build.sh
446 - .gitlab-ci/prepare-artifacts.sh
449 extends: .meson-build
456 -D platforms=x11,wayland,drm,surfaceless
459 -D gallium-extra-hud=true
460 -D gallium-vdpau=enabled
461 -D gallium-xvmc=enabled
462 -D gallium-omx=bellagio
463 -D gallium-va=enabled
464 -D gallium-xa=enabled
466 -D gallium-opencl=disabled
467 GALLIUM_DRIVERS: "iris,nouveau,kmsro,r300,r600,freedreno,swr,swrast,svga,v3d,vc4,virgl,etnaviv,panfrost,lima,zink"
472 - .gitlab-ci/meson-build.sh
473 - .gitlab-ci/run-shader-db.sh
476 extends: .meson-build
483 -D platforms=x11,wayland,drm,surfaceless
499 -D platforms=surfaceless
503 -D gallium-vdpau=disabled
504 -D gallium-xvmc=disabled
505 -D gallium-omx=disabled
506 -D gallium-va=disabled
507 -D gallium-xa=disabled
508 -D gallium-nine=false
516 VULKAN_DRIVERS: freedreno
517 GALLIUM_DRIVERS: "etnaviv,freedreno,kmsro,lima,nouveau,panfrost,swrast,tegra,v3d,vc4"
518 BUILDTYPE: "debugoptimized"
532 - .gitlab-ci/meson-build.sh
533 - .gitlab-ci/prepare-artifacts.sh
540 VULKAN_DRIVERS: "freedreno"
544 - .gitlab-ci/meson-build.sh
545 - .gitlab-ci/prepare-artifacts.sh
547 meson-arm64-build-test:
552 VULKAN_DRIVERS: "amd"
554 - .gitlab-ci/meson-build.sh
557 extends: .meson-build
563 GALLIUM_DRIVERS: "auto"
564 VULKAN_DRIVERS: intel,amd,freedreno
566 CXX: "ccache clang++-9"
568 meson-windows-vs2019:
571 - .use-windows_build_vs2019
574 - . .\.gitlab-ci\windows\mesa_build.ps1
577 extends: .scons-build
579 SCONS_TARGET: platform=windows machine=x86_64 debug=1
580 SCONS_CHECK_COMMAND: "true"
584 extends: .meson-build
591 GALLIUM_DRIVERS: "r600,radeonsi"
594 -D gallium-vdpau=disabled
595 -D gallium-xvmc=disabled
596 -D gallium-omx=disabled
597 -D gallium-va=disabled
598 -D gallium-xa=disabled
599 -D gallium-nine=false
600 -D gallium-opencl=icd
602 - .gitlab-ci/meson-build.sh
603 - LLVM_VERSION=8 .gitlab-ci/meson-build.sh
605 meson-clover-old-llvm:
615 -D platforms=drm,surfaceless
616 GALLIUM_DRIVERS: "i915,r600"
618 - LLVM_VERSION=3.9 .gitlab-ci/meson-build.sh
619 - LLVM_VERSION=4.0 .gitlab-ci/meson-build.sh
620 - LLVM_VERSION=5.0 .gitlab-ci/meson-build.sh
621 - LLVM_VERSION=6.0 .gitlab-ci/meson-build.sh
622 - LLVM_VERSION=7 .gitlab-ci/meson-build.sh
625 extends: .meson-build
632 -D platforms=x11,wayland,drm
636 -D gallium-vdpau=disabled
637 -D gallium-xvmc=disabled
638 -D gallium-omx=disabled
639 -D gallium-va=disabled
640 -D gallium-xa=disabled
641 -D gallium-nine=false
642 -D gallium-opencl=disabled
643 -D b_sanitize=undefined
644 -D c_args=-fno-sanitize-recover=all
645 -D cpp_args=-fno-sanitize-recover=all
646 UBSAN_OPTIONS: "print_stacktrace=1"
647 VULKAN_DRIVERS: intel,amd,freedreno
649 -D vulkan-overlay-layer=true
658 VULKAN_DRIVERS: intel,amd
659 GALLIUM_DRIVERS: "iris,r300,radeonsi,swrast,virgl"
661 -D vulkan-overlay-layer=true
674 GALLIUM_DRIVERS: "swrast"
683 GALLIUM_DRIVERS: "nouveau,radeonsi,swrast,virgl"
684 VULKAN_DRIVERS: "amd"
686 meson-mingw32-x86_64:
687 extends: .meson-build
692 GALLIUM_DRIVERS: "swrast"
696 --cross-file=.gitlab-ci/x86_64-w64-mingw32
702 GIT_STRATEGY: none # testing doesn't build anything from source
704 # Note: Build dir (and thus install) may be dirty due to GIT_STRATEGY
706 - tar -xf artifacts/install.tar
707 - LD_LIBRARY_PATH=install/lib find install/lib -name "*.so" -print -exec ldd {} \;
710 name: "mesa_${CI_JOB_NAME}"
719 image: "$CI_REGISTRY_IMAGE/debian/x86_test-gl:$TAG"
734 image: "$CI_REGISTRY_IMAGE/debian/x86_test-vk:$TAG"
750 name: "mesa_${CI_JOB_NAME}"
754 LIBGL_ALWAYS_SOFTWARE: 1
757 - install/piglit/run.sh
760 extends: .piglit-test
765 --process-isolation false
768 -x egl_ext_platform_device
769 -x ext_timer_query@time-elapsed
770 -x glx-multithread-clearbuffer
771 -x glx-multithread-shader-compile
774 PIGLIT_PROFILES: quick_gl
777 extends: .piglit-test
781 PIGLIT_PROFILES: glslparser
784 extends: .piglit-test
788 PIGLIT_PROFILES: quick_shader
792 DEQP_SKIPS: deqp-default-skips.txt
794 - ./install/deqp-runner.sh
811 - ./install/fossilize-runner.sh
814 name: "mesa_${CI_JOB_NAME}"
823 # Don't use threads inside llvmpipe, we've already got all 4 cores
824 # busy with DEQP_PARALLEL.
826 DEQP_EXPECTED_FAILS: deqp-llvmpipe-fails.txt
827 LIBGL_ALWAYS_SOFTWARE: "true"
828 DEQP_EXPECTED_RENDERER: llvmpipe
838 DEQP_EXPECTED_FAILS: deqp-softpipe-fails.txt
839 DEQP_SKIPS: deqp-softpipe-skips.txt
840 GALLIUM_DRIVER: "softpipe"
841 DEQP_EXPECTED_RENDERER: softpipe
847 extends: softpipe-gles2
853 extends: softpipe-gles2
860 DEQP_NO_SAVE_RESULTS: 1
861 # Don't use threads inside llvmpipe, we've already got all 4 cores
862 # busy with DEQP_PARALLEL.
864 DEQP_EXPECTED_FAILS: deqp-virgl-gl-fails.txt
865 DEQP_OPTIONS: "--deqp-log-images=disable"
866 LIBGL_ALWAYS_SOFTWARE: "true"
867 GALLIUM_DRIVER: "virpipe"
868 DEQP_EXPECTED_RENDERER: virgl
877 DEQP_RUNNER_OPTIONS: "--timeout 180"
878 extends: virgl-gles2-on-gl
884 MESA_GLES_VERSION_OVERRIDE: "3.1"
885 MESA_GLSL_VERSION_OVERRIDE: "310"
886 MESA_EXTENSION_OVERRIDE: "-GL_OES_tessellation_shader"
887 extends: virgl-gles3-on-gl
892 extends: virgl-gles2-on-gl
897 extends: virgl-gles2-on-gl
902 extends: virgl-gles2-on-gl
904 # Rules for tests that should not be present in MRs or the main
905 # project's pipeline (don't block marge or report red on
906 # mesa/mesamaster) but should be present on pipelines in personal
907 # branches (so you can opt in to running the flaky test when you want
911 - if: '$CI_PROJECT_PATH != "mesa/mesa" && $CI_MERGE_REQUEST_SOURCE_BRANCH_NAME != $CI_COMMIT_REF_NAME'
920 DEQP_EXPECTED_FAILS: deqp-virgl-gles-fails.txt
928 DEQP_EXPECTED_FAILS: deqp-virgl-gles-fails.txt
933 virgl-gles31-on-gles:
936 DEQP_EXPECTED_FAILS: deqp-virgl-gles-fails.txt
945 BM_KERNEL: /lava-files/cheza-kernel
946 BM_CMDLINE: "ip=dhcp console=ttyMSM0,115200n8 root=/dev/nfs rw nfsrootdebug nfsroot=,tcp,nfsvers=4.2 init=/init"
947 DEQP_EXPECTED_FAILS: deqp-freedreno-a630-fails.txt
948 DEQP_SKIPS: deqp-freedreno-a630-skips.txt
950 DEQP_EXPECTED_RENDERER: FD630
951 DEQP_NO_SAVE_RESULTS: ""
953 - google-freedreno-cheza
955 - ./install/bare-metal/cros-servo.sh
958 extends: arm64_a630_gles2
961 # gles31 is about 12 minutes with validation enabled.
965 extends: arm64_a630_gles2
968 # gles3 is about 15 minutes with validation enabled.
971 # We almost always manage to lower UBOs back to constant uploads in
972 # the test suite, so get a little testing for it here.
974 extends: arm64_a630_gles31
977 IR3_SHADER_DEBUG: nouboopt
978 DEQP_CASELIST_FILTER: "functional.*ubo"
980 # The driver does some guessing as to whether to render using gmem
981 # or bypass, and some GLES3.1 features interact with either one.
982 # Do a little testing with gmem and bypass forced.
984 extends: arm64_a630_gles31
988 FD_MESA_DEBUG: nogmem
989 DEQP_EXPECTED_FAILS: deqp-freedreno-a630-bypass-fails.txt
995 BARE_METAL_TEST_SCRIPT: "/install/tracie-runner-gl.sh"
996 DEVICE_NAME: "freedreno-a630"
997 TRACIE_NO_UNIT_TESTS: 1
998 # This lets us run several more traces which don't use any features we're
1000 MESA_GLSL_VERSION_OVERRIDE: "460"
1001 MESA_GL_VERSION_OVERRIDE: "4.6"
1003 # Along with checking gmem path, check that we don't get obvious nir
1004 # validation failures (though it's too expensive to have it on for the
1007 extends: arm64_a630_gles31
1011 FD_MESA_DEBUG: nobypass
1015 extends: arm64_a630_gles2
1020 VK_DRIVER: freedreno
1021 # Force binning in the main run, which makes sure we render at
1022 # least 2 bins. This is the path that impacts the most different
1023 # features. However, we end up with flaky results in
1024 # dEQP-VK.binding_model.*.geometry and dEQP-VK.glsl.*_vertex.
1027 # Do a separate sysmem pass over the testcases that really affect sysmem
1028 # rendering. This is currently very flaky, leave it as an option for devs
1029 # to click play on in their branches.
1030 arm64_a630_vk_sysmem:
1036 DEQP_CASELIST_FILTER: "dEQP-VK.renderpass.*"
1037 DEQP_EXPECTED_FAILS: deqp-freedreno-a630-bypass-fails.txt
1047 name: "mesa_${CI_JOB_NAME}"
1058 BM_KERNEL: /lava-files/Image.gz
1059 BM_DTB: /lava-files/apq8016-sbc.dtb
1060 BM_ROOTFS: /lava-files/rootfs-arm64
1061 BM_CMDLINE: "ip=dhcp console=ttyMSM0,115200n8"
1062 FLAKES_CHANNEL: "#freedreno-ci"
1063 BARE_METAL_TEST_SCRIPT: "/install/deqp-runner.sh"
1064 DEQP_EXPECTED_FAILS: deqp-freedreno-a307-fails.txt
1065 DEQP_SKIPS: deqp-freedreno-a307-skips.txt
1068 DEQP_EXPECTED_RENDERER: FD307
1069 # Since we can't get artifacts back yet, skip making them.
1070 DEQP_NO_SAVE_RESULTS: 1
1071 # NIR_VALIDATE=0 left intentionally unset as a3xx is fast enough at its small testsuite.
1073 - ./install/bare-metal/fastboot.sh
1080 - google-freedreno-db410c
1082 # Fractional run, single threaded, due to flaky results
1093 # Fractional runs with debug options. Note that since we're not
1094 # hitting the iommu faults, we can run in parallel (derive from gles2, not gles3).
1095 arm64_a306_gles3_options:
1096 extends: arm64_a306_gles2
1100 # Check that the non-constbuf UBO case works.
1101 - DEQP_RUN_SUFFIX=-nouboopt IR3_SHADER_DEBUG=nouboopt DEQP_CASELIST_FILTER="functional.*ubo" ./install/bare-metal/fastboot.sh
1107 BM_KERNEL: /lava-files/db820c-kernel
1108 BM_DTB: /lava-files/db820c.dtb
1109 # Disable SMP because only CPU 0 is at a freq higher than 19mhz on
1110 # current upstream kernel.
1111 BM_CMDLINE: "ip=dhcp console=ttyMSM0,115200n8 nosmp"
1112 DEQP_EXPECTED_FAILS: deqp-freedreno-a530-fails.txt
1113 DEQP_SKIPS: deqp-freedreno-a530-skips.txt
1114 DEQP_EXPECTED_RENDERER: FD530
1117 - google-freedreno-db820c
1138 extends: .radv-rules
1142 ACO_DEBUG: validateir,validatera
1144 # Can only be triggered manually on personal branches because RADV is the only
1145 # driver that does Vulkan testing at the moment.
1146 radv_polaris10_vkcts:
1152 DEQP_SKIPS: deqp-radv-polaris10-skips.txt
1162 - export RADV_FORCE_FAMILY="pitcairn"
1163 - ./install/fossilize-runner.sh
1165 - export RADV_FORCE_FAMILY="bonaire"
1166 - ./install/fossilize-runner.sh
1168 - export RADV_FORCE_FAMILY="polaris10"
1169 - ./install/fossilize-runner.sh
1171 - export RADV_FORCE_FAMILY="gfx900"
1172 - ./install/fossilize-runner.sh
1174 - export RADV_FORCE_FAMILY="gfx1010"
1175 - ./install/fossilize-runner.sh
1189 - ./install/tracie-runner-gl.sh
1196 - ./install/tracie-runner-vk.sh
1203 LIBGL_ALWAYS_SOFTWARE: "true"
1204 GALLIUM_DRIVER: "llvmpipe"
1205 DEVICE_NAME: "gl-vmware-llvmpipe"
1207 radv-polaris10-traces:
1213 DEVICE_NAME: "vk-amd-polaris10"
1222 LIBGL_ALWAYS_SOFTWARE: "true"
1223 GALLIUM_DRIVER: "virpipe"
1224 DEVICE_NAME: "gl-virgl"
1225 MESA_GLES_VERSION_OVERRIDE: "3.1"
1226 MESA_GLSL_VERSION_OVERRIDE: "310"