ci: reclaim runner disk before tests - #1047
Conversation
📝 WalkthroughWalkthroughThe test workflow now removes the unused Android SDK directory in two jobs while reporting disk usage before and after cleanup. The stable wacore test command remains unchanged. ChangesCI disk reclamation
Estimated code review effort: 1 (Trivial) | ~3 minutes Possibly related PRs
🚥 Pre-merge checks | ✅ 5✅ Passed checks (5 passed)
✨ Finishing Touches🧪 Generate unit tests (beta)
Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out. Comment |
|
| Filename | Overview |
|---|---|
| .github/workflows/main.yml | Adds Android SDK disk reclaim step to test and test-all-features jobs; also fixes missing trailing newline. The clippy job, which also compiles --all-targets on ubuntu-latest, does not receive the same step. |
Flowchart
%%{init: {'theme': 'neutral'}}%%
flowchart TD
subgraph CI ["Rust CI — ubuntu-latest jobs"]
F["format\n(cargo fmt --check)"]
C["clippy\n(--all-targets)\n⚠️ no reclaim step"]
T["test\nBuild & Test\n✅ reclaim step added"]
TAF["test-all-features\nBuild & Lint (--all-features)\n✅ reclaim step added"]
TS["test-stable\n(no-default-features, 3 crates)"]
end
subgraph Reclaim ["Reclaim step (new)"]
R["df -h /\nsudo rm -rf --one-file-system\n /usr/local/lib/android\ndf -h /"]
end
R -->|"applied to"| T
R -->|"applied to"| TAF
%%{init: {'theme': 'base', 'themeVariables': {"darkMode": true, "background": "#0d1117", "primaryColor": "#21262d", "primaryTextColor": "#e6edf3", "primaryBorderColor": "#8b949e", "lineColor": "#8b949e", "textColor": "#e6edf3", "edgeLabelBackground": "#161b22", "actorBkg": "#21262d", "actorBorder": "#8b949e", "actorTextColor": "#e6edf3", "actorLineColor": "#8b949e", "signalColor": "#8b949e", "signalTextColor": "#e6edf3", "noteBkgColor": "#373320", "noteBorderColor": "#d4a72c", "noteTextColor": "#f0e6c0", "labelBoxBkgColor": "#21262d", "labelBoxBorderColor": "#8b949e", "labelTextColor": "#e6edf3", "loopTextColor": "#e6edf3", "activationBkgColor": "#30363d", "activationBorderColor": "#8b949e"}}}%%
flowchart TD
subgraph CI ["Rust CI — ubuntu-latest jobs"]
F["format\n(cargo fmt --check)"]
C["clippy\n(--all-targets)\n⚠️ no reclaim step"]
T["test\nBuild & Test\n✅ reclaim step added"]
TAF["test-all-features\nBuild & Lint (--all-features)\n✅ reclaim step added"]
TS["test-stable\n(no-default-features, 3 crates)"]
end
subgraph Reclaim ["Reclaim step (new)"]
R["df -h /\nsudo rm -rf --one-file-system\n /usr/local/lib/android\ndf -h /"]
end
R -->|"applied to"| T
R -->|"applied to"| TAF
Reviews (2): Last reviewed commit: "ci: protect all-features disk headroom" | Re-trigger Greptile
📦 Binary size report
.text per crate
Baseline: |
|
Addressed in 405d95f. Build & Lint had remained green on the new image, but it is the other disk-heavy job and does not use Android either, so it now gets the same headroom without changing its build or test coverage. |
Closes #1046.
Why
Build & Test started running out of disk on the Ubuntu 20260714.240.1 image. Main failed once and PR #1045 failed twice at different rustc targets, always with No space left on device. The previous image completed the same matrix.
Change
Remove the unused hosted Android SDK at the start of the two disk-heavy Rust jobs and print disk usage before and after. This leaves the Rust target cache, debug information, commands, and coverage unchanged.
Validation