Skip to content

Conversation

@boomanaiden154
Copy link
Contributor

This patch sets the sccache idle timeout to zero which ensures that it will run indefinitely. Without this, sccache will sometimes stop when several long test suites get run consequitively. This resets the statistics which we save at the end. Ensuring the process stays running means we have accurate statistics when we collect them at the end.

This patch sets the sccache idle timeout to zero which ensures that it
will run indefinitely. Without this, sccache will sometimes stop when
several long test suites get run consequitively. This resets the
statistics which we save at the end. Ensuring the process stays running
means we have accurate statistics when we collect them at the end.
@llvmbot
Copy link
Member

llvmbot commented Jul 24, 2025

@llvm/pr-subscribers-github-workflow

Author: Aiden Grossman (boomanaiden154)

Changes

This patch sets the sccache idle timeout to zero which ensures that it will run indefinitely. Without this, sccache will sometimes stop when several long test suites get run consequitively. This resets the statistics which we save at the end. Ensuring the process stays running means we have accurate statistics when we collect them at the end.


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

1 Files Affected:

  • (modified) .github/workflows/premerge.yaml (+9-1)
diff --git a/.github/workflows/premerge.yaml b/.github/workflows/premerge.yaml
index c51325e2f0d45..d0518fa6879e2 100644
--- a/.github/workflows/premerge.yaml
+++ b/.github/workflows/premerge.yaml
@@ -62,6 +62,12 @@ jobs:
           # why we do not hardcode it.
           export SCCACHE_GCS_BUCKET=$CACHE_GCS_BUCKET
           export SCCACHE_GCS_RW_MODE=READ_WRITE
+
+          # Set the idle timeout to zero to ensure sccache runs for the
+          # entire duration of the job. Otherwise it might stop if we run
+          # several test suites in a row and discard statistics that we want
+          # to save in the end.
+          export SCCACHE_IDLE_TIMEOUT=0
           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}"
@@ -110,7 +116,9 @@ jobs:
         shell: cmd
         run: |
           call C:\\BuildTools\\Common7\\Tools\\VsDevCmd.bat -arch=amd64 -host_arch=amd64
-          bash -c "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 }}\""
+          # See the comments above in the Linux job for why we define each of
+          # these environment variables.
+          bash -c "export SCCACHE_GCS_BUCKET=$CACHE_GCS_BUCKET; export SCCACHE_GCS_RW_MODE=READ_WRITE; export SCCACHE_IDLE_TIMEOUT=0; sccache --start-server; .ci/monolithic-windows.sh \"${{ steps.vars.outputs.windows-projects }}\" \"${{ steps.vars.outputs.windows-check-targets }}\""
       - name: Upload Artifacts
         if: '!cancelled()'
         uses: actions/upload-artifact@65c4c4a1ddee5b72f698fdd19549f0f0fb45cf08 # v4.6.0

@boomanaiden154 boomanaiden154 merged commit bcfd294 into llvm:main Jul 24, 2025
11 checks passed
@boomanaiden154 boomanaiden154 deleted the sccache-run-forever branch July 24, 2025 22:11
mahesh-attarde pushed a commit to mahesh-attarde/llvm-project that referenced this pull request Jul 28, 2025
This patch sets the sccache idle timeout to zero which ensures that it
will run indefinitely. Without this, sccache will sometimes stop when
several long test suites get run consequitively. This resets the
statistics which we save at the end. Ensuring the process stays running
means we have accurate statistics when we collect them at the end.
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.

3 participants