gitlab-ci: Don't rebuild kernels and rootfs if they have been already built in mainline
Use the ones from mainline if possible to save cycles rebuilding the same files. Signed-off-by: Tomeu Vizoso <tomeu.vizoso@collabora.com> Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/5822>
This commit is contained in:
@@ -3,12 +3,17 @@
|
|||||||
set -e
|
set -e
|
||||||
set -o xtrace
|
set -o xtrace
|
||||||
|
|
||||||
|
check_minio()
|
||||||
|
{
|
||||||
|
MINIO_PATH="minio-packet.freedesktop.org/mesa-lava/$1/${DISTRIBUTION_TAG}/${DEBIAN_ARCH}"
|
||||||
|
if wget -q --method=HEAD "https://${MINIO_PATH}/done"; then
|
||||||
|
exit
|
||||||
|
fi
|
||||||
|
}
|
||||||
|
|
||||||
# If remote files are up-to-date, skip rebuilding them
|
# If remote files are up-to-date, skip rebuilding them
|
||||||
MINIO_PATH=minio-packet.freedesktop.org/mesa-lava/${CI_PROJECT_PATH}/${DISTRIBUTION_TAG}/${DEBIAN_ARCH}
|
check_minio "mesa/mesa"
|
||||||
DONE_FILE=https://${MINIO_PATH}/done
|
check_minio "${CI_PROJECT_PATH}"
|
||||||
if wget -q --method=HEAD ${DONE_FILE}; then
|
|
||||||
exit
|
|
||||||
fi
|
|
||||||
|
|
||||||
. .gitlab-ci/container/container_pre_build.sh
|
. .gitlab-ci/container/container_pre_build.sh
|
||||||
|
|
||||||
|
@@ -32,9 +32,16 @@ kernel+rootfs_armhf:
|
|||||||
GIT_STRATEGY: none # testing doesn't build anything from source
|
GIT_STRATEGY: none # testing doesn't build anything from source
|
||||||
ENV_VARS: "DEQP_PARALLEL=6"
|
ENV_VARS: "DEQP_PARALLEL=6"
|
||||||
DEQP_VERSION: gles2
|
DEQP_VERSION: gles2
|
||||||
ARTIFACTS_URL: "https://minio-packet.freedesktop.org/mesa-lava/${CI_PROJECT_PATH}/${DISTRIBUTION_TAG}/${ARCH}"
|
ARTIFACTS_PREFIX: "https://minio-packet.freedesktop.org/mesa-lava/"
|
||||||
MESA_URL: "https://minio-packet.freedesktop.org/artifacts/${CI_PROJECT_PATH}/${CI_PIPELINE_ID}/mesa-${ARCH}.tar.gz"
|
MESA_URL: "https://minio-packet.freedesktop.org/artifacts/${CI_PROJECT_PATH}/${CI_PIPELINE_ID}/mesa-${ARCH}.tar.gz"
|
||||||
script:
|
script:
|
||||||
|
# Try to use the kernel and rootfs built in mainline first, to save cycles
|
||||||
|
- >
|
||||||
|
if wget -q --method=HEAD "${ARTIFACTS_PREFIX}/mesa/mesa/${DISTRIBUTION_TAG}/${ARCH}/done"; then
|
||||||
|
ARTIFACTS_URL="${ARTIFACTS_PREFIX}/mesa/mesa/${DISTRIBUTION_TAG}/${ARCH}"
|
||||||
|
else
|
||||||
|
ARTIFACTS_URL="${ARTIFACTS_PREFIX}/${CI_PROJECT_PATH}/${DISTRIBUTION_TAG}/${ARCH}"
|
||||||
|
fi
|
||||||
- >
|
- >
|
||||||
artifacts/generate_lava.py \
|
artifacts/generate_lava.py \
|
||||||
--template artifacts/lava-deqp.yml.jinja2 \
|
--template artifacts/lava-deqp.yml.jinja2 \
|
||||||
|
Reference in New Issue
Block a user