Skip to content

Commit 28511a7

Browse files
[CI] Migrate monolithic-linux script to sccache
This is in preparation for migrating to Google Cloud Storage (GCS) based caching soon which is only supported by sccache. Pull Request: llvm#149195
1 parent 95639b7 commit 28511a7

File tree

2 files changed

+5
-3
lines changed

2 files changed

+5
-3
lines changed

.ci/monolithic-linux.sh

Lines changed: 4 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -21,7 +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
24+
sccache --zero-stats
2525

2626
mkdir -p artifacts/reproducers
2727

@@ -31,7 +31,7 @@ export CLANG_CRASH_DIAGNOSTICS_DIR=`realpath artifacts/reproducers`
3131
function at-exit {
3232
retcode=$?
3333

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

@@ -73,7 +73,8 @@ cmake -S "${MONOREPO_ROOT}"/llvm -B "${BUILD_DIR}" \
7373
-D LLVM_LIT_ARGS="${lit_args}" \
7474
-D LLVM_ENABLE_LLD=ON \
7575
-D CMAKE_CXX_FLAGS=-gmlt \
76-
-D LLVM_CCACHE_BUILD=ON \
76+
-D CMAKE_C_COMPILER_LAUNCHER=sccache \
77+
-D CMAKE_CXX_COMPILER_LAUNCHER=sccache \
7778
-D LIBCXX_CXX_ABI=libcxxabi \
7879
-D MLIR_ENABLE_BINDINGS_PYTHON=ON \
7980
-D LLDB_ENABLE_PYTHON=ON \

.github/workflows/premerge.yaml

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -37,6 +37,7 @@ jobs:
3737
- name: Setup ccache
3838
uses: hendrikmuhs/ccache-action@a1209f81afb8c005c13b4296c32e363431bffea5 # v1.2.17
3939
with:
40+
variant: "sccache"
4041
max-size: "2000M"
4142
- name: Build and Test
4243
# Mark the job as a success even if the step fails so that people do

0 commit comments

Comments
 (0)