Skip to content

Commit 5cf8ff3

Browse files
boomanaiden154mahesh-attarde
authored andcommitted
[CI][Github] Set SCCACHE_IDLE_TIMEOUT to 0 (llvm#150508)
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.
1 parent 222ac85 commit 5cf8ff3

File tree

1 file changed

+9
-1
lines changed

1 file changed

+9
-1
lines changed

.github/workflows/premerge.yaml

Lines changed: 9 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -62,6 +62,12 @@ jobs:
6262
# why we do not hardcode it.
6363
export SCCACHE_GCS_BUCKET=$CACHE_GCS_BUCKET
6464
export SCCACHE_GCS_RW_MODE=READ_WRITE
65+
66+
# Set the idle timeout to zero to ensure sccache runs for the
67+
# entire duration of the job. Otherwise it might stop if we run
68+
# several test suites in a row and discard statistics that we want
69+
# to save in the end.
70+
export SCCACHE_IDLE_TIMEOUT=0
6571
sccache --start-server
6672
6773
./.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:
110116
shell: cmd
111117
run: |
112118
call C:\\BuildTools\\Common7\\Tools\\VsDevCmd.bat -arch=amd64 -host_arch=amd64
113-
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 }}\""
119+
# See the comments above in the Linux job for why we define each of
120+
# these environment variables.
121+
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 }}\""
114122
- name: Upload Artifacts
115123
if: '!cancelled()'
116124
uses: actions/upload-artifact@65c4c4a1ddee5b72f698fdd19549f0f0fb45cf08 # v4.6.0

0 commit comments

Comments
 (0)