From b1238498805bf600292f4663fc996e0396436435 Mon Sep 17 00:00:00 2001 From: Tomeu Vizoso Date: Tue, 24 Mar 2020 12:58:43 +0100 Subject: [PATCH] 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 Reviewed-by: Eric Anholt Part-of: --- .gitlab-ci.yml | 2 +- .gitlab-ci/lava-gitlab-ci.yml | 30 +++++++++++++++++++++--------- .gitlab-ci/prepare-artifacts.sh | 15 --------------- 3 files changed, 22 insertions(+), 25 deletions(-) diff --git a/.gitlab-ci.yml b/.gitlab-ci.yml index dcbbb58784f..d1523875c29 100644 --- a/.gitlab-ci.yml +++ b/.gitlab-ci.yml @@ -162,7 +162,7 @@ arm_build: - .fdo.container-ifnot-exists@debian@arm64v8 - .container variables: - FDO_DISTRIBUTION_TAG: &arm_build "2020-03-17-db820c" + FDO_DISTRIBUTION_TAG: &arm_build "2020-03-24" .use-arm_build: variables: diff --git a/.gitlab-ci/lava-gitlab-ci.yml b/.gitlab-ci/lava-gitlab-ci.yml index 6b98980cecb..3984070091a 100644 --- a/.gitlab-ci/lava-gitlab-ci.yml +++ b/.gitlab-ci/lava-gitlab-ci.yml @@ -5,13 +5,20 @@ GIT_STRATEGY: none # testing doesn't build anything from source ENV_VARS: "DEQP_PARALLEL=6" DEQP_VERSION: gles2 + 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: name: "mesa_${CI_JOB_NAME}" when: always @@ -75,7 +84,7 @@ panfrost-t720-gles2:arm64: GPU_VERSION: panfrost-t720 ENV_VARS: "PAN_MESA_DEBUG=gles3 DEQP_PARALLEL=6" tags: - - lava-sun50i-h6-pine-h64 + - mesa-ci-aarch64-lava-collabora panfrost-t760-gles2:armhf: extends: @@ -88,7 +97,7 @@ panfrost-t760-gles2:armhf: KERNEL_IMAGE_TYPE: "" ENV_VARS: "PAN_MESA_DEBUG=gles3 DEQP_PARALLEL=6" tags: - - lava-rk3288-veyron-jaq + - mesa-ci-aarch64-lava-collabora panfrost-t860-gles2:arm64: extends: @@ -101,7 +110,7 @@ panfrost-t860-gles2:arm64: KERNEL_IMAGE_TYPE: "" ENV_VARS: "PAN_MESA_DEBUG=gles3 DEQP_PARALLEL=6" tags: - - lava-rk3399-gru-kevin + - mesa-ci-aarch64-lava-collabora panfrost-t860-gles3:arm64: extends: @@ -117,9 +126,9 @@ panfrost-t860-gles3:arm64: CI_NODE_INDEX: 1 CI_NODE_TOTAL: 5 tags: - - lava-rk3399-gru-kevin + - mesa-ci-aarch64-lava-collabora -panfrost-t820-gles2:arm64: +.panfrost-t820-gles2:arm64: extends: - .lava-test:arm64 - .panfrost-rules @@ -128,6 +137,7 @@ panfrost-t820-gles2:arm64: GPU_VERSION: panfrost-t820 LAVA_TAGS: panfrost ENV_VARS: "PAN_MESA_DEBUG=gles3 DEQP_PARALLEL=6" + FILES_HOST_NAME: "lava-files.baylibre.com" tags: - lava-meson-gxm-khadas-vim2 @@ -140,10 +150,11 @@ panfrost-t820-gles2: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 -lima-mali450-test:arm64: +.lima-mali450-test:arm64: extends: - .lava-test:arm64 - .lima-rules @@ -151,5 +162,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 65830d12773..86abacfdfd9 100755 --- a/.gitlab-ci/prepare-artifacts.sh +++ b/.gitlab-ci/prepare-artifacts.sh @@ -43,21 +43,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/. -- 2.30.2