Skip to content

[github] pre-cache llvm-project in Linux CI Docker images #133137

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Open
wants to merge 1 commit into
base: main
Choose a base branch
from
Open
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
11 changes: 11 additions & 0 deletions .github/workflows/containers/github-action-ci/Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -94,3 +94,14 @@ RUN mkdir actions-runner && \
tar xzf ./actions-runner-linux-x64-$GITHUB_RUNNER_VERSION.tar.gz && \
rm ./actions-runner-linux-x64-$GITHUB_RUNNER_VERSION.tar.gz

# Pre-cache llvm-project in these images; this works with the premerge action
# to speed up runs; cloning LLVM fresh takes >1min otherwise.
#
# A local experiment showed an explicit `git gc --aggressive` reduced this
# layer's size by ~800MB (4.1GB -> 3.3GB). Disable GC'ing
# afterward, so we don't waste time trying to do that in CI.
RUN \
git clone https://github.com/llvm/llvm-project --tags && \
cd llvm-project && \
git gc --aggressive && \
git config gc.auto 0
Loading