CI: Fix "No space left on device" errors in ci-basic workflow#91
Merged
Conversation
…s to avoid 'No space left on device'
32c9d4d to
0a96bc0
Compare
PaulLaux
approved these changes
Oct 20, 2025
Comment on lines
+18
to
+22
| - name: Show system resource summary (before cleanup) | ||
| run: | | ||
| df -h | ||
| free -h | ||
| lscpu | egrep 'Model name|Socket|Thread|Core|CPU\(s\)' |
| # Remove heavy preinstalled SDKs and toolchains | ||
| sudo rm -rf /usr/local/lib/android || true | ||
| sudo rm -rf "$AGENT_TOOLSDIRECTORY" || true # preinstalled tool caches | ||
| df -h |
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.
Problem
The
ci-basic.ymlworkflow started failing with "No space left on device" errors across all PRs. This happened even for previously passing PRs that hadn't been modified (#89, for example) when I tried to re-run the CI workflow, for example: https://github.com/QED-it/zebra/actions/runs/17938984393/job/52561489949?pr=89Root Cause Investigation
Initially suspected two possible causes:
--lockedflag in cargo commands could allow dependencies to update and consume more disk space during compilationubuntu-latestVM resources (reduced total space or increased pre-installed packages)Results of the Investigation
--lockedalone didn't resolve the issue, confirming the problem was insufficient available disk space on the GitHub runner. However, I kept the--lockedflag in this PR as it's the proper way to ensure reproducible builds.ubuntu-latestVM resources on the Internet, and couldn't verify from our previous successful PR runs since we didn't log resource information. I tried cleaning up unused disk space, which resolved the issue.Solution
This PR implements disk space optimization for the CI workflow in the existing
ubuntu-latestinstance (continuing to use it), and also adds simple VM resource logging and additional improvements:Disk Space Cleanup
/usr/local/lib/android)$AGENT_TOOLSDIRECTORY)Resource Monitoring
Additional Improvements
--lockedflag to all cargo commands to ensure reproducible builds--no-depsflag tocargo docandcargo clippyto avoid building dependencies unnecessarilyubuntu-latest(removed redundant matrix syntax)