[CI][Github] Use newer sccache version in CI container

I was having trouble with the version that ships in the ubuntu apt repository
and GCS based caching. The newer version works, so reintroduce the infra that
we had in 2c1d4b0404187f0162d3b2df64dae062e53c3c79 to download it.

Reviewers: tstellar, lnihlen, gburgessiv, dschuff, cmtice, Keenuts

Reviewed By: cmtice, Keenuts

Pull Request: https://github.com/llvm/llvm-project/pull/149196
This commit is contained in:
Aiden Grossman 2025-07-17 10:15:11 -07:00 committed by GitHub
parent 871d65bfdd
commit fcb7ed69d0
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194

View File

@ -63,11 +63,21 @@ RUN apt-get update && \
python3-pip \
ccache \
file \
tzdata \
sccache && \
tzdata && \
apt-get clean && \
rm -rf /var/lib/apt/lists/*
# We need sccache for caching. We cannot use the apt repository version because
# it is too old and has bugs related to features we require (particularly GCS
# caching), so we manually install it here.
# TODO(boomanaiden154): We should return to installing this from the apt
# repository once a version containing the necessary bug fixes is available.
RUN curl -L 'https://github.com/mozilla/sccache/releases/download/v0.10.0/sccache-v0.10.0-x86_64-unknown-linux-musl.tar.gz' > /tmp/sccache.tar.gz && \
echo "1fbb35e135660d04a2d5e42b59c7874d39b3deb17de56330b25b713ec59f849b /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}