Mesa (staging/20.0): gitlab-ci: Serve files for LAVA via separate service
GitLab Mirror
gitlab-mirror at kemper.freedesktop.org
Mon Apr 13 22:06:48 UTC 2020
Module: Mesa
Branch: staging/20.0
Commit: 5cbe73152de30a95d40bf098644996e79996f59d
URL: http://cgit.freedesktop.org/mesa/mesa/commit/?id=5cbe73152de30a95d40bf098644996e79996f59d
Author: Tomeu Vizoso <tomeu.vizoso at collabora.com>
Date: Tue Mar 24 12:58:43 2020 +0100
gitlab-ci: Serve files for LAVA via separate service
Currently, we store the kernel and ramdisk for each LAVA job in the
artifacts of the job that built them. Because artifacts are stored in
GCE and LAVA labs aren't, this causes a lot of egress with is expensive.
To avoid this, have runners download most of the data via the (cached)
container images once, and for each job upload the kernel and ramdisk to
a server outside GCE.
Right now we only have Collabora's runner with a local web server, so
jobs that go to Baylibre's lab have been disabled.
Signed-off-by: Tomeu Vizoso <tomeu.vizoso at collabora.com>
Reviewed-by: Eric Anholt <eric at anholt.net>
(cherry picked from commit b1238498805bf600292f4663fc996e0396436435)
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/4462>
---
.gitlab-ci.yml | 2 +-
.gitlab-ci/lava-gitlab-ci.yml | 24 ++++++++++++++++++------
.gitlab-ci/prepare-artifacts.sh | 15 ---------------
3 files changed, 19 insertions(+), 22 deletions(-)
diff --git a/.gitlab-ci.yml b/.gitlab-ci.yml
index a05eb059d4b..f1fc685717f 100644
--- a/.gitlab-ci.yml
+++ b/.gitlab-ci.yml
@@ -166,7 +166,7 @@ arm_build:
- .debian at container-ifnot-exists@arm64v8
- .container
variables:
- DEBIAN_TAG: &arm_build "2020-01-14"
+ DEBIAN_TAG: &arm_build "2020-04-06"
.use-arm_build:
variables:
diff --git a/.gitlab-ci/lava-gitlab-ci.yml b/.gitlab-ci/lava-gitlab-ci.yml
index fb820c859c3..f7a904030c3 100644
--- a/.gitlab-ci/lava-gitlab-ci.yml
+++ b/.gitlab-ci/lava-gitlab-ci.yml
@@ -5,13 +5,20 @@
variables:
GIT_STRATEGY: none # testing doesn't build anything from source
ENV_VARS: "MESA_GLES_VERSION_OVERRIDE=3.0 DEQP_PARALLEL=6"
+ FILES_HOST_NAME: "mesa-ci-lava-files.freedesktop.org"
script:
- - BUILD_JOB_ID=`cat artifacts/build_job_id.txt`
+ - mkdir -p /srv/${FILES_HOST_NAME}/$CI_JOB_ID/
+ - cp /lava-files/${KERNEL_IMAGE_NAME} /srv/${FILES_HOST_NAME}/$CI_JOB_ID/.
+ - cp /lava-files/${DEVICE_TYPE}.dtb /srv/${FILES_HOST_NAME}/$CI_JOB_ID/.
+ - tar -C /lava-files/rootfs-${ARCH} -xf artifacts/install.tar
+ - pushd /lava-files/rootfs-${ARCH}
+ - find -H | cpio -H newc -o | gzip -c - > /srv/${FILES_HOST_NAME}/$CI_JOB_ID/lava-rootfs-${ARCH}.cpio.gz
+ - popd
- >
artifacts/generate_lava.py \
--template artifacts/lava-deqp.yml.jinja2 \
--pipeline-info "$CI_PIPELINE_URL on $CI_COMMIT_REF_NAME ${CI_NODE_INDEX}/${CI_NODE_TOTAL}" \
- --base-artifacts-url $CI_PROJECT_URL/-/jobs/$BUILD_JOB_ID/artifacts/raw/artifacts \
+ --base-artifacts-url https://${FILES_HOST_NAME}/$CI_JOB_ID \
--device-type ${DEVICE_TYPE} \
--env-vars "${ENV_VARS}" \
--arch ${ARCH} \
@@ -23,7 +30,7 @@
--lava-tags "${LAVA_TAGS}" \
--ci-node-index "${CI_NODE_INDEX}" \
--ci-node-total "${CI_NODE_TOTAL}"
- - lava_job_id=`lavacli jobs submit lava-deqp.yml`
+ - lava_job_id=`lavacli jobs submit lava-deqp.yml` || lavacli jobs submit lava-deqp.yml
- echo $lava_job_id
- rm -rf artifacts/*
- cp lava-deqp.yml artifacts/.
@@ -32,6 +39,8 @@
- result=`lavacli results $lava_job_id 0_deqp deqp | head -1`
- echo $result
- '[[ "$result" == "pass" ]]'
+ after_script:
+ - rm -rf /srv/${FILES_HOST_NAME}/$CI_JOB_ID/
artifacts:
when: always
paths:
@@ -71,7 +80,7 @@ panfrost-t720-test:arm64:
DEVICE_TYPE: sun50i-h6-pine-h64
GPU_VERSION: panfrost-t720
tags:
- - lava-sun50i-h6-pine-h64
+ - mesa-ci-aarch64-lava-collabora
panfrost-t760-test:armhf:
extends: .lava-test:armhf
@@ -81,7 +90,7 @@ panfrost-t760-test:armhf:
BOOT_METHOD: depthcharge
KERNEL_IMAGE_TYPE: ""
tags:
- - lava-rk3288-veyron-jaq
+ - mesa-ci-aarch64-lava-collabora
panfrost-t860-test:arm64:
extends: .lava-test:arm64
@@ -91,7 +100,7 @@ panfrost-t860-test:arm64:
BOOT_METHOD: depthcharge
KERNEL_IMAGE_TYPE: ""
tags:
- - lava-rk3399-gru-kevin
+ - mesa-ci-aarch64-lava-collabora
panfrost-t820-test:arm64:
extends: .lava-test:arm64
@@ -99,6 +108,7 @@ panfrost-t820-test:arm64:
DEVICE_TYPE: meson-gxm-khadas-vim2
GPU_VERSION: panfrost-t820
LAVA_TAGS: panfrost
+ FILES_HOST_NAME: "lava-files.baylibre.com"
tags:
- lava-meson-gxm-khadas-vim2
@@ -109,6 +119,7 @@ panfrost-t820-test:arm64:
DEVICE_TYPE: sun8i-h3-libretech-all-h3-cc
GPU_VERSION: lima
ENV_VARS: "DEQP_PARALLEL=3"
+ FILES_HOST_NAME: "lava-files.baylibre.com"
tags:
- lava-sun8i-h3-libretech-all-h3-cc
@@ -118,5 +129,6 @@ lima-mali450-test:arm64:
DEVICE_TYPE: meson-gxl-s905x-libretech-cc
GPU_VERSION: lima
ENV_VARS: "DEQP_PARALLEL=6"
+ FILES_HOST_NAME: "lava-files.baylibre.com"
tags:
- lava-meson-gxl-s905x-libretech-cc
diff --git a/.gitlab-ci/prepare-artifacts.sh b/.gitlab-ci/prepare-artifacts.sh
index 3283eb75eec..4939f086c3e 100755
--- a/.gitlab-ci/prepare-artifacts.sh
+++ b/.gitlab-ci/prepare-artifacts.sh
@@ -33,21 +33,6 @@ tar -cf artifacts/install.tar install
# If the container has LAVA stuff, prepare the artifacts for LAVA jobs
if [ -d /lava-files ]; then
- # Copy kernel and device trees for LAVA
- cp /lava-files/*Image artifacts/.
- cp /lava-files/*.dtb artifacts/.
-
- # Pack ramdisk for LAVA
- mkdir -p /lava-files/rootfs-${CROSS:-arm64}/install
- cp -a install/* /lava-files/rootfs-${CROSS:-arm64}/install/.
-
- pushd /lava-files/rootfs-${CROSS:-arm64}/
- find -H | cpio -H newc -o | gzip -c - > $CI_PROJECT_DIR/artifacts/lava-rootfs-${CROSS:-arm64}.cpio.gz
- popd
-
- # Store job ID so the test stage can build URLs to the artifacts
- echo $CI_JOB_ID > artifacts/build_job_id.txt
-
# Pass needed files to the test stage
cp $CI_PROJECT_DIR/.gitlab-ci/generate_lava.py artifacts/.
cp $CI_PROJECT_DIR/.gitlab-ci/lava-deqp.yml.jinja2 artifacts/.
More information about the mesa-commit
mailing list