-
Notifications
You must be signed in to change notification settings - Fork 4
Optimize Build Pipeline Disk Space #51
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
base: main
Are you sure you want to change the base?
Conversation
| ssh-key: ${{ inputs.STRAIN_REPOSITORY != github.repository && secrets.SSH_PRIVATE_KEY || '' }} | ||
| path: strains | ||
|
|
||
| - name: Clean Up Disk Space |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Good catch @DeimerM. I’m aligned with this change, and I don’t think the added build time (under 2 minutes) is a major concern
It would be nice to expose this as a configurable flag, maybe we can leave the default to true (enable disk space cleanup), while allowing it to be disabled for environments where it’s not required (e.g., larger runners) to reduce build time
Please let's make sure this option is documented in the README
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Done
DeimerM
left a comment
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Thanks a lot for your comments @magajh
| ssh-key: ${{ inputs.STRAIN_REPOSITORY != github.repository && secrets.SSH_PRIVATE_KEY || '' }} | ||
| path: strains | ||
|
|
||
| - name: Clean Up Disk Space |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Done
Co-authored-by: Maga Giorgianni <[email protected]>
| - boolean | ||
| - Input | ||
| * - CLEAN_UP_DISK_SPACE (Optional) | ||
| - If this field is set to ``true``, some non-essential pre-installed resources on the runner will be removed to free up disk space and avoid running out of resources during image builds. Default is ``true``. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
@DeimerM just a small suggestion
| - If this field is set to ``true``, some non-essential pre-installed resources on the runner will be removed to free up disk space and avoid running out of resources during image builds. Default is ``true``. | |
| - If this field is set to ``true``, some non-essential pre-installed resources on the runner will be removed to free up disk space and avoid running out of resources during image builds. Default is ``true``. Recommended when using GitHub’s default hosted runners or any runner with limited resources. |
Description
This PR adds a specialized cleanup step to the image build pipeline. It is designed to remove default resources and pre-installed software provided by the GitHub Actions (GA) runners that are not necessary for our specific build process.
Why is this necessary?
We have encountered no space left on device errors (specifically during the #111 importing to docker stage) because the standard GitHub-hosted runners have a limited disk capacity (approx. 14GB–18GB). Large Docker builds—especially those involving heavy node_modules or multiple layers—can exceed this limit.
By clearing out unused tools like the Android SDK, .NET, and the hosted tool cache, we can reclaim up to 20GB+ of additional disk space for the build process.