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(build-main): improve storage cleaning and ci build pipeline #4191

Merged
merged 2 commits into from
Feb 21, 2024

Conversation

xmfcx
Copy link
Contributor

@xmfcx xmfcx commented Feb 20, 2024

Description

Intro

I was looking for a solution to fix the out of storage issues in CI.

I've found out https://github.com/marketplace/actions/free-disk-space-ubuntu action.

Then realized we also had a custom free-disk-space action.

But it wasn't removing enough unused junk from the provided runner instance.

With this PR, we now utilize the established marketplace free-disk-space-ubuntu action.

Visible outcomes

See my post down below this page

Issue with the build-main* workflows

I first wanted this to be with as little change as possible.

So I just added it to the existing build-main workflow.

container: ${{ needs.load-env.outputs.base-image }}

But the free-disk-space didn't work because, as I linked in the line above, it runs it in a container.

Because of this, I had to modify the existing "docker-build-and-push-main" workflows to reuse them, just for building, not pushing.

This way, this PR hopefully resolves the issue and builds the Autoware everyday as expected.

Tests performed

Once these CIs pass, we can merge these.

Effects on system behavior

Not applicable.

Pre-review checklist for the PR author

The PR author must check the checkboxes below when creating the PR.

In-review checklist for the PR reviewers

The PR reviewers must check the checkboxes below before approval.

Post-review checklist for the PR author

The PR author must check the checkboxes below before merging.

  • There are no open discussions or they are tracked via tickets.

After all checkboxes are checked, anyone who has write access can merge the PR.

@xmfcx xmfcx added type:new-feature New functionalities or additions, feature requests. type:ci Continuous Integration (CI) processes and testing. labels Feb 20, 2024
@xmfcx xmfcx self-assigned this Feb 20, 2024
@xmfcx xmfcx changed the title Ci/free disk space ci(build-main): improve storage cleaning and ci build pipeline Feb 20, 2024
@xmfcx
Copy link
Contributor Author

xmfcx commented Feb 20, 2024

Original github runner disk state:

Filesystem      Size  Used Avail Use% Mounted on
/dev/root        73G   54G   20G  74% /

Previous "free-disk-space" performance (using a custom script):

Filesystem      Size  Used Avail Use% Mounted on
/dev/root        73G   40G   33G  55% /

Current "free-disk-space" performance (utilizing https://github.com/jlumbroso/free-disk-space):

Filesystem      Size  Used Avail Use% Mounted on
/dev/root        73G   21G   52G  29% /

With this update, our workflows that utilize "free-disk-space" will have additional 19GB space, 57% increase from what we had before.


After the job with cuda:

Filesystem      Size  Used Avail Use% Mounted on
/dev/root        73G   57G   17G  78% /

Which means, this workflow uses (52-17=35GB of storage, aftermath to its completion)

@xmfcx
Copy link
Contributor Author

xmfcx commented Feb 20, 2024

@xmfcx xmfcx force-pushed the ci/free-disk-space branch from 581707f to 8674d76 Compare February 20, 2024 13:58
@xmfcx
Copy link
Contributor Author

xmfcx commented Feb 20, 2024

Copy link
Member

@mitsudome-r mitsudome-r left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM

Signed-off-by: M. Fatih Cırıt <[email protected]>
@oguzkaganozt oguzkaganozt merged commit c02aa1d into main Feb 21, 2024
16 of 17 checks passed
@oguzkaganozt oguzkaganozt deleted the ci/free-disk-space branch February 21, 2024 15:14
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
type:ci Continuous Integration (CI) processes and testing. type:new-feature New functionalities or additions, feature requests.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants