[llvm] [CI][Github] Prune windows container (PR #141440)
Aiden Grossman via llvm-commits
llvm-commits at lists.llvm.org
Sun May 25 18:41:49 PDT 2025
https://github.com/boomanaiden154 created https://github.com/llvm/llvm-project/pull/141440
This patch partially prunes the windows container to reduce the image size, primarily to improve image pull time which is currently a pretty significant bottleneck in the new premerge due to autoscaling.
This patch removes the following:
- An extra copy of LLVM that is not needed anymore.
- An unneeded perl installation
- Some extra python packages that are specific to buildbot
This overall saves about 4GB on the uncompressed image, or about 20%.
I tested this locally against the premerge pipeline and everything passes.
There are still several significant areas of opportunity, namely seeing if we can move away from the 4.8 sdk image to just the `windowsservercore` image (about 7GB of opportunity), and shrinking the VS installation (in total about 5GB uncompressed currently opportunity unknown).
>From e58df7ccd41ad075331fb4f89b1670014cfd3906 Mon Sep 17 00:00:00 2001
From: Aiden Grossman <aidengrossman at google.com>
Date: Mon, 26 May 2025 01:37:14 +0000
Subject: [PATCH] [CI][Github] Prune windows container
This patch partially prunes the windows container to reduce the image
size, primarily to improve image pull time which is currently a pretty
significant bottleneck in the new premerge due to autoscaling.
This patch removes the following:
- An extra copy of LLVM that is not needed anymore.
- An unneeded perl installation
- Some extra python packages that are specific to buildbot
This overall saves about 4GB on the uncompressed image, or about 20%.
---
.../github-action-ci-windows/Dockerfile | 27 ++-----------------
1 file changed, 2 insertions(+), 25 deletions(-)
diff --git a/.github/workflows/containers/github-action-ci-windows/Dockerfile b/.github/workflows/containers/github-action-ci-windows/Dockerfile
index 6f821b4809b7a..09cda4bb574b9 100644
--- a/.github/workflows/containers/github-action-ci-windows/Dockerfile
+++ b/.github/workflows/containers/github-action-ci-windows/Dockerfile
@@ -39,33 +39,15 @@ RUN regsvr32 /S "C:\BuildTools\DIA SDK\bin\amd64\msdia140.dll" & \
# install tools as described in https://llvm.org/docs/GettingStartedVS.html
# and a few more that were not documented...
-RUN choco install -y ninja git
+RUN choco install -y ninja git sccache
# Pin an older version of Python; the current Python 3.10 fails when
# doing "pip install" for the other dependencies, as it fails to find libxml
# while compiling some package.
RUN choco install -y python3 --version 3.9.7
-# ActivePerl is currently not installable via Chocolatey, see
-# http://disq.us/p/2ipditb. Install StrawberryPerl instead. Unfortunately,
-# StrawberryPerl not only installs Perl, but also a redundant C/C++ compiler
-# toolchain, and a copy of pkg-config which can cause misdetections for other
-# built products, see
-# https://github.com/StrawberryPerl/Perl-Dist-Strawberry/issues/11 for further
-# details. Remove the redundant and unnecessary parts of the StrawberryPerl
-# install.
-RUN choco install -y strawberryperl && \
- rmdir /q /s c:\strawberry\c && \
- del /q c:\strawberry\perl\bin\pkg-config*
-
-# libcxx requires clang(-cl) to be available
-RUN choco install -y sccache llvm
+# Testing requires psutil
RUN pip install psutil
-RUN curl -LO https://github.com/mstorsjo/llvm-mingw/releases/download/20230320/llvm-mingw-20230320-ucrt-x86_64.zip && \
- powershell Expand-Archive llvm-mingw-*-ucrt-x86_64.zip -DestinationPath . && \
- del llvm-mingw-*-ucrt-x86_64.zip && \
- ren llvm-mingw-20230320-ucrt-x86_64 llvm-mingw
-
# configure Python encoding
ENV PYTHONIOENCODING=UTF-8
@@ -103,11 +85,6 @@ RUN powershell -Command \
RUN git config --system core.longpaths true & \
git config --global core.autocrlf false
-# handle for debugging of files beeing locked by some processes.
-RUN choco install -y handle
-
-RUN pip3 install pywin32 buildbot-worker==2.8.4
-
ARG RUNNER_VERSION=2.324.0
ENV RUNNER_VERSION=$RUNNER_VERSION
More information about the llvm-commits
mailing list