Files
mesa/.gitlab-ci/container/build-fluster.sh
Valentine Burley f6f7f9e7a2 ci/fluster: Use the structured tag as the Fluster vector version
The strucutered tag replaces the need to have a separate
FLUSTER_VECTORS_VERSION variable just to check if the vectors changed.

Signed-off-by: Valentine Burley <valentine.burley@collabora.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/34787>
2025-05-03 15:39:51 +02:00

69 lines
2.2 KiB
Bash

#!/usr/bin/env bash
# shellcheck disable=SC1091 # The relative paths in this file only become valid at runtime.
# shellcheck disable=SC2034 # Variables are used in scripts called from here
# shellcheck disable=SC2086 # we want word splitting
# When changing this file, you need to bump the following
# .gitlab-ci/image-tags.yml tags:
# DEBIAN_TEST_VIDEO_TAG
# Install fluster in /fluster.
# 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 "FLUSTER_TAG"
set -uex
section_start fluster "Installing fluster"
FLUSTER_REVISION="e997402978f62428fffc8e5a4a709690d9ca9bc5"
git clone https://github.com/fluendo/fluster.git --single-branch --no-checkout
export SKIP_UPDATE_FLUSTER_VECTORS=false
check_fluster()
{
S3_PATH_FLUSTER="${S3_HOST}/${S3_KERNEL_BUCKET}/$1/${DATA_STORAGE_PATH}/fluster/${FLUSTER_TAG}/vectors.tar.zst"
if curl -L --retry 4 -f --retry-connrefused --retry-delay 30 -s --head \
"https://${S3_PATH_FLUSTER}"; then
echo "Fluster vectors are up-to-date, skip rebuilding them."
export SKIP_UPDATE_FLUSTER_VECTORS=true
fi
}
check_fluster "${FDO_UPSTREAM_REPO}"
if ! $SKIP_UPDATE_FLUSTER_VECTORS; then
check_fluster "${CI_PROJECT_PATH}"
fi
pushd fluster || exit
git checkout "${FLUSTER_REVISION}"
popd || exit
if ! $SKIP_UPDATE_FLUSTER_VECTORS; then
# Download the necessary vectors: H264, H265 and VP9
# When updating FLUSTER_REVISION, make sure to update the vectors if necessary or
# fluster-runner will report Missing results.
fluster/fluster.py download -j ${FDO_CI_CONCURRENT:-4} \
JVT-AVC_V1 JVT-FR-EXT JVT-MVC JVT-SVC_V1 \
JCT-VC-3D-HEVC JCT-VC-HEVC_V1 JCT-VC-MV-HEVC JCT-VC-RExt JCT-VC-SCC JCT-VC-SHVC \
VP9-TEST-VECTORS-HIGH VP9-TEST-VECTORS
# Build fluster vectors archive and upload it
tar --zstd -cf "vectors.tar.zst" fluster/resources/
ci-fairy s3cp --token-file "${S3_JWT_FILE}" "vectors.tar.zst" \
"https://${S3_PATH_FLUSTER}/vectors.tar.zst"
fi
mv fluster/ /
if $SKIP_UPDATE_FLUSTER_VECTORS; then
curl -L --retry 4 -f --retry-connrefused --retry-delay 30 \
"${FDO_HTTP_CACHE_URI:-}https://${S3_PATH_FLUSTER}" | tar --zstd -x -C /
fi
section_end fluster