Skip to content

Commit e58df7c

Browse files
[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%.
1 parent 581d175 commit e58df7c

File tree

1 file changed

+2
-25
lines changed
  • .github/workflows/containers/github-action-ci-windows

1 file changed

+2
-25
lines changed

.github/workflows/containers/github-action-ci-windows/Dockerfile

Lines changed: 2 additions & 25 deletions
Original file line numberDiff line numberDiff line change
@@ -39,33 +39,15 @@ RUN regsvr32 /S "C:\BuildTools\DIA SDK\bin\amd64\msdia140.dll" & \
3939

4040
# install tools as described in https://llvm.org/docs/GettingStartedVS.html
4141
# and a few more that were not documented...
42-
RUN choco install -y ninja git
42+
RUN choco install -y ninja git sccache
4343
# Pin an older version of Python; the current Python 3.10 fails when
4444
# doing "pip install" for the other dependencies, as it fails to find libxml
4545
# while compiling some package.
4646
RUN choco install -y python3 --version 3.9.7
4747

48-
# ActivePerl is currently not installable via Chocolatey, see
49-
# http://disq.us/p/2ipditb. Install StrawberryPerl instead. Unfortunately,
50-
# StrawberryPerl not only installs Perl, but also a redundant C/C++ compiler
51-
# toolchain, and a copy of pkg-config which can cause misdetections for other
52-
# built products, see
53-
# https://github.com/StrawberryPerl/Perl-Dist-Strawberry/issues/11 for further
54-
# details. Remove the redundant and unnecessary parts of the StrawberryPerl
55-
# install.
56-
RUN choco install -y strawberryperl && \
57-
rmdir /q /s c:\strawberry\c && \
58-
del /q c:\strawberry\perl\bin\pkg-config*
59-
60-
# libcxx requires clang(-cl) to be available
61-
RUN choco install -y sccache llvm
48+
# Testing requires psutil
6249
RUN pip install psutil
6350

64-
RUN curl -LO https://github.com/mstorsjo/llvm-mingw/releases/download/20230320/llvm-mingw-20230320-ucrt-x86_64.zip && \
65-
powershell Expand-Archive llvm-mingw-*-ucrt-x86_64.zip -DestinationPath . && \
66-
del llvm-mingw-*-ucrt-x86_64.zip && \
67-
ren llvm-mingw-20230320-ucrt-x86_64 llvm-mingw
68-
6951
# configure Python encoding
7052
ENV PYTHONIOENCODING=UTF-8
7153

@@ -103,11 +85,6 @@ RUN powershell -Command \
10385
RUN git config --system core.longpaths true & \
10486
git config --global core.autocrlf false
10587
106-
# handle for debugging of files beeing locked by some processes.
107-
RUN choco install -y handle
108-
109-
RUN pip3 install pywin32 buildbot-worker==2.8.4
110-
11188
ARG RUNNER_VERSION=2.324.0
11289
ENV RUNNER_VERSION=$RUNNER_VERSION
11390

0 commit comments

Comments
 (0)