fix(ci): add Linux host disk cleanup for CI builds#2036
Conversation
6a4295e to
891ad2b
Compare
There was a problem hiding this comment.
Pull request overview
Adds a reusable Linux host cleanup composite action and wires it into CI jobs to mitigate disk space exhaustion on ubuntu-latest runners.
Changes:
- Introduces
.github/actions/host-cleanup-linuxcomposite action to remove preinstalled toolchains/SDKs and report disk usage. - Adds the cleanup action after checkout in the
buildandlinux-template-testsjobs. - Replaces the inline cleanup in
run-testscomposite action with a call to the new cleanup action.
Reviewed changes
Copilot reviewed 3 out of 3 changed files in this pull request and generated 3 comments.
| File | Description |
|---|---|
| .github/workflows/ci.yml | Adds Linux disk cleanup steps to the build and Linux matrix test jobs. |
| .github/actions/host-cleanup-linux/action.yml | New composite action encapsulating the Linux runner cleanup logic. |
| .github/actions/ci/run-tests/action.yml | Removes duplicated inline cleanup and calls the new cleanup action instead. |
💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
- Add informational comment block about base image - Use conditional sudo via command -v - Use rm -rf consistently - Add individual || true on every sudo line - Add apt-get purge snapd - Add df -h before/after for diagnostics
There was a problem hiding this comment.
Pull request overview
Copilot reviewed 3 out of 3 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 3 out of 3 changed files in this pull request and generated 3 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
.github/actions/host-cleanup-linux/action.yml) with inline cleanup scriptif: 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 promptslinux-template-testsjob (therun-testsaction already invokes it internally)Part of org-wide CI disk cleanup initiative.
Related to https://github.com/unoplatform/uno.rider/pull/480