Skip to content

Commit 8391eaf

Browse files
boomanaiden154llvmbot
authored andcommitted
[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. Reviewers: Keenuts, gburgessiv, dschuff, lnihlen, cmtice Reviewed By: cmtice Pull Request: #149195 (cherry picked from commit 871d65b)
1 parent ece4440 commit 8391eaf

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
if [[ -n "${CLEAR_CACHE:-}" ]]; then
2727
echo "clearing cache"
@@ -36,7 +36,7 @@ export CLANG_CRASH_DIAGNOSTICS_DIR=`realpath artifacts/reproducers`
3636
function at-exit {
3737
retcode=$?
3838

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

@@ -78,7 +78,8 @@ cmake -S "${MONOREPO_ROOT}"/llvm -B "${BUILD_DIR}" \
7878
-D LLVM_LIT_ARGS="${lit_args}" \
7979
-D LLVM_ENABLE_LLD=ON \
8080
-D CMAKE_CXX_FLAGS=-gmlt \
81-
-D LLVM_CCACHE_BUILD=ON \
81+
-D CMAKE_C_COMPILER_LAUNCHER=sccache \
82+
-D CMAKE_CXX_COMPILER_LAUNCHER=sccache \
8283
-D LIBCXX_CXX_ABI=libcxxabi \
8384
-D MLIR_ENABLE_BINDINGS_PYTHON=ON \
8485
-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)