Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

CI: Free disk space on Linux runners #80115

Merged
merged 1 commit into from
Aug 1, 2023

Conversation

akien-mga
Copy link
Member

@akien-mga akien-mga commented Aug 1, 2023

Removing the Android toolchain saves 14 12 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:

/dev/root        84G   66G   19G  79% /

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:

/dev/root        84G   77G  6.8G  92% /

And after the godot-cpp build:

/dev/root        84G   79G  4.7G  95% /

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.

Removing the Android toolchain saves 14 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 godotengine#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.
@akien-mga akien-mga added enhancement platform:linuxbsd topic:buildsystem cherrypick:3.x Considered for cherry-picking into a future 3.x release cherrypick:4.0 cherrypick:4.1 Considered for cherry-picking into a future 4.1.x release labels Aug 1, 2023
@akien-mga akien-mga added this to the 4.2 milestone Aug 1, 2023
@akien-mga akien-mga requested a review from a team as a code owner August 1, 2023 12:36
@YuriSizov YuriSizov merged commit c5903cf into godotengine:master Aug 1, 2023
13 checks passed
@YuriSizov
Copy link
Contributor

Thanks!

@akien-mga akien-mga deleted the ci-free-disk-space branch August 1, 2023 15:55
@YuriSizov
Copy link
Contributor

Cherry-picked for 4.0.4.

@YuriSizov
Copy link
Contributor

Cherry-picked for 4.1.2.

@YuriSizov YuriSizov removed the cherrypick:4.1 Considered for cherry-picking into a future 4.1.x release label Aug 2, 2023
@akien-mga
Copy link
Member Author

Cherry-picked for 3.6.

@akien-mga akien-mga removed the cherrypick:3.x Considered for cherry-picking into a future 3.x release label Aug 29, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants