ci/lava: Remove vkd3d-proton from the core rootfs

Remove the /vkd3d-proton directories from the core LAVA rootfs archive
and upload vkd3d-proton as a separate archive for use as an optional LAVA
overlay.

This reduces the size of the core lava-rootfs tarball and ensures
vkd3d-proton is only deployed when the job needs it.

Signed-off-by: Valentine Burley <valentine.burley@collabora.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/35167>
This commit is contained in:
Valentine Burley 2025-05-27 11:24:05 +02:00 committed by Marge Bot
parent 2b7ddc7d71
commit 15b6967154
4 changed files with 35 additions and 1 deletions

View file

@ -3,4 +3,4 @@ variables:
CONDITIONAL_BUILD_CROSVM_TAG: bb7f75d912ef43be8c9204385d79820a
CONDITIONAL_BUILD_FLUSTER_TAG: 3bc3afd7468e106afcbfd569a85f34f9
CONDITIONAL_BUILD_PIGLIT_TAG: 009be6e9949c1121f67c8a3985b08505
CONDITIONAL_BUILD_VKD3D_PROTON_TAG: 5b73ce9ca2be32a54b88af1949e31ace
CONDITIONAL_BUILD_VKD3D_PROTON_TAG: dea4be3035832821bfb4bb24ec9c4308

View file

@ -16,6 +16,13 @@ VKD3D_PROTON_COMMIT="041cfa75580090c6b30af2f2721015d15493f14b"
VKD3D_PROTON_DST_DIR="/vkd3d-proton-tests"
VKD3D_PROTON_SRC_DIR="/vkd3d-proton-src"
VKD3D_PROTON_BUILD_DIR="/vkd3d-proton-build"
VKD3D_PROTON_WINE_DIR="/vkd3d-proton-wine64"
VKD3D_PROTON_S3_ARTIFACT="vkd3d-proton.tar.zst"
if [ ! -d "$VKD3D_PROTON_WINE_DIR" ]; then
echo "Fatal: Directory '$VKD3D_PROTON_WINE_DIR' does not exist. Aborting."
exit 1
fi
git clone https://github.com/HansKristian-Work/vkd3d-proton.git --single-branch -b master --no-checkout "$VKD3D_PROTON_SRC_DIR"
pushd "$VKD3D_PROTON_SRC_DIR"
@ -42,7 +49,19 @@ cp \
"$VKD3D_PROTON_DST_DIR/tests/"
popd
# Archive and upload vkd3d-proton for use as a LAVA overlay, if the archive doesn't exist yet
ARTIFACT_PATH="${DATA_STORAGE_PATH}/vkd3d-proton/${VKD3D_PROTON_TAG}/${CI_JOB_NAME}/${VKD3D_PROTON_S3_ARTIFACT}"
if FOUND_ARTIFACT_URL="$(find_s3_project_artifact "${ARTIFACT_PATH}")"; then
echo "Found vkd3d-proton at: ${FOUND_ARTIFACT_URL}, skipping upload"
else
echo "Uploaded vkd3d-proton not found, reuploading..."
tar --zstd -cf "$VKD3D_PROTON_S3_ARTIFACT" -C / "${VKD3D_PROTON_DST_DIR#/}" "${VKD3D_PROTON_WINE_DIR#/}"
ci-fairy s3cp --token-file "${S3_JWT_FILE}" "$VKD3D_PROTON_S3_ARTIFACT" \
"https://${S3_BASE_PATH}/${CI_PROJECT_PATH}/${ARTIFACT_PATH}"
fi
rm -rf "$VKD3D_PROTON_BUILD_DIR"
rm -rf "$VKD3D_PROTON_SRC_DIR"
rm "$VKD3D_PROTON_S3_ARTIFACT"
section_end vkd3d-proton

View file

@ -44,6 +44,11 @@ buildah_export() {
exit 1
fi
# These components will be provided via LAVA overlays,
# so remove them from the core rootfs
rm -rf "${mountpoint}/vkd3d-proton-tests"
rm -rf "${mountpoint}/vkd3d-proton-wine64"
# Compress to zstd
ZSTD_CLEVEL=10 tar -C "$mountpoint" -I zstd -cf "$2" .
}

View file

@ -69,6 +69,16 @@ if [ -n "${HWCI_KERNEL_MODULES:-}" ]; then
--format=tar
)
fi
if [ -n "${VKD3D_PROTON_TAG:-}" ]; then
LAVA_EXTRA_OVERLAYS+=(
- append-overlay
--name=vkd3d-proton
--url="$(find_s3_project_artifact "${DATA_STORAGE_PATH}/vkd3d-proton/${VKD3D_PROTON_TAG}/${MESA_IMAGE_PATH}/vkd3d-proton.tar.zst")"
--path="/"
--format=tar
--compression=zstd
)
fi
PYTHONPATH=/ /lava/lava_job_submitter.py \
--farm "${FARM}" \