Skip to content

Commit f469aa8

Browse files
[𝘀𝗽𝗿] initial version
Created using spr 1.3.4
2 parents 1754a7d + 2902a1a commit f469aa8

File tree

3 files changed

+15
-17
lines changed

3 files changed

+15
-17
lines changed

.ci/monolithic-linux.sh

Lines changed: 4 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -21,12 +21,7 @@ BUILD_DIR="${BUILD_DIR:=${MONOREPO_ROOT}/build}"
2121
INSTALL_DIR="${BUILD_DIR}/install"
2222
rm -rf "${BUILD_DIR}"
2323

24-
ccache --zero-stats
25-
26-
if [[ -n "${CLEAR_CACHE:-}" ]]; then
27-
echo "clearing cache"
28-
ccache --clear
29-
fi
24+
sccache --zero-stats
3025

3126
mkdir -p artifacts/reproducers
3227

@@ -36,7 +31,7 @@ export CLANG_CRASH_DIAGNOSTICS_DIR=`realpath artifacts/reproducers`
3631
function at-exit {
3732
retcode=$?
3833

39-
ccache --print-stats > artifacts/ccache_stats.txt
34+
sccache --show-stats > artifacts/sccache_stats.txt
4035
cp "${BUILD_DIR}"/.ninja_log artifacts/.ninja_log
4136
cp "${BUILD_DIR}"/test-results.*.xml artifacts/ || :
4237

@@ -78,7 +73,8 @@ cmake -S "${MONOREPO_ROOT}"/llvm -B "${BUILD_DIR}" \
7873
-D LLVM_LIT_ARGS="${lit_args}" \
7974
-D LLVM_ENABLE_LLD=ON \
8075
-D CMAKE_CXX_FLAGS=-gmlt \
81-
-D LLVM_CCACHE_BUILD=ON \
76+
-D CMAKE_C_COMPILER_LAUNCHER=sccache \
77+
-D CMAKE_CXX_COMPILER_LAUNCHER=sccache \
8278
-D LIBCXX_CXX_ABI=libcxxabi \
8379
-D MLIR_ENABLE_BINDINGS_PYTHON=ON \
8480
-D LLDB_ENABLE_PYTHON=ON \

.ci/monolithic-windows.sh

Lines changed: 0 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -21,11 +21,6 @@ BUILD_DIR="${BUILD_DIR:=${MONOREPO_ROOT}/build}"
2121

2222
rm -rf "${BUILD_DIR}"
2323

24-
if [[ -n "${CLEAR_CACHE:-}" ]]; then
25-
echo "clearing sccache"
26-
rm -rf "$SCCACHE_DIR"
27-
fi
28-
2924
sccache --zero-stats
3025
function at-exit {
3126
retcode=$?

.github/workflows/containers/github-action-ci/Dockerfile

Lines changed: 11 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -58,16 +58,23 @@ RUN apt-get update && \
5858
python3-psutil \
5959
sudo \
6060
# These are needed by the premerge pipeline. Pip is used to install
61-
# dependent python packages and ccache is used for build caching. File and
61+
# dependent python packages and sccache is used for build caching. File and
6262
# tzdata are used for tests.
6363
python3-pip \
64-
ccache \
6564
file \
66-
tzdata \
67-
sccache && \
65+
tzdata && \
6866
apt-get clean && \
6967
rm -rf /var/lib/apt/lists/*
7068

69+
# We need sccache for caching. We cannot use the apt repository version because
70+
# it is too old and has bugs related to features we require (particularly GCS
71+
# caching), so we manually install it here.
72+
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 && \
73+
echo "1fbb35e135660d04a2d5e42b59c7874d39b3deb17de56330b25b713ec59f849b /tmp/sccache.tar.gz" | sha256sum -c && \
74+
tar xzf /tmp/sccache.tar.gz -O --wildcards '*/sccache' > '/usr/local/bin/sccache' && \
75+
rm /tmp/sccache.tar.gz && \
76+
chmod +x /usr/local/bin/sccache
77+
7178
ENV LLVM_SYSROOT=$LLVM_SYSROOT
7279
ENV PATH=${LLVM_SYSROOT}/bin:${PATH}
7380

0 commit comments

Comments
 (0)