Skip to content

[Github] Install sccache from apt repo in CI container #137491

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

Merged
merged 1 commit into from
Apr 27, 2025

Conversation

boomanaiden154
Copy link
Contributor

This patch installs sccache using apt-get in the CI container build process rather than manually downloading it from github releases. This makes things quite a bit simpler and means we are not manually handling things like hash/signature verification. This is only possible now that we are using ubuntu 24.04 by default.

This patch installs sccache using apt-get in the CI container build
process rather than manually downloading it from github releases. This
makes things quite a bit simpler and means we are not manually handling
things like hash/signature verification. This is only possible now that
we are using ubuntu 24.04 by default.
@llvmbot
Copy link
Member

llvmbot commented Apr 27, 2025

@llvm/pr-subscribers-github-workflow

Author: Aiden Grossman (boomanaiden154)

Changes

This patch installs sccache using apt-get in the CI container build process rather than manually downloading it from github releases. This makes things quite a bit simpler and means we are not manually handling things like hash/signature verification. This is only possible now that we are using ubuntu 24.04 by default.


Full diff: https://github.com/llvm/llvm-project/pull/137491.diff

1 Files Affected:

  • (modified) .github/workflows/containers/github-action-ci/Dockerfile (+2-11)
diff --git a/.github/workflows/containers/github-action-ci/Dockerfile b/.github/workflows/containers/github-action-ci/Dockerfile
index 60f47653a078f..2e0c23dbd51e3 100644
--- a/.github/workflows/containers/github-action-ci/Dockerfile
+++ b/.github/workflows/containers/github-action-ci/Dockerfile
@@ -63,20 +63,11 @@ RUN apt-get update && \
     python3-pip \
     ccache \
     file \
-    tzdata && \
+    tzdata \
+    sccache && \
     apt-get clean && \
     rm -rf /var/lib/apt/lists/*
 
-# Install sccache as it is needed by most of the project test workflows and
-# cannot be installed by the ccache action when executing as a non-root user.
-# TODO(boomanaiden154): This should be switched to being installed with apt
-# once we bump to Ubuntu 24.04.
-RUN curl -L 'https://github.com/mozilla/sccache/releases/download/v0.7.6/sccache-v0.7.6-x86_64-unknown-linux-musl.tar.gz' > /tmp/sccache.tar.gz && \
-    echo "2902a5e44c3342132f07b62e70cca75d9b23252922faf3b924f449808cc1ae58 /tmp/sccache.tar.gz" | sha256sum -c && \
-    tar xzf /tmp/sccache.tar.gz -O --wildcards '*/sccache' > '/usr/local/bin/sccache' && \
-    rm /tmp/sccache.tar.gz && \
-    chmod +x /usr/local/bin/sccache
-
 ENV LLVM_SYSROOT=$LLVM_SYSROOT
 ENV PATH=${LLVM_SYSROOT}/bin:${PATH}
 

Copy link
Collaborator

@tstellar tstellar left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM.

Copy link
Member

@gburgessiv gburgessiv left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thanks for this!

@boomanaiden154 boomanaiden154 merged commit 2c1d4b0 into llvm:main Apr 27, 2025
14 checks passed
@boomanaiden154 boomanaiden154 deleted the sccache-from-apt-repo branch April 27, 2025 15:20
jyli0116 pushed a commit to jyli0116/llvm-project that referenced this pull request Apr 28, 2025
This patch installs sccache using apt-get in the CI container build
process rather than manually downloading it from github releases. This
makes things quite a bit simpler and means we are not manually handling
things like hash/signature verification. This is only possible now that
we are using ubuntu 24.04 by default.
IanWood1 pushed a commit to IanWood1/llvm-project that referenced this pull request May 6, 2025
This patch installs sccache using apt-get in the CI container build
process rather than manually downloading it from github releases. This
makes things quite a bit simpler and means we are not manually handling
things like hash/signature verification. This is only possible now that
we are using ubuntu 24.04 by default.
IanWood1 pushed a commit to IanWood1/llvm-project that referenced this pull request May 6, 2025
This patch installs sccache using apt-get in the CI container build
process rather than manually downloading it from github releases. This
makes things quite a bit simpler and means we are not manually handling
things like hash/signature verification. This is only possible now that
we are using ubuntu 24.04 by default.
IanWood1 pushed a commit to IanWood1/llvm-project that referenced this pull request May 6, 2025
This patch installs sccache using apt-get in the CI container build
process rather than manually downloading it from github releases. This
makes things quite a bit simpler and means we are not manually handling
things like hash/signature verification. This is only possible now that
we are using ubuntu 24.04 by default.
Ankur-0429 pushed a commit to Ankur-0429/llvm-project that referenced this pull request May 9, 2025
This patch installs sccache using apt-get in the CI container build
process rather than manually downloading it from github releases. This
makes things quite a bit simpler and means we are not manually handling
things like hash/signature verification. This is only possible now that
we are using ubuntu 24.04 by default.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants