ci: improve disk space management on self-hosted Windows runner#19593
Merged
ci: improve disk space management on self-hosted Windows runner#19593
Conversation
Co-Authored-By: Claude
pwsh (PowerShell Core) is not installed on the runner; use bash which is already used by the other steps in this job. Co-Authored-By: Claude
go is not in PATH before setup-go runs, causing the step to fail. The step is also redundant: post-run go clean -cache already wipes the entire build cache including test results. Co-Authored-By: Claude
AskAlexSharov
approved these changes
Mar 4, 2026
sudeepdino008
pushed a commit
that referenced
this pull request
Mar 4, 2026
## Changes - Move `GOMODCACHE`/`GOCACHE` env vars to job level so all steps share the same cache paths - Add **pre-run** `go clean -testcache` (`if: always()`) — ensures tests run fresh and catches leftovers from cancelled runs - Add **LFS prune** step after checkout — removes blobs no longer referenced by the current branch - Replace old `Cleanup` with **post-run** `go clean -cache` — clears compiled artifacts after each run to prevent unbounded growth on the persistent runner - Post-run cleanup also removes `coverage-test-all.out` and `$env:RUNNER_TEMP` (previously only `$env:TEMP` was cleaned)
sudeepdino008
pushed a commit
that referenced
this pull request
Mar 4, 2026
## Changes - Move `GOMODCACHE`/`GOCACHE` env vars to job level so all steps share the same cache paths - Add **pre-run** `go clean -testcache` (`if: always()`) — ensures tests run fresh and catches leftovers from cancelled runs - Add **LFS prune** step after checkout — removes blobs no longer referenced by the current branch - Replace old `Cleanup` with **post-run** `go clean -cache` — clears compiled artifacts after each run to prevent unbounded growth on the persistent runner - Post-run cleanup also removes `coverage-test-all.out` and `$env:RUNNER_TEMP` (previously only `$env:TEMP` was cleaned)
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Changes
GOMODCACHE/GOCACHEenv vars to job level so all steps share the same cache pathsgo clean -testcache(if: always()) — ensures tests run fresh and catches leftovers from cancelled runsCleanupwith post-rungo clean -cache— clears compiled artifacts after each run to prevent unbounded growth on the persistent runnercoverage-test-all.outand$env:RUNNER_TEMP(previously only$env:TEMPwas cleaned)