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 if it was triggered by Marge Bot, is for a
122 # merge request, and any files affecting it were changed
123 - if: '$GITLAB_USER_LOGIN == "marge-bot" && $CI_MERGE_REQUEST_SOURCE_BRANCH_NAME == $CI_COMMIT_REF_NAME'
127 # Run pipeline by default in the main project if any files affecting it were
129 - if: '$CI_PROJECT_PATH == "mesa/mesa"'
133 # Allow triggering jobs manually for MRs or branches of forked projects if
134 # any files affecting the pipeline were changed
138 # Otherwise, container jobs won't run
141 FDO_DISTRIBUTION_VERSION: buster-slim
142 FDO_REPO_SUFFIX: "debian/$CI_JOB_NAME"
143 FDO_DISTRIBUTION_EXEC: 'bash .gitlab-ci/container/${CI_JOB_NAME}.sh'
144 # no need to pull the whole repo to build the container image
147 # Debian 10 based x86 build image base
150 - .fdo.container-build@debian
153 FDO_DISTRIBUTION_TAG: &x86_build-base "2020-06-02"
161 BASE_TAG: *x86_build-base
162 FDO_BASE_IMAGE: "$CI_REGISTRY_IMAGE/debian/x86_build-base:$BASE_TAG"
166 # Debian 10 based x86 main build image
169 - .use-x86_build-base
171 FDO_DISTRIBUTION_TAG: &x86_build "2020-06-02"
176 image: "$CI_REGISTRY_IMAGE/debian/x86_build:$TAG"
181 # Debian 10 based i386 cross-build image
184 - .use-x86_build-base
186 FDO_DISTRIBUTION_TAG: &i386_build "2020-06-02"
191 image: "$CI_REGISTRY_IMAGE/debian/i386_build:$TAG"
196 # Debian 10 based ppc64el cross-build image
199 - .use-x86_build-base
201 FDO_DISTRIBUTION_TAG: &ppc64el_build "2020-06-02"
206 image: "$CI_REGISTRY_IMAGE/debian/ppc64el_build:$TAG"
211 # Debian 10 based s390x cross-build image
214 - .use-x86_build-base
216 FDO_DISTRIBUTION_TAG: &s390x_build "2020-06-02"
221 image: "$CI_REGISTRY_IMAGE/debian/s390x_build:$TAG"
226 # Debian 10 based x86 test image base
228 extends: x86_build-base
230 FDO_DISTRIBUTION_TAG: &x86_test-base "2020-06-02"
238 BASE_TAG: *x86_test-base
239 FDO_BASE_IMAGE: "$CI_REGISTRY_IMAGE/debian/x86_test-base:$BASE_TAG"
243 # Debian 10 based x86 test image for GL
245 extends: .use-x86_test-base
247 FDO_DISTRIBUTION_TAG: &x86_test-gl "2020-06-04"
249 # Debian 10 based x86 test image for VK
251 extends: .use-x86_test-base
253 FDO_DISTRIBUTION_TAG: &x86_test-vk "2020-06-18-vkcts"
255 # Debian 9 based x86 build image (old LLVM)
257 extends: x86_build-base
259 FDO_DISTRIBUTION_TAG: &x86_build_old "2020-06-02"
260 FDO_DISTRIBUTION_VERSION: stretch-slim
265 image: "$CI_REGISTRY_IMAGE/debian/x86_build_old:$TAG"
269 # Debian 10 based ARM build image
272 - .fdo.container-build@debian@arm64v8
275 FDO_DISTRIBUTION_TAG: &arm_build "2020-06-01"
280 image: "$CI_REGISTRY_IMAGE/debian/arm_build:$TAG"
284 # Debian 10 based x86 baremetal image base
287 - .fdo.container-build@debian
290 FDO_DISTRIBUTION_TAG: &arm_test-base "2020-06-09-rsync"
298 BASE_TAG: *arm_test-base
299 FDO_BASE_IMAGE: "$CI_REGISTRY_IMAGE/debian/arm_test-base:$BASE_TAG"
303 # x86 image with ARM64 rootfs for baremetal testing.
308 FDO_DISTRIBUTION_TAG: &arm64_test "2020-06-18-vkcts"
313 image: "$CI_REGISTRY_IMAGE/debian/arm64_test:$TAG"
318 # Native Windows docker builds
320 # Unlike the above Linux-based builds - including MinGW/SCons builds which
321 # cross-compile for Windows - which use the freedesktop ci-templates, we
322 # cannot use the same scheme here. As Windows lacks support for
323 # Docker-in-Docker, and Podman does not run natively on Windows, we have
324 # to open-code much of the same ourselves.
326 # This is achieved by first running in a native Windows shell instance
327 # (host PowerShell) in the container stage to build and push the image,
328 # then in the build stage by executing inside Docker.
330 .windows-docker-vs2019:
332 WINDOWS_TAG: "2020-05-05-llvm"
333 WINDOWS_IMAGE: "$CI_REGISTRY_IMAGE/windows/x64_build:$WINDOWS_TAG"
334 WINDOWS_UPSTREAM_IMAGE: "$CI_REGISTRY/$FDO_UPSTREAM_REPO/windows/x64_build:$WINDOWS_TAG"
336 windows_build_vs2019:
339 - .windows-docker-vs2019
342 GIT_STRATEGY: fetch # we do actually need the full repository though
343 timeout: 4h # LLVM takes ages
350 - .\.gitlab-ci\windows\mesa_container.ps1 $CI_REGISTRY $CI_REGISTRY_USER $CI_REGISTRY_PASSWORD $WINDOWS_IMAGE $WINDOWS_UPSTREAM_IMAGE
352 .use-windows_build_vs2019:
353 extends: .windows-docker-vs2019
354 image: "$WINDOWS_IMAGE"
356 - windows_build_vs2019
360 # Shared between windows and Linux
362 extends: .ci-run-policy
364 name: "mesa_${CI_JOB_NAME}"
367 - _build/meson-logs/*.txt
374 extends: .build-common
376 CCACHE_COMPILERCHECK: "content"
377 CCACHE_COMPRESS: "true"
378 CCACHE_DIR: /cache/mesa/ccache
379 # Use ccache transparently, and print stats before/after
381 - export PATH="/usr/lib/ccache:$PATH"
382 - export CCACHE_BASEDIR="$PWD"
383 - ccache --show-stats
385 - ccache --show-stats
388 extends: .build-common
397 - subprojects/packagecache
407 - .gitlab-ci/meson-build.sh
417 - .gitlab-ci/scons-build.sh
429 -D platforms=x11,drm,surfaceless
432 GALLIUM_DRIVERS: "swrast,virgl"
434 BUILDTYPE: "debugoptimized"
438 - .gitlab-ci/meson-build.sh
439 - .gitlab-ci/prepare-artifacts.sh
442 extends: .meson-build
449 -D platforms=x11,wayland,drm,surfaceless
452 -D gallium-extra-hud=true
453 -D gallium-vdpau=enabled
454 -D gallium-xvmc=enabled
455 -D gallium-omx=bellagio
456 -D gallium-va=enabled
457 -D gallium-xa=enabled
459 -D gallium-opencl=disabled
460 GALLIUM_DRIVERS: "iris,nouveau,kmsro,r300,r600,freedreno,swr,swrast,svga,v3d,vc4,virgl,etnaviv,panfrost,lima,zink"
465 - .gitlab-ci/meson-build.sh
466 - .gitlab-ci/run-shader-db.sh
469 extends: .meson-build
476 -D platforms=x11,wayland,drm,surfaceless
492 -D platforms=surfaceless
496 -D gallium-vdpau=disabled
497 -D gallium-xvmc=disabled
498 -D gallium-omx=disabled
499 -D gallium-va=disabled
500 -D gallium-xa=disabled
501 -D gallium-nine=false
509 VULKAN_DRIVERS: freedreno
510 GALLIUM_DRIVERS: "etnaviv,freedreno,kmsro,lima,nouveau,panfrost,swrast,tegra,v3d,vc4"
511 BUILDTYPE: "debugoptimized"
525 - .gitlab-ci/meson-build.sh
526 - .gitlab-ci/prepare-artifacts.sh
533 VULKAN_DRIVERS: "freedreno"
537 - .gitlab-ci/meson-build.sh
538 - .gitlab-ci/prepare-artifacts.sh
540 meson-arm64-build-test:
545 VULKAN_DRIVERS: "amd"
547 - .gitlab-ci/meson-build.sh
550 extends: .meson-build
556 GALLIUM_DRIVERS: "auto"
557 VULKAN_DRIVERS: intel,amd,freedreno
559 CXX: "ccache clang++-9"
561 .meson-windows-vs2019:
564 - .use-windows_build_vs2019
567 - . .\.gitlab-ci\windows\mesa_build.ps1
570 extends: .scons-build
572 SCONS_TARGET: platform=windows machine=x86_64 debug=1
573 SCONS_CHECK_COMMAND: "true"
577 extends: .meson-build
584 GALLIUM_DRIVERS: "r600,radeonsi"
587 -D gallium-vdpau=disabled
588 -D gallium-xvmc=disabled
589 -D gallium-omx=disabled
590 -D gallium-va=disabled
591 -D gallium-xa=disabled
592 -D gallium-nine=false
593 -D gallium-opencl=icd
595 - .gitlab-ci/meson-build.sh
596 - LLVM_VERSION=8 .gitlab-ci/meson-build.sh
598 meson-clover-old-llvm:
608 -D platforms=drm,surfaceless
609 GALLIUM_DRIVERS: "i915,r600"
611 - LLVM_VERSION=3.9 .gitlab-ci/meson-build.sh
612 - LLVM_VERSION=4.0 .gitlab-ci/meson-build.sh
613 - LLVM_VERSION=5.0 .gitlab-ci/meson-build.sh
614 - LLVM_VERSION=6.0 .gitlab-ci/meson-build.sh
615 - LLVM_VERSION=7 .gitlab-ci/meson-build.sh
618 extends: .meson-build
625 -D platforms=x11,wayland,drm
629 -D gallium-vdpau=disabled
630 -D gallium-xvmc=disabled
631 -D gallium-omx=disabled
632 -D gallium-va=disabled
633 -D gallium-xa=disabled
634 -D gallium-nine=false
635 -D gallium-opencl=disabled
636 -D b_sanitize=undefined
637 -D c_args=-fno-sanitize-recover=all
638 -D cpp_args=-fno-sanitize-recover=all
639 UBSAN_OPTIONS: "print_stacktrace=1"
640 VULKAN_DRIVERS: intel,amd,freedreno
642 -D vulkan-overlay-layer=true
651 VULKAN_DRIVERS: intel,amd
652 GALLIUM_DRIVERS: "iris,r300,radeonsi,swrast,virgl"
654 -D vulkan-overlay-layer=true
667 GALLIUM_DRIVERS: "swrast"
676 GALLIUM_DRIVERS: "nouveau,radeonsi,swrast,virgl"
677 VULKAN_DRIVERS: "amd"
679 meson-mingw32-x86_64:
680 extends: .meson-build
685 GALLIUM_DRIVERS: "swrast"
689 --cross-file=.gitlab-ci/x86_64-w64-mingw32
695 GIT_STRATEGY: none # testing doesn't build anything from source
697 # Note: Build dir (and thus install) may be dirty due to GIT_STRATEGY
699 - tar -xf artifacts/install.tar
700 - LD_LIBRARY_PATH=install/lib find install/lib -name "*.so" -print -exec ldd {} \;
703 name: "mesa_${CI_JOB_NAME}"
712 image: "$CI_REGISTRY_IMAGE/debian/x86_test-gl:$TAG"
727 image: "$CI_REGISTRY_IMAGE/debian/x86_test-vk:$TAG"
743 name: "mesa_${CI_JOB_NAME}"
747 LIBGL_ALWAYS_SOFTWARE: 1
750 - install/piglit/run.sh
753 extends: .piglit-test
758 --process-isolation false
761 -x egl_ext_platform_device
762 -x ext_timer_query@time-elapsed
763 -x glx-multithread-clearbuffer
764 -x glx-multithread-shader-compile
767 PIGLIT_PROFILES: quick_gl
770 extends: .piglit-test
774 PIGLIT_PROFILES: glslparser
777 extends: .piglit-test
781 PIGLIT_PROFILES: quick_shader
785 DEQP_SKIPS: deqp-default-skips.txt
787 - ./install/deqp-runner.sh
804 - ./install/fossilize-runner.sh
811 # Don't use threads inside llvmpipe, we've already got all 4 cores
812 # busy with DEQP_PARALLEL.
814 DEQP_EXPECTED_FAILS: deqp-llvmpipe-fails.txt
815 LIBGL_ALWAYS_SOFTWARE: "true"
816 DEQP_EXPECTED_RENDERER: llvmpipe
826 DEQP_EXPECTED_FAILS: deqp-softpipe-fails.txt
827 DEQP_SKIPS: deqp-softpipe-skips.txt
828 GALLIUM_DRIVER: "softpipe"
829 DEQP_EXPECTED_RENDERER: softpipe
835 extends: softpipe-gles2
841 extends: softpipe-gles2
848 DEQP_NO_SAVE_RESULTS: 1
849 # Don't use threads inside llvmpipe, we've already got all 4 cores
850 # busy with DEQP_PARALLEL.
852 DEQP_EXPECTED_FAILS: deqp-virgl-fails.txt
853 LIBGL_ALWAYS_SOFTWARE: "true"
854 GALLIUM_DRIVER: "virpipe"
855 DEQP_EXPECTED_RENDERER: virgl
865 DEQP_RUNNER_OPTIONS: "--timeout 120"
873 DEQP_OPTIONS: "--deqp-log-images=disable"
874 DEQP_RUNNER_OPTIONS: "--timeout 120"
875 MESA_GLES_VERSION_OVERRIDE: "3.1"
876 MESA_GLSL_VERSION_OVERRIDE: "310"
877 MESA_EXTENSION_OVERRIDE: "-GL_OES_tessellation_shader"
880 # Rules for tests that should not be present in MRs or the main
881 # project's pipeline (don't block marge or report red on
882 # mesa/mesamaster) but should be present on pipelines in personal
883 # branches (so you can opt in to running the flaky test when you want
887 - if: '$CI_PROJECT_PATH != "mesa/mesa" && $CI_MERGE_REQUEST_SOURCE_BRANCH_NAME != $CI_COMMIT_REF_NAME'
897 BM_KERNEL: /lava-files/cheza-kernel
898 BM_CMDLINE: "ip=dhcp console=ttyMSM0,115200n8 root=/dev/nfs rw nfsrootdebug nfsroot=,tcp,nfsvers=4.2 init=/init"
899 DEQP_EXPECTED_FAILS: deqp-freedreno-a630-fails.txt
900 DEQP_SKIPS: deqp-freedreno-a630-skips.txt
902 DEQP_EXPECTED_RENDERER: FD630
903 DEQP_NO_SAVE_RESULTS: ""
905 - google-freedreno-cheza
907 - ./install/bare-metal/cros-servo.sh
910 extends: arm64_a630_gles2
913 # gles31 is about 12 minutes with validation enabled.
917 extends: arm64_a630_gles2
920 # gles3 is about 15 minutes with validation enabled.
923 # We almost always manage to lower UBOs back to constant uploads in
924 # the test suite, so get a little testing for it here.
926 extends: arm64_a630_gles31
929 IR3_SHADER_DEBUG: nouboopt
930 DEQP_CASELIST_FILTER: "functional.*ubo"
932 # The driver does some guessing as to whether to render using gmem
933 # or bypass, and some GLES3.1 features interact with either one.
934 # Do a little testing with gmem and bypass forced.
936 extends: arm64_a630_gles31
940 FD_MESA_DEBUG: nogmem
941 DEQP_EXPECTED_FAILS: deqp-freedreno-a630-bypass-fails.txt
943 # Along with checking gmem path, check that we don't get obvious nir
944 # validation failures (though it's too expensive to have it on for the
947 extends: arm64_a630_gles31
951 FD_MESA_DEBUG: nobypass
955 extends: arm64_a630_gles2
961 # Force binning in the main run, which makes sure we render at
962 # least 2 bins. This is the path that impacts the most different
963 # features. However, we end up with flaky results in
964 # dEQP-VK.binding_model.*.geometry and dEQP-VK.glsl.*_vertex.
967 # Do a separate sysmem pass over the testcases that really affect sysmem
968 # rendering. This is currently very flaky, leave it as an option for devs
969 # to click play on in their branches.
970 arm64_a630_vk_sysmem:
976 DEQP_CASELIST_FILTER: "dEQP-VK.renderpass.*"
977 DEQP_EXPECTED_FAILS: deqp-freedreno-a630-bypass-fails.txt
987 name: "mesa_${CI_JOB_NAME}"
998 BM_KERNEL: /lava-files/Image.gz
999 BM_DTB: /lava-files/apq8016-sbc.dtb
1000 BM_ROOTFS: /lava-files/rootfs-arm64
1001 BM_CMDLINE: "ip=dhcp console=ttyMSM0,115200n8"
1002 FLAKES_CHANNEL: "#freedreno-ci"
1003 BARE_METAL_TEST_SCRIPT: "/install/deqp-runner.sh"
1004 DEQP_EXPECTED_FAILS: deqp-freedreno-a307-fails.txt
1005 DEQP_SKIPS: deqp-freedreno-a307-skips.txt
1008 DEQP_EXPECTED_RENDERER: FD307
1009 # Since we can't get artifacts back yet, skip making them.
1010 DEQP_NO_SAVE_RESULTS: 1
1011 # NIR_VALIDATE=0 left intentionally unset as a3xx is fast enough at its small testsuite.
1013 - ./install/bare-metal/fastboot.sh
1020 - google-freedreno-db410c
1022 # Fractional run, single threaded, due to flaky results
1033 # Fractional runs with debug options. Note that since we're not
1034 # hitting the iommu faults, we can run in parallel (derive from gles2, not gles3).
1035 arm64_a306_gles3_options:
1036 extends: arm64_a306_gles2
1040 # Check that the non-constbuf UBO case works.
1041 - DEQP_RUN_SUFFIX=-nouboopt IR3_SHADER_DEBUG=nouboopt DEQP_CASELIST_FILTER="functional.*ubo" ./install/bare-metal/fastboot.sh
1047 BM_KERNEL: /lava-files/db820c-kernel
1048 BM_DTB: /lava-files/db820c.dtb
1049 # Disable SMP because only CPU 0 is at a freq higher than 19mhz on
1050 # current upstream kernel.
1051 BM_CMDLINE: "ip=dhcp console=ttyMSM0,115200n8 nosmp"
1052 DEQP_EXPECTED_FAILS: deqp-freedreno-a530-fails.txt
1053 DEQP_SKIPS: deqp-freedreno-a530-skips.txt
1054 DEQP_EXPECTED_RENDERER: FD530
1057 - google-freedreno-db820c
1078 extends: .radv-rules
1083 ACO_DEBUG: validateir,validatera
1085 # Can only be triggered manually on personal branches because RADV is the only
1086 # driver that does Vulkan testing at the moment.
1087 radv_polaris10_vkcts:
1093 DEQP_SKIPS: deqp-radv-polaris10-skips.txt
1103 - export RADV_FORCE_FAMILY="pitcairn"
1104 - ./install/fossilize-runner.sh
1105 - RADV_PERFTEST=aco ./install/fossilize-runner.sh
1107 - export RADV_FORCE_FAMILY="bonaire"
1108 - ./install/fossilize-runner.sh
1109 - RADV_PERFTEST=aco ./install/fossilize-runner.sh
1111 - export RADV_FORCE_FAMILY="polaris10"
1112 - ./install/fossilize-runner.sh
1113 - RADV_PERFTEST=aco ./install/fossilize-runner.sh
1115 - export RADV_FORCE_FAMILY="gfx900"
1116 - ./install/fossilize-runner.sh
1117 - RADV_PERFTEST=aco ./install/fossilize-runner.sh
1119 - export RADV_FORCE_FAMILY="gfx1010"
1120 - ./install/fossilize-runner.sh
1121 - RADV_PERFTEST=aco ./install/fossilize-runner.sh
1135 - ./install/tracie-runner-gl.sh
1142 - ./install/tracie-runner-vk.sh
1149 LIBGL_ALWAYS_SOFTWARE: "true"
1150 GALLIUM_DRIVER: "llvmpipe"
1151 DEVICE_NAME: "gl-vmware-llvmpipe"
1153 radv-polaris10-traces:
1159 DEVICE_NAME: "vk-amd-polaris10"
1168 LIBGL_ALWAYS_SOFTWARE: "true"
1169 GALLIUM_DRIVER: "virpipe"
1170 DEVICE_NAME: "gl-virgl"
1171 MESA_GLES_VERSION_OVERRIDE: "3.1"
1172 MESA_GLSL_VERSION_OVERRIDE: "310"