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
44 # When to automatically run the CI
47 # If any files affecting the pipeline are changed, build/test jobs run
48 # automatically once all dependency jobs have passed
52 - bin/install_megadrivers.py
53 - bin/meson_get_version.py
54 - bin/symbols-check.py
70 # Otherwise, build/test jobs won't run
75 - runner_system_failure
76 # Cancel CI run if a newer commit is pushed to the same branch
81 image: debian:stable-slim
90 - echo "Dummy job to make sure every merge request pipeline runs at least one job"
95 name: "mesa_${CI_JOB_NAME}"
99 # Watch out! Artifacts are relative to the build dir.
100 # https://gitlab.com/gitlab-org/gitlab-ce/commit/8788fb925706cad594adf6917a6c5f6587dd1521
103 # Build the CI docker images.
105 # FDO_DISTRIBUTION_TAG is the tag of the docker image used by later stage jobs. If the
106 # image doesn't exist yet, the container stage job generates it.
108 # In order to generate a new image, one should generally change the tag.
109 # While removing the image from the registry would also work, that's not
110 # recommended except for ephemeral images during development: Replacing
111 # an image after a significant amount of time might pull in newer
112 # versions of gcc/clang or other packages, which might break the build
113 # with older commits using the same tag.
115 # After merging a change resulting in generating a new image to the
116 # main repository, it's recommended to remove the image from the source
117 # repository's container registry, so that the image from the main
118 # repository's registry will be used there as well.
125 # Run pipeline by default in the main project if any CI pipeline
126 # configuration files were changed, to ensure docker images are up to date
127 - if: '$CI_PROJECT_PATH == "mesa/mesa"'
132 # Run pipeline by default if it was triggered by Marge Bot, is for a
133 # merge request, and any files affecting the pipeline were changed
134 - if: '$GITLAB_USER_LOGIN == "marge-bot" && $CI_PROJECT_PATH != "mesa/mesa"'
138 # Run pipeline by default in the main project if it was not triggered by
139 # Marge Bot, and any files affecting the pipeline were changed
140 - if: '$GITLAB_USER_LOGIN != "marge-bot" && $CI_PROJECT_PATH == "mesa/mesa"'
144 # Allow triggering jobs manually in other cases if any files affecting the
145 # pipeline were changed
149 # Otherwise, container jobs won't run
152 FDO_DISTRIBUTION_VERSION: buster-slim
153 FDO_REPO_SUFFIX: "debian/$CI_JOB_NAME"
154 FDO_DISTRIBUTION_EXEC: 'bash .gitlab-ci/container/${CI_JOB_NAME}.sh'
155 # no need to pull the whole repo to build the container image
158 # Debian 10 based x86 build image base
161 - .fdo.container-build@debian
164 FDO_DISTRIBUTION_TAG: &x86_build-base "2020-06-12"
172 BASE_TAG: *x86_build-base
173 FDO_BASE_IMAGE: "$CI_REGISTRY_IMAGE/debian/x86_build-base:$BASE_TAG"
177 # Debian 10 based x86 main build image
180 - .use-x86_build-base
182 FDO_DISTRIBUTION_TAG: &x86_build "2020-06-02"
187 image: "$CI_REGISTRY_IMAGE/debian/x86_build:$TAG"
192 # Debian 10 based i386 cross-build image
195 - .use-x86_build-base
197 FDO_DISTRIBUTION_TAG: &i386_build "2020-06-02"
202 image: "$CI_REGISTRY_IMAGE/debian/i386_build:$TAG"
207 # Debian 10 based ppc64el cross-build image
210 - .use-x86_build-base
212 FDO_DISTRIBUTION_TAG: &ppc64el_build "2020-06-02"
217 image: "$CI_REGISTRY_IMAGE/debian/ppc64el_build:$TAG"
222 # Debian 10 based s390x cross-build image
225 - .use-x86_build-base
227 FDO_DISTRIBUTION_TAG: &s390x_build "2020-06-02"
232 image: "$CI_REGISTRY_IMAGE/debian/s390x_build:$TAG"
237 # Debian 10 based x86 test image base
239 extends: x86_build-base
241 FDO_DISTRIBUTION_TAG: &x86_test-base "2020-06-02"
249 BASE_TAG: *x86_test-base
250 FDO_BASE_IMAGE: "$CI_REGISTRY_IMAGE/debian/x86_test-base:$BASE_TAG"
254 # Debian 10 based x86 test image for GL
256 extends: .use-x86_test-base
258 FDO_DISTRIBUTION_TAG: &x86_test-gl "2020-06-23-virgl"
260 # Debian 10 based x86 test image for VK
262 extends: .use-x86_test-base
264 FDO_DISTRIBUTION_TAG: &x86_test-vk "2020-06-18-vkcts"
266 # Debian 9 based x86 build image (old LLVM)
268 extends: x86_build-base
270 FDO_DISTRIBUTION_TAG: &x86_build_old "2020-06-12"
271 FDO_DISTRIBUTION_VERSION: stretch-slim
276 image: "$CI_REGISTRY_IMAGE/debian/x86_build_old:$TAG"
280 # Debian 10 based ARM build image
283 - .fdo.container-build@debian@arm64v8
286 FDO_DISTRIBUTION_TAG: &arm_build "2020-06-22-tracie"
291 image: "$CI_REGISTRY_IMAGE/debian/arm_build:$TAG"
295 # Debian 10 based x86 baremetal image base
298 - .fdo.container-build@debian
301 FDO_DISTRIBUTION_TAG: &arm_test-base "2020-06-22-tracie"
309 BASE_TAG: *arm_test-base
310 FDO_BASE_IMAGE: "$CI_REGISTRY_IMAGE/debian/arm_test-base:$BASE_TAG"
314 # x86 image with ARM64 rootfs for baremetal testing.
319 FDO_DISTRIBUTION_TAG: &arm64_test "2020-06-25-kernelfix"
324 image: "$CI_REGISTRY_IMAGE/debian/arm64_test:$TAG"
329 # Native Windows docker builds
331 # Unlike the above Linux-based builds - including MinGW/SCons builds which
332 # cross-compile for Windows - which use the freedesktop ci-templates, we
333 # cannot use the same scheme here. As Windows lacks support for
334 # Docker-in-Docker, and Podman does not run natively on Windows, we have
335 # to open-code much of the same ourselves.
337 # This is achieved by first running in a native Windows shell instance
338 # (host PowerShell) in the container stage to build and push the image,
339 # then in the build stage by executing inside Docker.
341 .windows-docker-vs2019:
343 WINDOWS_TAG: "2020-05-05-llvm"
344 WINDOWS_IMAGE: "$CI_REGISTRY_IMAGE/windows/x64_build:$WINDOWS_TAG"
345 WINDOWS_UPSTREAM_IMAGE: "$CI_REGISTRY/$FDO_UPSTREAM_REPO/windows/x64_build:$WINDOWS_TAG"
347 windows_build_vs2019:
350 - .windows-docker-vs2019
353 GIT_STRATEGY: fetch # we do actually need the full repository though
354 timeout: 4h # LLVM takes ages
361 - .\.gitlab-ci\windows\mesa_container.ps1 $CI_REGISTRY $CI_REGISTRY_USER $CI_REGISTRY_PASSWORD $WINDOWS_IMAGE $WINDOWS_UPSTREAM_IMAGE
363 .use-windows_build_vs2019:
364 extends: .windows-docker-vs2019
365 image: "$WINDOWS_IMAGE"
367 - windows_build_vs2019
371 # Shared between windows and Linux
373 extends: .ci-run-policy
375 name: "mesa_${CI_JOB_NAME}"
378 - _build/meson-logs/*.txt
385 extends: .build-common
387 CCACHE_COMPILERCHECK: "content"
388 CCACHE_COMPRESS: "true"
389 CCACHE_DIR: /cache/mesa/ccache
390 # Use ccache transparently, and print stats before/after
392 - export PATH="/usr/lib/ccache:$PATH"
393 - export CCACHE_BASEDIR="$PWD"
394 - ccache --show-stats
396 - ccache --show-stats
399 extends: .build-common
408 - subprojects/packagecache
418 - .gitlab-ci/meson-build.sh
428 - .gitlab-ci/scons-build.sh
440 -D platforms=x11,drm,surfaceless
443 GALLIUM_DRIVERS: "swrast,virgl"
445 BUILDTYPE: "debugoptimized"
449 - .gitlab-ci/meson-build.sh
450 - .gitlab-ci/prepare-artifacts.sh
453 extends: .meson-build
460 -D platforms=x11,wayland,drm,surfaceless
463 -D gallium-extra-hud=true
464 -D gallium-vdpau=enabled
465 -D gallium-xvmc=enabled
466 -D gallium-omx=bellagio
467 -D gallium-va=enabled
468 -D gallium-xa=enabled
470 -D gallium-opencl=disabled
471 GALLIUM_DRIVERS: "iris,nouveau,kmsro,r300,r600,freedreno,swr,swrast,svga,v3d,vc4,virgl,etnaviv,panfrost,lima,zink"
476 - .gitlab-ci/meson-build.sh
477 - .gitlab-ci/run-shader-db.sh
480 extends: .meson-build
487 -D platforms=x11,wayland,drm,surfaceless
503 -D platforms=surfaceless
507 -D gallium-vdpau=disabled
508 -D gallium-xvmc=disabled
509 -D gallium-omx=disabled
510 -D gallium-va=disabled
511 -D gallium-xa=disabled
512 -D gallium-nine=false
520 VULKAN_DRIVERS: freedreno
521 GALLIUM_DRIVERS: "etnaviv,freedreno,kmsro,lima,nouveau,panfrost,swrast,tegra,v3d,vc4"
522 BUILDTYPE: "debugoptimized"
536 - .gitlab-ci/meson-build.sh
537 - .gitlab-ci/prepare-artifacts.sh
544 VULKAN_DRIVERS: "freedreno"
548 - .gitlab-ci/meson-build.sh
549 - .gitlab-ci/prepare-artifacts.sh
551 meson-arm64-build-test:
556 VULKAN_DRIVERS: "amd"
558 - .gitlab-ci/meson-build.sh
561 extends: .meson-build
567 GALLIUM_DRIVERS: "auto"
568 VULKAN_DRIVERS: intel,amd,freedreno
570 CXX: "ccache clang++-9"
572 meson-windows-vs2019:
575 - .use-windows_build_vs2019
578 - . .\.gitlab-ci\windows\mesa_build.ps1
581 extends: .scons-build
583 SCONS_TARGET: platform=windows machine=x86_64 debug=1
584 SCONS_CHECK_COMMAND: "true"
588 extends: .meson-build
595 GALLIUM_DRIVERS: "r600,radeonsi"
598 -D gallium-vdpau=disabled
599 -D gallium-xvmc=disabled
600 -D gallium-omx=disabled
601 -D gallium-va=disabled
602 -D gallium-xa=disabled
603 -D gallium-nine=false
604 -D gallium-opencl=icd
606 - .gitlab-ci/meson-build.sh
607 - LLVM_VERSION=8 .gitlab-ci/meson-build.sh
609 meson-clover-old-llvm:
619 -D platforms=drm,surfaceless
620 GALLIUM_DRIVERS: "i915,r600"
622 - LLVM_VERSION=3.9 .gitlab-ci/meson-build.sh
623 - LLVM_VERSION=4.0 .gitlab-ci/meson-build.sh
624 - LLVM_VERSION=5.0 .gitlab-ci/meson-build.sh
625 - LLVM_VERSION=6.0 .gitlab-ci/meson-build.sh
626 - LLVM_VERSION=7 .gitlab-ci/meson-build.sh
629 extends: .meson-build
636 -D platforms=x11,wayland,drm
640 -D gallium-vdpau=disabled
641 -D gallium-xvmc=disabled
642 -D gallium-omx=disabled
643 -D gallium-va=disabled
644 -D gallium-xa=disabled
645 -D gallium-nine=false
646 -D gallium-opencl=disabled
647 -D b_sanitize=undefined
648 -D c_args=-fno-sanitize-recover=all
649 -D cpp_args=-fno-sanitize-recover=all
650 UBSAN_OPTIONS: "print_stacktrace=1"
651 VULKAN_DRIVERS: intel,amd,freedreno
653 -D vulkan-overlay-layer=true
662 VULKAN_DRIVERS: intel,amd
663 GALLIUM_DRIVERS: "iris,r300,radeonsi,swrast,virgl"
665 -D vulkan-overlay-layer=true
678 GALLIUM_DRIVERS: "swrast"
687 GALLIUM_DRIVERS: "nouveau,radeonsi,swrast,virgl"
688 VULKAN_DRIVERS: "amd"
690 meson-mingw32-x86_64:
691 extends: .meson-build
696 GALLIUM_DRIVERS: "swrast"
700 --cross-file=.gitlab-ci/x86_64-w64-mingw32
706 GIT_STRATEGY: none # testing doesn't build anything from source
708 # Note: Build dir (and thus install) may be dirty due to GIT_STRATEGY
710 - tar -xf artifacts/install.tar
711 - LD_LIBRARY_PATH=install/lib find install/lib -name "*.so" -print -exec ldd {} \;
714 name: "mesa_${CI_JOB_NAME}"
723 image: "$CI_REGISTRY_IMAGE/debian/x86_test-gl:$TAG"
738 image: "$CI_REGISTRY_IMAGE/debian/x86_test-vk:$TAG"
754 name: "mesa_${CI_JOB_NAME}"
758 LIBGL_ALWAYS_SOFTWARE: 1
761 - install/piglit/run.sh
764 extends: .piglit-test
769 --process-isolation false
772 -x egl_ext_platform_device
773 -x ext_timer_query@time-elapsed
774 -x glx-multithread-clearbuffer
775 -x glx-multithread-shader-compile
778 PIGLIT_PROFILES: quick_gl
781 extends: .piglit-test
785 PIGLIT_PROFILES: glslparser
788 extends: .piglit-test
792 PIGLIT_PROFILES: quick_shader
796 DEQP_SKIPS: deqp-default-skips.txt
798 - ./install/deqp-runner.sh
815 - ./install/fossilize-runner.sh
818 name: "mesa_${CI_JOB_NAME}"
827 # Don't use threads inside llvmpipe, we've already got all 4 cores
828 # busy with DEQP_PARALLEL.
830 DEQP_EXPECTED_FAILS: deqp-llvmpipe-fails.txt
831 LIBGL_ALWAYS_SOFTWARE: "true"
832 DEQP_EXPECTED_RENDERER: llvmpipe
842 DEQP_EXPECTED_FAILS: deqp-softpipe-fails.txt
843 DEQP_SKIPS: deqp-softpipe-skips.txt
844 GALLIUM_DRIVER: "softpipe"
845 DEQP_EXPECTED_RENDERER: softpipe
851 extends: softpipe-gles2
857 extends: softpipe-gles2
864 DEQP_NO_SAVE_RESULTS: 1
865 # Don't use threads inside llvmpipe, we've already got all 4 cores
866 # busy with DEQP_PARALLEL.
868 DEQP_EXPECTED_FAILS: deqp-virgl-gl-fails.txt
869 DEQP_OPTIONS: "--deqp-log-images=disable"
870 LIBGL_ALWAYS_SOFTWARE: "true"
871 GALLIUM_DRIVER: "virpipe"
872 DEQP_EXPECTED_RENDERER: virgl
881 DEQP_RUNNER_OPTIONS: "--timeout 180"
882 extends: virgl-gles2-on-gl
888 MESA_GLES_VERSION_OVERRIDE: "3.1"
889 MESA_GLSL_VERSION_OVERRIDE: "310"
890 MESA_EXTENSION_OVERRIDE: "-GL_OES_tessellation_shader"
891 extends: virgl-gles3-on-gl
896 extends: virgl-gles2-on-gl
901 extends: virgl-gles2-on-gl
906 extends: virgl-gles2-on-gl
908 # Rules for tests that should not be present in MRs or the main
909 # project's pipeline (don't block marge or report red on
910 # mesa/mesamaster) but should be present on pipelines in personal
911 # branches (so you can opt in to running the flaky test when you want
915 - if: '$CI_PROJECT_PATH != "mesa/mesa" && $CI_MERGE_REQUEST_SOURCE_BRANCH_NAME != $CI_COMMIT_REF_NAME'
924 DEQP_EXPECTED_FAILS: deqp-virgl-gles-fails.txt
932 DEQP_EXPECTED_FAILS: deqp-virgl-gles-fails.txt
937 virgl-gles31-on-gles:
940 DEQP_EXPECTED_FAILS: deqp-virgl-gles-fails.txt
949 BM_KERNEL: /lava-files/cheza-kernel
950 BM_CMDLINE: "ip=dhcp console=ttyMSM0,115200n8 root=/dev/nfs rw nfsrootdebug nfsroot=,tcp,nfsvers=4.2 init=/init"
951 DEQP_EXPECTED_FAILS: deqp-freedreno-a630-fails.txt
952 DEQP_SKIPS: deqp-freedreno-a630-skips.txt
954 DEQP_EXPECTED_RENDERER: FD630
955 DEQP_NO_SAVE_RESULTS: ""
957 - google-freedreno-cheza
959 - ./install/bare-metal/cros-servo.sh
962 extends: arm64_a630_gles2
965 # gles31 is about 12 minutes with validation enabled.
969 extends: arm64_a630_gles2
972 # gles3 is about 15 minutes with validation enabled.
975 # We almost always manage to lower UBOs back to constant uploads in
976 # the test suite, so get a little testing for it here.
978 extends: arm64_a630_gles31
981 IR3_SHADER_DEBUG: nouboopt
982 DEQP_CASELIST_FILTER: "functional.*ubo"
984 # The driver does some guessing as to whether to render using gmem
985 # or bypass, and some GLES3.1 features interact with either one.
986 # Do a little testing with gmem and bypass forced.
988 extends: arm64_a630_gles31
992 FD_MESA_DEBUG: nogmem
993 DEQP_EXPECTED_FAILS: deqp-freedreno-a630-bypass-fails.txt
999 BARE_METAL_TEST_SCRIPT: "/install/tracie-runner-gl.sh"
1000 DEVICE_NAME: "freedreno-a630"
1001 TRACIE_NO_UNIT_TESTS: 1
1002 # This lets us run several more traces which don't use any features we're
1004 MESA_GLSL_VERSION_OVERRIDE: "460"
1005 MESA_GL_VERSION_OVERRIDE: "4.6"
1007 # Along with checking gmem path, check that we don't get obvious nir
1008 # validation failures (though it's too expensive to have it on for the
1011 extends: arm64_a630_gles31
1015 FD_MESA_DEBUG: nobypass
1019 extends: arm64_a630_gles2
1024 VK_DRIVER: freedreno
1025 # Force binning in the main run, which makes sure we render at
1026 # least 2 bins. This is the path that impacts the most different
1027 # features. However, we end up with flaky results in
1028 # dEQP-VK.binding_model.*.geometry and dEQP-VK.glsl.*_vertex.
1031 # Do a separate sysmem pass over the testcases that really affect sysmem
1032 # rendering. This is currently very flaky, leave it as an option for devs
1033 # to click play on in their branches.
1034 arm64_a630_vk_sysmem:
1040 DEQP_CASELIST_FILTER: "dEQP-VK.renderpass.*"
1041 DEQP_EXPECTED_FAILS: deqp-freedreno-a630-bypass-fails.txt
1051 name: "mesa_${CI_JOB_NAME}"
1062 BM_KERNEL: /lava-files/Image.gz
1063 BM_DTB: /lava-files/apq8016-sbc.dtb
1064 BM_ROOTFS: /lava-files/rootfs-arm64
1065 BM_CMDLINE: "ip=dhcp console=ttyMSM0,115200n8"
1066 FLAKES_CHANNEL: "#freedreno-ci"
1067 BARE_METAL_TEST_SCRIPT: "/install/deqp-runner.sh"
1068 DEQP_EXPECTED_FAILS: deqp-freedreno-a307-fails.txt
1069 DEQP_SKIPS: deqp-freedreno-a307-skips.txt
1072 DEQP_EXPECTED_RENDERER: FD307
1073 # Since we can't get artifacts back yet, skip making them.
1074 DEQP_NO_SAVE_RESULTS: 1
1075 # NIR_VALIDATE=0 left intentionally unset as a3xx is fast enough at its small testsuite.
1077 - ./install/bare-metal/fastboot.sh
1084 - google-freedreno-db410c
1086 # Fractional run, single threaded, due to flaky results
1097 # Fractional runs with debug options. Note that since we're not
1098 # hitting the iommu faults, we can run in parallel (derive from gles2, not gles3).
1099 arm64_a306_gles3_options:
1100 extends: arm64_a306_gles2
1104 # Check that the non-constbuf UBO case works.
1105 - DEQP_RUN_SUFFIX=-nouboopt IR3_SHADER_DEBUG=nouboopt DEQP_CASELIST_FILTER="functional.*ubo" ./install/bare-metal/fastboot.sh
1111 BM_KERNEL: /lava-files/db820c-kernel
1112 BM_DTB: /lava-files/db820c.dtb
1113 # Disable SMP because only CPU 0 is at a freq higher than 19mhz on
1114 # current upstream kernel.
1115 BM_CMDLINE: "ip=dhcp console=ttyMSM0,115200n8 nosmp"
1116 DEQP_EXPECTED_FAILS: deqp-freedreno-a530-fails.txt
1117 DEQP_SKIPS: deqp-freedreno-a530-skips.txt
1118 DEQP_EXPECTED_RENDERER: FD530
1121 - google-freedreno-db820c
1142 extends: .radv-rules
1146 ACO_DEBUG: validateir,validatera
1148 # Can only be triggered manually on personal branches because RADV is the only
1149 # driver that does Vulkan testing at the moment.
1150 radv_polaris10_vkcts:
1156 DEQP_SKIPS: deqp-radv-polaris10-skips.txt
1166 - export RADV_FORCE_FAMILY="pitcairn"
1167 - ./install/fossilize-runner.sh
1169 - export RADV_FORCE_FAMILY="bonaire"
1170 - ./install/fossilize-runner.sh
1172 - export RADV_FORCE_FAMILY="polaris10"
1173 - ./install/fossilize-runner.sh
1175 - export RADV_FORCE_FAMILY="gfx900"
1176 - ./install/fossilize-runner.sh
1178 - export RADV_FORCE_FAMILY="gfx1010"
1179 - ./install/fossilize-runner.sh
1193 - ./install/tracie-runner-gl.sh
1200 - ./install/tracie-runner-vk.sh
1207 LIBGL_ALWAYS_SOFTWARE: "true"
1208 GALLIUM_DRIVER: "llvmpipe"
1209 DEVICE_NAME: "gl-vmware-llvmpipe"
1211 radv-polaris10-traces:
1217 DEVICE_NAME: "vk-amd-polaris10"
1226 LIBGL_ALWAYS_SOFTWARE: "true"
1227 GALLIUM_DRIVER: "virpipe"
1228 DEVICE_NAME: "gl-virgl"
1229 MESA_GLES_VERSION_OVERRIDE: "3.1"
1230 MESA_GLSL_VERSION_OVERRIDE: "310"