summaryrefslogtreecommitdiff
path: root/.github/workflows/containers
diff options
context:
space:
mode:
authorAiden Grossman <aidengrossman@google.com>2025-01-08 20:57:33 -0800
committerGitHub <noreply@github.com>2025-01-08 20:57:33 -0800
commit929b90be30c3a3063e29a94db2079ee4c4f44f0d (patch)
treeedf62e958a73337dc5b536549083c2b17467316a /.github/workflows/containers
parent5fdcea2d258befca3925d02d1b37f93174ac0153 (diff)
[Github] Add sccache to CI container (#122063)
This patch adds sccache to the CI container so that the llvm-project-tests workflow does not fail due to missing sccache.
Diffstat (limited to '.github/workflows/containers')
-rw-r--r--.github/workflows/containers/github-action-ci/Dockerfile10
1 files changed, 10 insertions, 0 deletions
diff --git a/.github/workflows/containers/github-action-ci/Dockerfile b/.github/workflows/containers/github-action-ci/Dockerfile
index d4e6cdcd7042..3757e603f8a1 100644
--- a/.github/workflows/containers/github-action-ci/Dockerfile
+++ b/.github/workflows/containers/github-action-ci/Dockerfile
@@ -67,6 +67,16 @@ 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.
+# 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}