[llvm] [polly] [CI] Enable sccache GCS on premerge (PR #149923)

Aiden Grossman via llvm-commits llvm-commits at lists.llvm.org
Tue Jul 22 09:36:52 PDT 2025


https://github.com/boomanaiden154 updated https://github.com/llvm/llvm-project/pull/149923

>From c9072f5eaacff7eee9e14bf3f3885b0100b67e5a Mon Sep 17 00:00:00 2001
From: Aiden Grossman <aidengrossman at google.com>
Date: Mon, 21 Jul 2025 22:17:29 +0000
Subject: [PATCH 1/3] [CI] Enable sccache GCS on premerge

This patch enables sccache using GCS for premerge.
---
 .github/workflows/premerge.yaml | 10 +++++++++-
 1 file changed, 9 insertions(+), 1 deletion(-)

diff --git a/.github/workflows/premerge.yaml b/.github/workflows/premerge.yaml
index 73943bc86eadd..5d82b64f191ca 100644
--- a/.github/workflows/premerge.yaml
+++ b/.github/workflows/premerge.yaml
@@ -62,6 +62,12 @@ jobs:
           export CC=/opt/llvm/bin/clang
           export CXX=/opt/llvm/bin/clang++
 
+          # This environment variable is passes into the container through the
+          # runner pod definition. This differs between our two clusters which
+          # why we do not hardcode it.
+          export SCCACHE_GCS_BUCKET=$CACHE_GCS_BUCKET
+          export SCCACHE_GCS_RW_MODE=READ_WRITE
+
           ./.ci/monolithic-linux.sh "${projects_to_build}" "${project_check_targets}" "${runtimes_to_build}" "${runtimes_check_targets}" "${runtimes_check_targets_needs_reconfig}" "${enable_cir}"
       - name: Upload Artifacts
         if: '!cancelled()'
@@ -113,7 +119,9 @@ jobs:
         shell: cmd
         run: |
           call C:\\BuildTools\\Common7\\Tools\\VsDevCmd.bat -arch=amd64 -host_arch=amd64
-          bash .ci/monolithic-windows.sh "${{ steps.vars.outputs.windows-projects }}" "${{ steps.vars.outputs.windows-check-targets }}"
+          bash "export SCCACHE_GCS_BUCKET=$CACHE_GCS_BUCKET; \
+          export SCCACHE_GCS_RW_MODE=READ_WRITE; \
+          .ci/monolithic-windows.sh \"${{ steps.vars.outputs.windows-projects }}\" \"${{ steps.vars.outputs.windows-check-targets }}\""
       - name: Upload Artifacts
         if: '!cancelled()'
         uses: actions/upload-artifact at 65c4c4a1ddee5b72f698fdd19549f0f0fb45cf08 # v4.6.0

>From 0c3429c40d9af9ec0912aedfe8d49571873d7719 Mon Sep 17 00:00:00 2001
From: Aiden Grossman <aidengrossman at google.com>
Date: Tue, 22 Jul 2025 16:30:42 +0000
Subject: [PATCH 2/3] test commit

---
 polly/CMakeLists.txt | 1 +
 1 file changed, 1 insertion(+)

diff --git a/polly/CMakeLists.txt b/polly/CMakeLists.txt
index 52d1be6fe295a..002149d5442cf 100644
--- a/polly/CMakeLists.txt
+++ b/polly/CMakeLists.txt
@@ -1,3 +1,4 @@
+# Test
 # Check if this is a in tree build.
 if (NOT DEFINED LLVM_MAIN_SRC_DIR)
   project(Polly)

>From 5d1b41a164209f4e6a0bf7f598272dafe0fd8f8b Mon Sep 17 00:00:00 2001
From: Aiden Grossman <aidengrossman at google.com>
Date: Tue, 22 Jul 2025 16:36:40 +0000
Subject: [PATCH 3/3] Fix things

---
 .github/workflows/premerge.yaml | 12 ++----------
 1 file changed, 2 insertions(+), 10 deletions(-)

diff --git a/.github/workflows/premerge.yaml b/.github/workflows/premerge.yaml
index 5d82b64f191ca..6451da026e350 100644
--- a/.github/workflows/premerge.yaml
+++ b/.github/workflows/premerge.yaml
@@ -34,11 +34,6 @@ jobs:
         uses: actions/checkout at 11bd71901bbe5b1630ceea73d27597364c9af683 # v4.2.2
         with:
           fetch-depth: 2
-      - name: Setup ccache
-        uses: hendrikmuhs/ccache-action at 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
         # not get notified while the new premerge pipeline is in an
@@ -67,6 +62,7 @@ jobs:
           # why we do not hardcode it.
           export SCCACHE_GCS_BUCKET=$CACHE_GCS_BUCKET
           export SCCACHE_GCS_RW_MODE=READ_WRITE
+          sccache --start-server
 
           ./.ci/monolithic-linux.sh "${projects_to_build}" "${project_check_targets}" "${runtimes_to_build}" "${runtimes_check_targets}" "${runtimes_check_targets_needs_reconfig}" "${enable_cir}"
       - name: Upload Artifacts
@@ -92,11 +88,6 @@ jobs:
         uses: actions/checkout at 11bd71901bbe5b1630ceea73d27597364c9af683 # v4.2.2
         with:
           fetch-depth: 2
-      - name: Setup ccache
-        uses: hendrikmuhs/ccache-action at a1209f81afb8c005c13b4296c32e363431bffea5 # v1.2.17
-        with:
-          variant: "sccache"
-          max-size: "2000M"
       - name: Compute Projects
         id: vars
         run: |
@@ -121,6 +112,7 @@ jobs:
           call C:\\BuildTools\\Common7\\Tools\\VsDevCmd.bat -arch=amd64 -host_arch=amd64
           bash "export SCCACHE_GCS_BUCKET=$CACHE_GCS_BUCKET; \
           export SCCACHE_GCS_RW_MODE=READ_WRITE; \
+          sccache --start-server; \
           .ci/monolithic-windows.sh \"${{ steps.vars.outputs.windows-projects }}\" \"${{ steps.vars.outputs.windows-check-targets }}\""
       - name: Upload Artifacts
         if: '!cancelled()'



More information about the llvm-commits mailing list