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.yml | 77 +++++++++------------------------ .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 +- src/broadcom/ci/gitlab-ci.yml | 18 ++++---- src/freedreno/ci/gitlab-ci.yml | 6 +-- 9 files changed, 71 insertions(+), 113 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 diff --git a/.gitlab-ci.yml b/.gitlab-ci.yml index 3cc3ddd19a6..06f00b575e5 100644 --- a/.gitlab-ci.yml +++ b/.gitlab-ci.yml @@ -438,24 +438,6 @@ arm_build: needs: - arm_build -# Debian 10 based x86 baremetal image base -arm_test-base: - extends: - - .fdo.container-build@debian - - .container - variables: - MESA_IMAGE_TAG: &arm_test-base "2021-03-31-rootfs" - -.use-arm_test-base: - extends: - - .fdo.container-build@debian - - .use-base-image - variables: - MESA_BASE_IMAGE: "debian/arm_test-base" - MESA_BASE_TAG: *arm_test-base - needs: - - arm_test-base - # Kernel & rootfs for ARM64 baremetal testing kernel+rootfs_arm64-baremetal: extends: @@ -465,9 +447,8 @@ kernel+rootfs_arm64-baremetal: - aarch64 variables: DEBIAN_ARCH: "arm64" - DISTRIBUTION_TAG: "${MESA_ROOTFS_TAG}--${MESA_BASE_TAG}--${MESA_TEMPLATES_COMMIT}" KERNEL_URL: "https://github.com/anholt/linux/archive/mesa-ci-2021-02-17-5.11.tar.gz" - MESA_ROOTFS_TAG: &arm64-baremetal "2021-03-31-libxrender" + MESA_ROOTFS_TAG: &arm-baremetal "2021-03-31-libxrender" MINIO_SUFFIX: "baremetal" # Kernel & rootfs for armhf baremetal testing @@ -476,51 +457,35 @@ kernel+rootfs_armhf-baremetal: - kernel+rootfs_arm64-baremetal variables: DEBIAN_ARCH: "armhf" - MESA_ROOTFS_TAG: &armhf-baremetal "2021-03-31-libxrender" + MESA_ROOTFS_TAG: *arm-baremetal -# x86 image with ARM64 rootfs for baremetal testing. -arm64_test: +# x86 image with ARM64 & armhf kernel & rootfs for baremetal testing +arm_test: extends: - - .use-arm_test-base + - .fdo.container-build@debian + - .container + # Don't want the .container rules + - .ci-run-policy stage: build-misc needs: - kernel+rootfs_arm64-baremetal + - kernel+rootfs_armhf-baremetal variables: - DEBIAN_ARCH: "arm64" - FDO_DISTRIBUTION_EXEC: 'env ARTIFACTS_PREFIX=https://${MINIO_HOST}/mesa-lava ARTIFACTS_SUFFIX=baremetal/${MESA_ROOTFS_TAG}--${MESA_ARM_BUILD_TAG}--${MESA_TEMPLATES_COMMIT}/${DEBIAN_ARCH} CI_PROJECT_PATH=${CI_PROJECT_PATH} FDO_CI_CONCURRENT=${FDO_CI_CONCURRENT} FDO_UPSTREAM_REPO=${FDO_UPSTREAM_REPO} bash .gitlab-ci/container/${CI_JOB_NAME}.sh' - FDO_DISTRIBUTION_TAG: "${MESA_IMAGE_TAG}--${MESA_ROOTFS_TAG}--${MESA_BASE_TAG}--${MESA_TEMPLATES_COMMIT}" + FDO_DISTRIBUTION_EXEC: 'env ARTIFACTS_PREFIX=https://${MINIO_HOST}/mesa-lava ARTIFACTS_SUFFIX=baremetal/${MESA_ROOTFS_TAG}--${MESA_ARM_BUILD_TAG}--${MESA_TEMPLATES_COMMIT} CI_PROJECT_PATH=${CI_PROJECT_PATH} FDO_CI_CONCURRENT=${FDO_CI_CONCURRENT} FDO_UPSTREAM_REPO=${FDO_UPSTREAM_REPO} bash .gitlab-ci/container/${CI_JOB_NAME}.sh' + FDO_DISTRIBUTION_TAG: "${MESA_IMAGE_TAG}--${MESA_ROOTFS_TAG}--${MESA_ARM_BUILD_TAG}--${MESA_TEMPLATES_COMMIT}" MESA_ARM_BUILD_TAG: *arm_build - MESA_IMAGE_TAG: &arm64_test "2021-03-31-rootfs" - MESA_ROOTFS_TAG: *arm64-baremetal - -.use-arm64_test: - image: "$CI_REGISTRY_IMAGE/${MESA_IMAGE_PATH}:${MESA_IMAGE_TAG}--${MESA_ROOTFS_TAG}--${MESA_BASE_TAG}--${MESA_TEMPLATES_COMMIT}" - variables: - MESA_BASE_TAG: *arm_test-base - MESA_IMAGE_PATH: "debian/arm64_test" - MESA_IMAGE_TAG: *arm64_test - MESA_ROOTFS_TAG: *arm64-baremetal - needs: - - arm64_test + MESA_IMAGE_TAG: &arm_test "2021-03-31-unified" + MESA_ROOTFS_TAG: *arm-baremetal -# x86 image with armhf rootfs for baremetal testing -armhf_test: - extends: - - arm64_test - variables: - DEBIAN_ARCH: "armhf" - MESA_IMAGE_TAG: &armhf_test "2021-03-31-rootfs" - MESA_ROOTFS_TAG: *armhf-baremetal - -.use-armhf_test: - extends: - - .use-arm64_test +.use-arm_test: + image: "$CI_REGISTRY_IMAGE/${MESA_IMAGE_PATH}:${MESA_IMAGE_TAG}--${MESA_ROOTFS_TAG}--${MESA_ARM_BUILD_TAG}--${MESA_TEMPLATES_COMMIT}" variables: - MESA_IMAGE_PATH: "debian/armhf_test" - MESA_IMAGE_TAG: *armhf_test - MESA_ROOTFS_TAG: *armhf-baremetal + MESA_ARM_BUILD_TAG: *arm_build + MESA_IMAGE_PATH: "debian/arm_test" + MESA_IMAGE_TAG: *arm_test + MESA_ROOTFS_TAG: *arm-baremetal needs: - - armhf_test + - arm_test # Native Windows docker builds # @@ -1213,7 +1178,7 @@ meson-mingw32-x86_64: TEST_LD_PRELOAD: libasan.so.5 MINIO_ARTIFACT_NAME: mesa-arm64-asan needs: - - arm64_test + - arm_test - job: meson-arm64-asan artifacts: false 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" diff --git a/src/broadcom/ci/gitlab-ci.yml b/src/broadcom/ci/gitlab-ci.yml index 7f4f905883c..c3d28777b83 100644 --- a/src/broadcom/ci/gitlab-ci.yml +++ b/src/broadcom/ci/gitlab-ci.yml @@ -2,17 +2,17 @@ extends: - .baremetal-test-armhf - .vc4-rules - - .use-armhf_test + - .use-arm_test variables: BM_BOOTFS: /boot/raspberrypi_armhf BM_KERNEL_MODULES: vc4 - BM_ROOTFS: /rootfs + BM_ROOTFS: /rootfs-armhf GPU_VERSION: vc4-rpi3 DEQP_EXPECTED_RENDERER: VC4 script: - ./install/bare-metal/poe-powered.sh needs: - - job: armhf_test + - job: arm_test artifacts: false - meson-armhf tags: @@ -60,19 +60,19 @@ vc4-rpi3-piglit-quick_shader:armhf: extends: - .baremetal-test-armhf - .v3d-rules - - .use-armhf_test + - .use-arm_test variables: BARE_METAL_TEST_SCRIPT: "/install/deqp-runner.sh" BM_BOOTFS: /boot/raspberrypi_armhf BM_KERNEL_MODULES: v3d,vc4 BM_POE_TIMEOUT: 300 - BM_ROOTFS: /rootfs + BM_ROOTFS: /rootfs-armhf DEQP_EXPECTED_RENDERER: V3D GPU_VERSION: v3d-rpi4 script: - ./install/bare-metal/poe-powered.sh needs: - - armhf_test + - arm_test - meson-armhf tags: - igalia-rpi4 @@ -123,7 +123,7 @@ v3d-rpi4-piglit-quick_shader:armhf: v3dv-rpi4-vk:armhf: extends: - .baremetal-test-armhf - - .use-armhf_test + - .use-arm_test - .v3dv-rules parallel: 6 variables: @@ -131,7 +131,7 @@ v3dv-rpi4-vk:armhf: BM_BOOTFS: /boot/raspberrypi_armhf BM_KERNEL_MODULES: v3d,vc4 BM_POE_TIMEOUT: 300 - BM_ROOTFS: /rootfs + BM_ROOTFS: /rootfs-armhf CPU: arm7hlf DEQP_EXPECTED_RENDERER: "V3D 4.2" DEQP_FRACTION: 7 @@ -142,7 +142,7 @@ v3dv-rpi4-vk:armhf: script: - ./install/bare-metal/poe-powered.sh needs: - - armhf_test + - arm_test - meson-armhf tags: - igalia-rpi4 diff --git a/src/freedreno/ci/gitlab-ci.yml b/src/freedreno/ci/gitlab-ci.yml index f6315a06d99..dee2938155c 100644 --- a/src/freedreno/ci/gitlab-ci.yml +++ b/src/freedreno/ci/gitlab-ci.yml @@ -1,18 +1,18 @@ .freedreno-test: extends: - .baremetal-test - - .use-arm64_test + - .use-arm_test - .freedreno-rules variables: MINIO_ARTIFACT_NAME: mesa-arm64 - BM_ROOTFS: /rootfs + BM_ROOTFS: /rootfs-arm64 FLAKES_CHANNEL: "#freedreno-ci" PIGLIT_PLATFORM: mixed_glx_egl BM_CMDLINE: "ip=dhcp console=ttyMSM0,115200n8 root=/dev/nfs rw nfsrootdebug nfsroot=,tcp,nfsvers=4.2 init=/init $BM_KERNELARGS" script: - ./install/bare-metal/fastboot.sh needs: - - arm64_test + - arm_test - job: meson-arm64 artifacts: false tags: -- cgit v1.2.3