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-12"
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-23-virgl"
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-12"
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-22-tracie"
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-22-tracie"
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-25-kernelfix"
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
807 name: "mesa_${CI_JOB_NAME}"
816 # Don't use threads inside llvmpipe, we've already got all 4 cores
817 # busy with DEQP_PARALLEL.
819 DEQP_EXPECTED_FAILS: deqp-llvmpipe-fails.txt
820 LIBGL_ALWAYS_SOFTWARE: "true"
821 DEQP_EXPECTED_RENDERER: llvmpipe
831 DEQP_EXPECTED_FAILS: deqp-softpipe-fails.txt
832 DEQP_SKIPS: deqp-softpipe-skips.txt
833 GALLIUM_DRIVER: "softpipe"
834 DEQP_EXPECTED_RENDERER: softpipe
840 extends: softpipe-gles2
846 extends: softpipe-gles2
853 DEQP_NO_SAVE_RESULTS: 1
854 # Don't use threads inside llvmpipe, we've already got all 4 cores
855 # busy with DEQP_PARALLEL.
857 DEQP_EXPECTED_FAILS: deqp-virgl-gl-fails.txt
858 DEQP_OPTIONS: "--deqp-log-images=disable"
859 LIBGL_ALWAYS_SOFTWARE: "true"
860 GALLIUM_DRIVER: "virpipe"
861 DEQP_EXPECTED_RENDERER: virgl
870 DEQP_RUNNER_OPTIONS: "--timeout 180"
871 extends: virgl-gles2-on-gl
877 MESA_GLES_VERSION_OVERRIDE: "3.1"
878 MESA_GLSL_VERSION_OVERRIDE: "310"
879 MESA_EXTENSION_OVERRIDE: "-GL_OES_tessellation_shader"
880 extends: virgl-gles3-on-gl
885 extends: virgl-gles2-on-gl
890 extends: virgl-gles2-on-gl
895 extends: virgl-gles2-on-gl
897 # Rules for tests that should not be present in MRs or the main
898 # project's pipeline (don't block marge or report red on
899 # mesa/mesamaster) but should be present on pipelines in personal
900 # branches (so you can opt in to running the flaky test when you want
904 - if: '$CI_PROJECT_PATH != "mesa/mesa" && $CI_MERGE_REQUEST_SOURCE_BRANCH_NAME != $CI_COMMIT_REF_NAME'
913 DEQP_EXPECTED_FAILS: deqp-virgl-gles-fails.txt
921 DEQP_EXPECTED_FAILS: deqp-virgl-gles-fails.txt
926 virgl-gles31-on-gles:
929 DEQP_EXPECTED_FAILS: deqp-virgl-gles-fails.txt
938 BM_KERNEL: /lava-files/cheza-kernel
939 BM_CMDLINE: "ip=dhcp console=ttyMSM0,115200n8 root=/dev/nfs rw nfsrootdebug nfsroot=,tcp,nfsvers=4.2 init=/init"
940 DEQP_EXPECTED_FAILS: deqp-freedreno-a630-fails.txt
941 DEQP_SKIPS: deqp-freedreno-a630-skips.txt
943 DEQP_EXPECTED_RENDERER: FD630
944 DEQP_NO_SAVE_RESULTS: ""
946 - google-freedreno-cheza
948 - ./install/bare-metal/cros-servo.sh
951 extends: arm64_a630_gles2
954 # gles31 is about 12 minutes with validation enabled.
958 extends: arm64_a630_gles2
961 # gles3 is about 15 minutes with validation enabled.
964 # We almost always manage to lower UBOs back to constant uploads in
965 # the test suite, so get a little testing for it here.
967 extends: arm64_a630_gles31
970 IR3_SHADER_DEBUG: nouboopt
971 DEQP_CASELIST_FILTER: "functional.*ubo"
973 # The driver does some guessing as to whether to render using gmem
974 # or bypass, and some GLES3.1 features interact with either one.
975 # Do a little testing with gmem and bypass forced.
977 extends: arm64_a630_gles31
981 FD_MESA_DEBUG: nogmem
982 DEQP_EXPECTED_FAILS: deqp-freedreno-a630-bypass-fails.txt
988 BARE_METAL_TEST_SCRIPT: "/install/tracie-runner-gl.sh"
989 DEVICE_NAME: "freedreno-a630"
990 TRACIE_NO_UNIT_TESTS: 1
991 # This lets us run several more traces which don't use any features we're
993 MESA_GLSL_VERSION_OVERRIDE: "460"
994 MESA_GL_VERSION_OVERRIDE: "4.6"
996 # Along with checking gmem path, check that we don't get obvious nir
997 # validation failures (though it's too expensive to have it on for the
1000 extends: arm64_a630_gles31
1004 FD_MESA_DEBUG: nobypass
1008 extends: arm64_a630_gles2
1013 VK_DRIVER: freedreno
1014 # Force binning in the main run, which makes sure we render at
1015 # least 2 bins. This is the path that impacts the most different
1016 # features. However, we end up with flaky results in
1017 # dEQP-VK.binding_model.*.geometry and dEQP-VK.glsl.*_vertex.
1020 # Do a separate sysmem pass over the testcases that really affect sysmem
1021 # rendering. This is currently very flaky, leave it as an option for devs
1022 # to click play on in their branches.
1023 arm64_a630_vk_sysmem:
1029 DEQP_CASELIST_FILTER: "dEQP-VK.renderpass.*"
1030 DEQP_EXPECTED_FAILS: deqp-freedreno-a630-bypass-fails.txt
1040 name: "mesa_${CI_JOB_NAME}"
1051 BM_KERNEL: /lava-files/Image.gz
1052 BM_DTB: /lava-files/apq8016-sbc.dtb
1053 BM_ROOTFS: /lava-files/rootfs-arm64
1054 BM_CMDLINE: "ip=dhcp console=ttyMSM0,115200n8"
1055 FLAKES_CHANNEL: "#freedreno-ci"
1056 BARE_METAL_TEST_SCRIPT: "/install/deqp-runner.sh"
1057 DEQP_EXPECTED_FAILS: deqp-freedreno-a307-fails.txt
1058 DEQP_SKIPS: deqp-freedreno-a307-skips.txt
1061 DEQP_EXPECTED_RENDERER: FD307
1062 # Since we can't get artifacts back yet, skip making them.
1063 DEQP_NO_SAVE_RESULTS: 1
1064 # NIR_VALIDATE=0 left intentionally unset as a3xx is fast enough at its small testsuite.
1066 - ./install/bare-metal/fastboot.sh
1073 - google-freedreno-db410c
1075 # Fractional run, single threaded, due to flaky results
1086 # Fractional runs with debug options. Note that since we're not
1087 # hitting the iommu faults, we can run in parallel (derive from gles2, not gles3).
1088 arm64_a306_gles3_options:
1089 extends: arm64_a306_gles2
1093 # Check that the non-constbuf UBO case works.
1094 - DEQP_RUN_SUFFIX=-nouboopt IR3_SHADER_DEBUG=nouboopt DEQP_CASELIST_FILTER="functional.*ubo" ./install/bare-metal/fastboot.sh
1100 BM_KERNEL: /lava-files/db820c-kernel
1101 BM_DTB: /lava-files/db820c.dtb
1102 # Disable SMP because only CPU 0 is at a freq higher than 19mhz on
1103 # current upstream kernel.
1104 BM_CMDLINE: "ip=dhcp console=ttyMSM0,115200n8 nosmp"
1105 DEQP_EXPECTED_FAILS: deqp-freedreno-a530-fails.txt
1106 DEQP_SKIPS: deqp-freedreno-a530-skips.txt
1107 DEQP_EXPECTED_RENDERER: FD530
1110 - google-freedreno-db820c
1131 extends: .radv-rules
1135 ACO_DEBUG: validateir,validatera
1137 # Can only be triggered manually on personal branches because RADV is the only
1138 # driver that does Vulkan testing at the moment.
1139 radv_polaris10_vkcts:
1145 DEQP_SKIPS: deqp-radv-polaris10-skips.txt
1155 - export RADV_FORCE_FAMILY="pitcairn"
1156 - ./install/fossilize-runner.sh
1158 - export RADV_FORCE_FAMILY="bonaire"
1159 - ./install/fossilize-runner.sh
1161 - export RADV_FORCE_FAMILY="polaris10"
1162 - ./install/fossilize-runner.sh
1164 - export RADV_FORCE_FAMILY="gfx900"
1165 - ./install/fossilize-runner.sh
1167 - export RADV_FORCE_FAMILY="gfx1010"
1168 - ./install/fossilize-runner.sh
1182 - ./install/tracie-runner-gl.sh
1189 - ./install/tracie-runner-vk.sh
1196 LIBGL_ALWAYS_SOFTWARE: "true"
1197 GALLIUM_DRIVER: "llvmpipe"
1198 DEVICE_NAME: "gl-vmware-llvmpipe"
1200 radv-polaris10-traces:
1206 DEVICE_NAME: "vk-amd-polaris10"
1215 LIBGL_ALWAYS_SOFTWARE: "true"
1216 GALLIUM_DRIVER: "virpipe"
1217 DEVICE_NAME: "gl-virgl"
1218 MESA_GLES_VERSION_OVERRIDE: "3.1"
1219 MESA_GLSL_VERSION_OVERRIDE: "310"