Mesa (main): ci: Shrink container/rootfs sizes.

GitLab Mirror gitlab-mirror at kemper.freedesktop.org
Fri Jan 7 22:59:00 UTC 2022


Module: Mesa
Branch: main
Commit: a2dbdc645f04ddf7a0e464f10cad4ec0ba7218ae
URL:    http://cgit.freedesktop.org/mesa/mesa/commit/?id=a2dbdc645f04ddf7a0e464f10cad4ec0ba7218ae

Author: Emma Anholt <emma at anholt.net>
Date:   Fri Jan  7 09:44:43 2022 -0800

ci: Shrink container/rootfs sizes.

Cutting the extra VK mustpass files is 315MB out of 1.5GB of the amd64
rootfs.  pip was 10MB.  The rustup toolchains were massive (over a GB
IIRC) on the x86 container images.

Hopefully helps with #5837

Reviewed-by: Christian Gmeiner <christian.gmeiner at gmail.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/14460>

---

 .gitlab-ci.yml                             | 6 +++---
 .gitlab-ci/container/build-deqp.sh         | 4 ++++
 .gitlab-ci/container/create-rootfs.sh      | 2 ++
 .gitlab-ci/container/debian/x86_test-gl.sh | 1 +
 .gitlab-ci/container/lava_build.sh         | 1 +
 5 files changed, 11 insertions(+), 3 deletions(-)

diff --git a/.gitlab-ci.yml b/.gitlab-ci.yml
index c3ce16dd23a..a00162a606d 100644
--- a/.gitlab-ci.yml
+++ b/.gitlab-ci.yml
@@ -432,13 +432,13 @@ debian/x86_test-gl:
   variables:
     FDO_DISTRIBUTION_EXEC: 'env KERNEL_URL=${KERNEL_URL} FDO_CI_CONCURRENT=${FDO_CI_CONCURRENT} bash .gitlab-ci/container/${CI_JOB_NAME}.sh'
     KERNEL_URL: &kernel-rootfs-url "https://gitlab.freedesktop.org/gfx-ci/linux/-/archive/v5.15-for-mesa-ci-540a4af22d71/linux-v5.15-for-mesa-ci-540a4af22d71.tar.bz2"
-    MESA_IMAGE_TAG: &debian-x86_test-gl "2021-11-25-ci-fairy"
+    MESA_IMAGE_TAG: &debian-x86_test-gl "2022-01-07-shrink"
 
 # Debian 11 based x86 test image for VK
 debian/x86_test-vk:
   extends: .use-debian/x86_test-base
   variables:
-    MESA_IMAGE_TAG: &debian-x86_test-vk "2021-12-02-piglit"
+    MESA_IMAGE_TAG: &debian-x86_test-vk "2022-01-07-shrink"
 
 # Debian 11 based ARM build image
 debian/arm_build:
@@ -487,7 +487,7 @@ fedora/x86_build:
   variables:
     GIT_STRATEGY: fetch
     KERNEL_URL: *kernel-rootfs-url
-    MESA_ROOTFS_TAG: &kernel-rootfs "2021-12-22-skqp"
+    MESA_ROOTFS_TAG: &kernel-rootfs "2022-01-07-shrink"
     DISTRIBUTION_TAG: &distribution-tag-arm "${MESA_ROOTFS_TAG}--${MESA_ARTIFACTS_TAG}--${MESA_TEMPLATES_COMMIT}"
   script:
     - .gitlab-ci/container/lava_build.sh
diff --git a/.gitlab-ci/container/build-deqp.sh b/.gitlab-ci/container/build-deqp.sh
index 9010e644dc8..6c3c4f86edd 100644
--- a/.gitlab-ci/container/build-deqp.sh
+++ b/.gitlab-ci/container/build-deqp.sh
@@ -68,7 +68,11 @@ cp /deqp/executor/testlog-to-* /deqp/executor.save
 rm -rf /deqp/executor
 mv /deqp/executor.save /deqp/executor
 
+# Remove other mustpass files, since we saved off the ones we wanted to conventient locations above.
 rm -rf /deqp/external/openglcts/modules/gl_cts/data/mustpass
+rm -rf /deqp/external/vulkancts/modules/vulkan/vk-master*
+rm -rf /deqp/external/vulkancts/modules/vulkan/vk-default
+
 rm -rf /deqp/external/openglcts/modules/cts-runner
 rm -rf /deqp/modules/internal
 rm -rf /deqp/execserver
diff --git a/.gitlab-ci/container/create-rootfs.sh b/.gitlab-ci/container/create-rootfs.sh
index 95acd5e5462..3065f233215 100644
--- a/.gitlab-ci/container/create-rootfs.sh
+++ b/.gitlab-ci/container/create-rootfs.sh
@@ -150,6 +150,8 @@ rm -rf usr/sbin/update-usbids
 rm -rf var/lib/usbutils/usb.ids
 rm -rf usr/share/misc/usb.ids
 
+rm -rf /root/.pip
+
 #######################################################################
 # Crush into a minimal production image to be deployed via some type of image
 # updating system.
diff --git a/.gitlab-ci/container/debian/x86_test-gl.sh b/.gitlab-ci/container/debian/x86_test-gl.sh
index e3cf63647db..ad9e6045264 100644
--- a/.gitlab-ci/container/debian/x86_test-gl.sh
+++ b/.gitlab-ci/container/debian/x86_test-gl.sh
@@ -84,6 +84,7 @@ apt-get install -y --no-remove \
 . .gitlab-ci/container/build-rust.sh
 . .gitlab-ci/container/build-crosvm.sh
 rm -rf /root/.cargo
+rm -rf /root/.rustup
 
 ############### Build kernel
 
diff --git a/.gitlab-ci/container/lava_build.sh b/.gitlab-ci/container/lava_build.sh
index 76336f5769d..6a2b4ee6318 100755
--- a/.gitlab-ci/container/lava_build.sh
+++ b/.gitlab-ci/container/lava_build.sh
@@ -174,6 +174,7 @@ EXTRA_MESON_ARGS+=" -D prefix=/libdrm"
 
 ############### Delete rust, since the tests won't be compiling anything.
 rm -rf /root/.cargo
+rm -rf /root/.rustup
 
 ############### Create rootfs
 set +e



More information about the mesa-commit mailing list