From 6652c5018c6fd04e6215c82443f5fa1a4484e266 Mon Sep 17 00:00:00 2001 From: Michel Dänzer Date: Tue, 30 Mar 2021 12:54:15 +0200 Subject: ci: Merge ARM testing docker images to a single arm_test one The merged image contains kernels & rootfs for both arm64 & armhf baremetal test jobs, and is smaller than either arm{64,hf}_test image before. Reviewed-by: Eric Anholt Part-of: --- .gitlab-ci/container/arm64_test.sh | 5 ----- .gitlab-ci/container/arm_test-base.sh | 29 ----------------------------- .gitlab-ci/container/arm_test.sh | 32 ++++++++++++++++++++++++++++++++ .gitlab-ci/container/armhf_test.sh | 5 ----- .gitlab-ci/container/baremetal_build.sh | 10 +++++----- .gitlab-ci/lava-gitlab-ci.yml | 2 +- 6 files changed, 38 insertions(+), 45 deletions(-) delete mode 100644 .gitlab-ci/container/arm64_test.sh delete mode 100644 .gitlab-ci/container/arm_test-base.sh create mode 100644 .gitlab-ci/container/arm_test.sh delete mode 100644 .gitlab-ci/container/armhf_test.sh (limited to '.gitlab-ci') diff --git a/.gitlab-ci/container/arm64_test.sh b/.gitlab-ci/container/arm64_test.sh deleted file mode 100644 index 98e3b4ab0b0..00000000000 --- a/.gitlab-ci/container/arm64_test.sh +++ /dev/null @@ -1,5 +0,0 @@ -#!/bin/bash - -arch=arm64 - -. .gitlab-ci/container/baremetal_build.sh diff --git a/.gitlab-ci/container/arm_test-base.sh b/.gitlab-ci/container/arm_test-base.sh deleted file mode 100644 index ef26837cb3e..00000000000 --- a/.gitlab-ci/container/arm_test-base.sh +++ /dev/null @@ -1,29 +0,0 @@ -#!/bin/bash - -set -e -set -o xtrace - -############### Install packages for baremetal testing -apt-get install -y ca-certificates -sed -i -e 's/http:\/\/deb/https:\/\/deb/g' /etc/apt/sources.list -apt-get update - -apt-get install -y --no-remove \ - abootimg \ - cpio \ - fastboot \ - netcat \ - nginx-full \ - procps \ - python3-distutils \ - python3-minimal \ - python3-serial \ - python3.7 \ - rsync \ - telnet \ - unzip \ - wget - -# setup nginx -sed -i '/gzip_/ s/#\ //g' /etc/nginx/nginx.conf -cp .gitlab-ci/bare-metal/nginx-default-site /etc/nginx/sites-enabled/default diff --git a/.gitlab-ci/container/arm_test.sh b/.gitlab-ci/container/arm_test.sh new file mode 100644 index 00000000000..95b013f2560 --- /dev/null +++ b/.gitlab-ci/container/arm_test.sh @@ -0,0 +1,32 @@ +#!/bin/bash + +set -e +set -o xtrace + +############### Install packages for baremetal testing +apt-get install -y ca-certificates +sed -i -e 's/http:\/\/deb/https:\/\/deb/g' /etc/apt/sources.list +apt-get update + +apt-get install -y --no-remove \ + abootimg \ + cpio \ + fastboot \ + netcat \ + nginx-full \ + procps \ + python3-distutils \ + python3-minimal \ + python3-serial \ + python3.7 \ + rsync \ + telnet \ + unzip \ + wget + +# setup nginx +sed -i '/gzip_/ s/#\ //g' /etc/nginx/nginx.conf +cp .gitlab-ci/bare-metal/nginx-default-site /etc/nginx/sites-enabled/default + +arch=arm64 . .gitlab-ci/container/baremetal_build.sh +arch=armhf . .gitlab-ci/container/baremetal_build.sh diff --git a/.gitlab-ci/container/armhf_test.sh b/.gitlab-ci/container/armhf_test.sh deleted file mode 100644 index da0cf9e2eb7..00000000000 --- a/.gitlab-ci/container/armhf_test.sh +++ /dev/null @@ -1,5 +0,0 @@ -#!/bin/bash - -arch=armhf - -. .gitlab-ci/container/baremetal_build.sh diff --git a/.gitlab-ci/container/baremetal_build.sh b/.gitlab-ci/container/baremetal_build.sh index aaf4c1fb2a5..4f22a408bcb 100644 --- a/.gitlab-ci/container/baremetal_build.sh +++ b/.gitlab-ci/container/baremetal_build.sh @@ -6,15 +6,15 @@ set -o xtrace # Fetch the arm-built rootfs image and unpack it in our x86 container (saves # network transfer, disk usage, and runtime on test jobs) -if wget -q --method=HEAD "${ARTIFACTS_PREFIX}/${FDO_UPSTREAM_REPO}/${ARTIFACTS_SUFFIX}/done"; then - ARTIFACTS_URL="${ARTIFACTS_PREFIX}/${FDO_UPSTREAM_REPO}/${ARTIFACTS_SUFFIX}" +if wget -q --method=HEAD "${ARTIFACTS_PREFIX}/${FDO_UPSTREAM_REPO}/${ARTIFACTS_SUFFIX}/${arch}/done"; then + ARTIFACTS_URL="${ARTIFACTS_PREFIX}/${FDO_UPSTREAM_REPO}/${ARTIFACTS_SUFFIX}/${arch}" else - ARTIFACTS_URL="${ARTIFACTS_PREFIX}/${CI_PROJECT_PATH}/${ARTIFACTS_SUFFIX}" + ARTIFACTS_URL="${ARTIFACTS_PREFIX}/${CI_PROJECT_PATH}/${ARTIFACTS_SUFFIX}/${arch}" fi wget ${ARTIFACTS_URL}/lava-rootfs.tgz -O rootfs.tgz -mkdir -p /rootfs -tar -C /rootfs -zxvf rootfs.tgz +mkdir -p /rootfs-$arch +tar -C /rootfs-$arch -zxf rootfs.tgz rm rootfs.tgz if [[ $arch == "arm64" ]]; then diff --git a/.gitlab-ci/lava-gitlab-ci.yml b/.gitlab-ci/lava-gitlab-ci.yml index 0389cc026a6..af5f28acdc1 100644 --- a/.gitlab-ci/lava-gitlab-ci.yml +++ b/.gitlab-ci/lava-gitlab-ci.yml @@ -4,6 +4,7 @@ stage: container-2 variables: GIT_STRATEGY: fetch + DISTRIBUTION_TAG: &distribution-tag-arm "${MESA_ROOTFS_TAG}--${MESA_IMAGE_TAG}--${MESA_TEMPLATES_COMMIT}" script: - .gitlab-ci/container/lava_build.sh @@ -12,7 +13,6 @@ - .kernel+rootfs variables: KERNEL_URL: "https://gitlab.freedesktop.org/tomeu/linux/-/archive/v5.10-rc2-for-mesa-ci/linux-v5.10-rc2-for-mesa-ci.tar.gz" - DISTRIBUTION_TAG: &distribution-tag-arm "${MESA_ROOTFS_TAG}--${MESA_IMAGE_TAG}--${MESA_TEMPLATES_COMMIT}" INSTALL_KERNEL_MODULES: 1 MESA_ROOTFS_TAG: &lava-rootfs "2021-03-31-libxrender" MINIO_SUFFIX: "lava" -- cgit v1.2.3