CI: Free disk space on Linux runners #80115
Merged
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.
Removing the Android toolchain saves
1412 GiB, which gives us more room for growth and to avoid running into out-of-space errors in the Linux sanitizers + debug symbols builds.Related to #79919, though the caches were just one part of the problem, the real issue is that our Linux sanitizers builds take 12 GiB, and adding godot-cpp on top with 2 GiB leaves only a few GiB left for the cache itself.
Related to #80091, which may not be strictly needed after this, but might still be a nice improvement overall.
Inspired from https://github.com/marketplace/actions/free-disk-space-ubuntu which does the same and more, but instead of adding a thirdparty dependency we don't control, we just do the minimal change for our needs.
On a repo without cache (my fork), @YuriSizov and I found that the base Ubuntu image gives us around 19 GiB of disk space:
That doesn't match the 14 GiB documented by GitHub, which seems to be the size of the
/mnt
point, but we're not using it so it's a bit confusing.After the GCC sanitizers build, we have:
And after the godot-cpp build:
Adding a ~1 GiB zipped cache hit, and possibly multi-GiB
SCONS_CACHE
folder once unzipped, we're indeed close to full and that's why CI has been failing sporadically lately.Freeing 14 GiB should give us a lot of breathing room.
For the record, here's everything included in the Ubuntu 20.04 runners: https://github.com/actions/runner-images/blob/main/images/linux/Ubuntu2004-Readme.md
https://github.com/marketplace/actions/free-disk-space-ubuntu can free up to 31 GiB by removing more stuff, but would also take longer (up to 3 min extra). For now just removing Android stuff on the Linux jobs should be good.