From 2b7ddc7d714c73a6ade4e8751d35a0b28ece1adb Mon Sep 17 00:00:00 2001 From: Valentine Burley Date: Tue, 27 May 2025 10:45:46 +0200 Subject: [PATCH] ci/vkd3d: Use structured tagging for vkd3d-proton Structured tagging captures a checksum of the component we think we're building, and verifies this through the chain. Signed-off-by: Valentine Burley Part-of: --- .gitlab-ci/conditional-build-image-tags.yml | 1 + .gitlab-ci/container/build-vkd3d-proton.sh | 4 ++++ .gitlab-ci/container/gitlab-ci.yml | 8 +++++++- .gitlab-ci/image-tags.yml | 2 +- .gitlab-ci/test/gitlab-ci.yml | 1 + .gitlab-ci/vkd3d-runner.sh | 8 ++++++++ 6 files changed, 22 insertions(+), 2 deletions(-) diff --git a/.gitlab-ci/conditional-build-image-tags.yml b/.gitlab-ci/conditional-build-image-tags.yml index 012a38d431b..bf7e803f816 100644 --- a/.gitlab-ci/conditional-build-image-tags.yml +++ b/.gitlab-ci/conditional-build-image-tags.yml @@ -3,3 +3,4 @@ variables: CONDITIONAL_BUILD_CROSVM_TAG: bb7f75d912ef43be8c9204385d79820a CONDITIONAL_BUILD_FLUSTER_TAG: 3bc3afd7468e106afcbfd569a85f34f9 CONDITIONAL_BUILD_PIGLIT_TAG: 009be6e9949c1121f67c8a3985b08505 + CONDITIONAL_BUILD_VKD3D_PROTON_TAG: 5b73ce9ca2be32a54b88af1949e31ace diff --git a/.gitlab-ci/container/build-vkd3d-proton.sh b/.gitlab-ci/container/build-vkd3d-proton.sh index 9ca732a37e3..e4413598462 100644 --- a/.gitlab-ci/container/build-vkd3d-proton.sh +++ b/.gitlab-ci/container/build-vkd3d-proton.sh @@ -7,6 +7,10 @@ set -ex section_start vkd3d-proton "Building vkd3d-proton" +# Do a very early check to make sure the tag is correct without the need of +# setting up the environment variables locally +ci_tag_build_time_check "VKD3D_PROTON_TAG" + VKD3D_PROTON_COMMIT="041cfa75580090c6b30af2f2721015d15493f14b" VKD3D_PROTON_DST_DIR="/vkd3d-proton-tests" diff --git a/.gitlab-ci/container/gitlab-ci.yml b/.gitlab-ci/container/gitlab-ci.yml index e1caa40c09c..94d583169fa 100644 --- a/.gitlab-ci/container/gitlab-ci.yml +++ b/.gitlab-ci/container/gitlab-ci.yml @@ -69,7 +69,7 @@ FDO_DISTRIBUTION_EXEC: 'bash .gitlab-ci/container/container_job_trampoline.sh "${CI_JOB_NAME}"' # no need to pull the whole repo to build the container image GIT_STRATEGY: none - CI_BUILD_COMPONENTS: "$CI_BUILD_COMPONENTS_ANGLE $CI_BUILD_COMPONENTS_CROSVM $CI_BUILD_COMPONENTS_FLUSTER $CI_BUILD_COMPONENTS_PIGLIT" + CI_BUILD_COMPONENTS: "$CI_BUILD_COMPONENTS_ANGLE $CI_BUILD_COMPONENTS_CROSVM $CI_BUILD_COMPONENTS_FLUSTER $CI_BUILD_COMPONENTS_PIGLIT $CI_BUILD_COMPONENTS_VKD3D_PROTON" .container-builds-angle: variables: @@ -91,6 +91,11 @@ PIGLIT_TAG: "${CONDITIONAL_BUILD_PIGLIT_TAG}" CI_BUILD_COMPONENTS_PIGLIT: piglit +.container-builds-vkd3d-proton: + variables: + VKD3D_PROTON_TAG: "${CONDITIONAL_BUILD_VKD3D_PROTON_TAG}" + CI_BUILD_COMPONENTS_VKD3D_PROTON: vkd3d-proton + .container-builds-android: extends: - .container-builds-angle @@ -115,6 +120,7 @@ .container-builds-vk: extends: - .container-builds-piglit + - .container-builds-vkd3d-proton # Export the container rootfs and upload it to S3 .export-container: diff --git a/.gitlab-ci/image-tags.yml b/.gitlab-ci/image-tags.yml index a31ed1dbed4..0867512320d 100644 --- a/.gitlab-ci/image-tags.yml +++ b/.gitlab-ci/image-tags.yml @@ -26,7 +26,7 @@ variables: DEBIAN_TEST_ANDROID_TAG: "20250603-curl-O-2" DEBIAN_TEST_GL_TAG: "20250603-vkcts-main" DEBIAN_TEST_VIDEO_TAG: "20250609-helper" - DEBIAN_TEST_VK_TAG: "20250603-vkcts-main" + DEBIAN_TEST_VK_TAG: "20250609-vkd3d" ALPINE_X86_64_BUILD_TAG: "20250423-rootfs" ALPINE_X86_64_LAVA_SSH_TAG: "20250423-rootfs" diff --git a/.gitlab-ci/test/gitlab-ci.yml b/.gitlab-ci/test/gitlab-ci.yml index bb58871cb50..b3dbb32be34 100644 --- a/.gitlab-ci/test/gitlab-ci.yml +++ b/.gitlab-ci/test/gitlab-ci.yml @@ -203,6 +203,7 @@ yaml-toml-shell-py-test: .test-vkd3d-proton: variables: + VKD3D_PROTON_TAG: ${CONDITIONAL_BUILD_VKD3D_PROTON_TAG} HWCI_TEST_SCRIPT: install/vkd3d-runner.sh .piglit-traces-test: diff --git a/.gitlab-ci/vkd3d-runner.sh b/.gitlab-ci/vkd3d-runner.sh index d3dcdc8df25..4b53c5b08de 100755 --- a/.gitlab-ci/vkd3d-runner.sh +++ b/.gitlab-ci/vkd3d-runner.sh @@ -15,6 +15,14 @@ if [[ -z "$VK_DRIVER" ]]; then exit 1 fi +if [ -z "$VKD3D_PROTON_TAG" ]; then + echo "VKD3D_PROTON_TAG must be set to the conditional build tag" + exit 1 +fi + +# Are we using the right vkd3d-proton version? +ci_tag_test_time_check "VKD3D_PROTON_TAG" + INSTALL=$(realpath -s "$PWD"/install) # Set up the driver environment.