Repository navigation
fix(ci): add Linux host disk cleanup for CI builds - #1736
Conversation
There was a problem hiding this comment.
Pull request overview
This PR introduces a reusable Linux “host cleanup” step for both Azure DevOps pipelines and GitHub Actions to reclaim disk space on CI runners, then wires it into the WASM build and WASM UI test jobs to reduce disk exhaustion failures.
Changes:
- Added an AzDO reusable steps template to remove unused SDKs/toolchains on Linux runners.
- Added a matching reusable GitHub composite action and invoked it in the GHA CI workflow.
- Replaced existing inline cleanup in the AzDO WASM pipeline and added cleanup to the WASM UI test pipeline.
Reviewed changes
Copilot reviewed 5 out of 5 changed files in this pull request and generated no comments.
Show a summary per file
| File | Description |
|---|---|
build/workflow/templates/host-cleanup-linux.yml |
New AzDO steps template encapsulating Linux disk cleanup. |
build/workflow/build-wasm.yml |
Replaces inline cleanup bash with the shared cleanup template. |
build/workflow/stage-uitests-wasm.yml |
Adds the shared cleanup template to the Linux WASM UI test job. |
.github/actions/host-cleanup-linux/action.yml |
New composite action implementing the same Linux cleanup for GHA. |
.github/workflows/ci.yml |
Invokes the new composite cleanup action before .NET setup in the WASM build job. |
💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
- Extract host-cleanup-linux.sh shared script used by both AzDO and GHA - Use conditional sudo for container compatibility - Use apt-get purge instead of apt remove - Use rm -rf consistently - Add || true on all sudo lines for best-effort cleanup
There was a problem hiding this comment.
Pull request overview
Copilot reviewed 6 out of 6 changed files in this pull request and generated 1 comment.
💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
There was a problem hiding this comment.
Pull request overview
Copilot reviewed 6 out of 6 changed files in this pull request and generated no new comments.
💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
What
Adds a Linux host disk cleanup step to all Linux CI jobs to reclaim disk space by removing unused pre-installed software.
Why
Linux CI agents accumulate ~20–30 GB of pre-installed software (Cargo, Rust, Swift, Edge, GHC, Mono, Android SDK, CodeQL, snapd) that is not needed for builds. This cleanup step runs at the start of each Linux job to ensure sufficient disk space.
Details
host-cleanup-linux.sh) called by both the AzDO template and GHA composite actioncondition: eq(variables['Agent.OS'], 'Linux')/if: runner.os == 'Linux')sudo -n(non-interactive) probe to work safely in both host and container environments|| true) withtimeoutguards on snap/apt-get commandsDEBIAN_FRONTEND=noninteractivefor apt-get to prevent dpkg promptsPart of org-wide CI disk cleanup initiative.
Related to https://github.com/unoplatform/uno.rider/pull/480