fix(ci): add Linux host disk cleanup for CI builds#22917
fix(ci): add Linux host disk cleanup for CI builds#22917agneszitte wants to merge 3 commits intomasterfrom
Conversation
There was a problem hiding this comment.
Pull request overview
This PR updates the Linux CI host cleanup template and rolls it out to additional Linux-based Azure Pipelines jobs to proactively reclaim disk space on Microsoft-hosted agents and reduce “disk full” build/test failures.
Changes:
- Updated
build/ci/templates/host-cleanup-linux.ymlto a more aggressive/canonical cleanup routine, including before/afterdf -h /reporting and additional removable toolchain paths. - Added the Linux host cleanup template to multiple Linux CI jobs (Setup stage jobs and several Skia/Android/WASM test/build jobs) that previously didn’t run it.
Reviewed changes
Copilot reviewed 12 out of 12 changed files in this pull request and generated no comments.
Show a summary per file
| File | Description |
|---|---|
| build/ci/templates/host-cleanup-linux.yml | Expands cleanup actions (more paths, safer snap/apt commands) and adds disk usage reporting. |
| build/ci/.azure-devops-stages.yml | Runs Linux host cleanup early in the Setup stage jobs on Linux agents. |
| build/ci/tests/.azure-devops-tests-webassembly-skia.yml | Adds host cleanup before WASM runtime test setup/download steps. |
| build/ci/tests/.azure-devops-tests-webassembly-skia-build.yml | Adds host cleanup before WASM build prerequisites. |
| build/ci/tests/.azure-devops-tests-linux-skia.yml | Adds host cleanup to Linux Skia screenshot/runtime test jobs. |
| build/ci/tests/.azure-devops-tests-android-skia.yml | Adds host cleanup before Android Skia runtime test setup (KVM/emulator flow). |
| build/ci/tests/.azure-devops-tests-android-skia-build.yml | Adds host cleanup before Android Skia build prerequisites. |
| build/ci/tests/.azure-devops-tests-android-nativeaot-skia.yml | Adds host cleanup before Android NativeAOT runtime test setup. |
| build/ci/tests/.azure-devops-tests-android-nativeaot-skia-build.yml | Adds host cleanup before Android NativeAOT build prerequisites. |
| build/ci/tests/.azure-devops-tests-android-coreclr-skia.yml | Adds host cleanup before Android CoreCLR runtime test setup. |
| build/ci/tests/.azure-devops-tests-android-coreclr-skia-build.yml | Adds host cleanup before Android CoreCLR build prerequisites. |
| build/ci/tests/.azure-devops-tests-android-native.yml | Adds host cleanup before Android native UI test setup. |
💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
|
🤖 Your WebAssembly Skia Sample App stage site is ready! Visit it here: https://unowasmprstaging.z20.web.core.windows.net/pr-22917/wasm-skia-net9/index.html |
- 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 12 out of 12 changed files in this pull request and generated 1 comment.
💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
|
🤖 Your WebAssembly Skia Sample App stage site is ready! Visit it here: https://unowasmprstaging.z20.web.core.windows.net/pr-22917/wasm-skia-net9/index.html |
There was a problem hiding this comment.
Pull request overview
Copilot reviewed 12 out of 12 changed files in this pull request and generated 1 comment.
💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
|
🤖 Your WebAssembly Skia Sample App stage site is ready! Visit it here: https://unowasmprstaging.z20.web.core.windows.net/pr-22917/wasm-skia-net9/index.html |
ajpinedam
left a comment
There was a problem hiding this comment.
Looks good. The comment about the timeout seems valid.
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.yml) with inline cleanup scriptcondition: eq(variables['Agent.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