Skip to content

[CI] Migrate monolithic-linux script to sccache #149195

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Conversation

boomanaiden154
Copy link
Contributor

This is in preparation for migrating to Google Cloud Storage (GCS) based
caching soon which is only supported by sccache.

boomanaiden154 added a commit to boomanaiden154/llvm-project that referenced this pull request Jul 16, 2025
This is in preparation for migrating to Google Cloud Storage (GCS) based
caching soon which is only supported by sccache.

Pull Request: llvm#149195
Created using spr 1.3.4

[skip ci]
Created using spr 1.3.4
boomanaiden154 added a commit to boomanaiden154/llvm-project that referenced this pull request Jul 17, 2025
This is in preparation for migrating to Google Cloud Storage (GCS) based
caching soon which is only supported by sccache.

Pull Request: llvm#149195
Created using spr 1.3.4
@llvmbot
Copy link
Member

llvmbot commented Jul 17, 2025

@llvm/pr-subscribers-github-workflow

Author: Aiden Grossman (boomanaiden154)

Changes

This is in preparation for migrating to Google Cloud Storage (GCS) based
caching soon which is only supported by sccache.


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

2 Files Affected:

  • (modified) .ci/monolithic-linux.sh (+4-3)
  • (modified) .github/workflows/premerge.yaml (+1)
diff --git a/.ci/monolithic-linux.sh b/.ci/monolithic-linux.sh
index 303b430c28e3f..d9f51ba9fd946 100755
--- a/.ci/monolithic-linux.sh
+++ b/.ci/monolithic-linux.sh
@@ -21,7 +21,7 @@ BUILD_DIR="${BUILD_DIR:=${MONOREPO_ROOT}/build}"
 INSTALL_DIR="${BUILD_DIR}/install"
 rm -rf "${BUILD_DIR}"
 
-ccache --zero-stats
+sccache --zero-stats
 
 mkdir -p artifacts/reproducers
 
@@ -31,7 +31,7 @@ export CLANG_CRASH_DIAGNOSTICS_DIR=`realpath artifacts/reproducers`
 function at-exit {
   retcode=$?
 
-  ccache --print-stats > artifacts/ccache_stats.txt
+  sccache --show-stats > artifacts/sccache_stats.txt
   cp "${BUILD_DIR}"/.ninja_log artifacts/.ninja_log
   cp "${BUILD_DIR}"/test-results.*.xml artifacts/ || :
 
@@ -73,7 +73,8 @@ cmake -S "${MONOREPO_ROOT}"/llvm -B "${BUILD_DIR}" \
       -D LLVM_LIT_ARGS="${lit_args}" \
       -D LLVM_ENABLE_LLD=ON \
       -D CMAKE_CXX_FLAGS=-gmlt \
-      -D LLVM_CCACHE_BUILD=ON \
+      -D CMAKE_C_COMPILER_LAUNCHER=sccache \
+      -D CMAKE_CXX_COMPILER_LAUNCHER=sccache \
       -D LIBCXX_CXX_ABI=libcxxabi \
       -D MLIR_ENABLE_BINDINGS_PYTHON=ON \
       -D LLDB_ENABLE_PYTHON=ON \
diff --git a/.github/workflows/premerge.yaml b/.github/workflows/premerge.yaml
index ff63355222065..7b5ecd62080f3 100644
--- a/.github/workflows/premerge.yaml
+++ b/.github/workflows/premerge.yaml
@@ -37,6 +37,7 @@ jobs:
       - name: Setup ccache
         uses: hendrikmuhs/ccache-action@a1209f81afb8c005c13b4296c32e363431bffea5 # v1.2.17
         with:
+          variant: "sccache"
           max-size: "2000M"
       - name: Build and Test
         # Mark the job as a success even if the step fails so that people do

boomanaiden154 added a commit to boomanaiden154/llvm-project that referenced this pull request Jul 17, 2025
This is in preparation for migrating to Google Cloud Storage (GCS) based
caching soon which is only supported by sccache.

Pull Request: llvm#149195
kparzysz and others added 2 commits July 17, 2025 17:12
Created using spr 1.3.4

[skip ci]
Created using spr 1.3.4
@boomanaiden154 boomanaiden154 changed the base branch from users/boomanaiden154/main.ci-migrate-monolithic-linux-script-to-sccache to main July 17, 2025 17:13
@boomanaiden154 boomanaiden154 merged commit 871d65b into main Jul 17, 2025
10 of 15 checks passed
@boomanaiden154 boomanaiden154 deleted the users/boomanaiden154/ci-migrate-monolithic-linux-script-to-sccache branch July 17, 2025 17:13
llvm-sync bot pushed a commit to arm/arm-toolchain that referenced this pull request Jul 17, 2025
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: llvm/llvm-project#149195
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.

4 participants