Skip to content

Conversation

boomanaiden154
Copy link
Contributor

This patch adds sccache to the CI container so that the llvm-project-tests workflow does not fail due to missing sccache.

This patch adds sccache to the CI container so that the llvm-project-tests
workflow does not fail due to missing sccache.
@boomanaiden154
Copy link
Contributor Author

This will fix the sccache action failing. Hopefully not running as root fixes the issue where CMake fails to detect python.

@llvmbot
Copy link
Member

llvmbot commented Jan 8, 2025

@llvm/pr-subscribers-github-workflow

Author: Aiden Grossman (boomanaiden154)

Changes

This patch adds sccache to the CI container so that the llvm-project-tests workflow does not fail due to missing sccache.


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

1 Files Affected:

  • (modified) .github/workflows/containers/github-action-ci/Dockerfile (+5)
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}
 

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, thanks.

@boomanaiden154 boomanaiden154 merged commit 929b90b into llvm:main Jan 9, 2025
8 checks passed
@boomanaiden154 boomanaiden154 deleted the add-sccache-ci-container branch January 9, 2025 04:57
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.

3 participants