[llvm] [Github] Add sccache to CI container (PR #122063)
Aiden Grossman via llvm-commits
llvm-commits at lists.llvm.org
Wed Jan 8 19:06:29 PST 2025
https://github.com/boomanaiden154 updated https://github.com/llvm/llvm-project/pull/122063
>From af76abc9a40305cf1e3dbb66e5f35c58b4cd76f5 Mon Sep 17 00:00:00 2001
From: Aiden Grossman <aidengrossman at google.com>
Date: Wed, 8 Jan 2025 07:20:32 +0000
Subject: [PATCH 1/2] [Github] Add sccache to CI container
This patch adds sccache to the CI container so that the llvm-project-tests
workflow does not fail due to missing sccache.
---
.github/workflows/containers/github-action-ci/Dockerfile | 5 +++++
1 file changed, 5 insertions(+)
diff --git a/.github/workflows/containers/github-action-ci/Dockerfile b/.github/workflows/containers/github-action-ci/Dockerfile
index 58355d261c43c9..4ddab6a30d022a 100644
--- a/.github/workflows/containers/github-action-ci/Dockerfile
+++ b/.github/workflows/containers/github-action-ci/Dockerfile
@@ -66,6 +66,11 @@ RUN apt-get update && \
file \
tzdata
+# 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.
+RUN curl -L 'https://github.com/mozilla/sccache/releases/download/v0.7.6/sccache-v0.7.6-x86_64-unknown-linux-musl.tar.gz' | tar xzf - -O --wildcards '*/sccache' > '/usr/local/bin/sccache' && \
+ chmod +x /usr/local/bin/sccache
+
ENV LLVM_SYSROOT=$LLVM_SYSROOT
ENV PATH=${LLVM_SYSROOT}/bin:${PATH}
>From c0b02a6bbca1d48c8879c4aa372cd76197198c93 Mon Sep 17 00:00:00 2001
From: Aiden Grossman <aidengrossman at google.com>
Date: Thu, 9 Jan 2025 03:06:18 +0000
Subject: [PATCH 2/2] Address feedback
---
.github/workflows/containers/github-action-ci/Dockerfile | 7 ++++++-
1 file changed, 6 insertions(+), 1 deletion(-)
diff --git a/.github/workflows/containers/github-action-ci/Dockerfile b/.github/workflows/containers/github-action-ci/Dockerfile
index 4ddab6a30d022a..76f708f2e0946a 100644
--- a/.github/workflows/containers/github-action-ci/Dockerfile
+++ b/.github/workflows/containers/github-action-ci/Dockerfile
@@ -68,7 +68,12 @@ RUN apt-get update && \
# 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.
-RUN curl -L 'https://github.com/mozilla/sccache/releases/download/v0.7.6/sccache-v0.7.6-x86_64-unknown-linux-musl.tar.gz' | tar xzf - -O --wildcards '*/sccache' > '/usr/local/bin/sccache' && \
+# 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
More information about the llvm-commits
mailing list