Skip to content

Slow repository clone, slow CI tasks #488

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

Closed
adamziel opened this issue Jun 1, 2023 · 7 comments
Closed

Slow repository clone, slow CI tasks #488

adamziel opened this issue Jun 1, 2023 · 7 comments

Comments

@adamziel
Copy link
Collaborator

adamziel commented Jun 1, 2023

It takes over a minute to clone the repository in GitHub actions because there's so much git data to download.

A good part of that are the stale .wasm and WordPress builds. Let's rewrite the history to remove them – they're not that useful. This tool could help:

https://rtyley.github.io/bfg-repo-cleaner/

In addition, moving that data to GitHub releases would also be of huge help – this is tracked in #58

@adamziel adamziel changed the title Cloning the repo is slow Slow repository clone, slow CI tasks Jun 1, 2023
@dmsnell
Copy link
Member

dmsnell commented Jun 1, 2023

are we not doing a shallow clone in CI? we shouldn't need more than the current HEAD, so instead of rewriting history I would imagine we can just ignore it

@adamziel
Copy link
Collaborator Author

adamziel commented Jun 1, 2023

Oh, hm, yeah isn't that a good point? I wonder what takes so long here, then: https://github.com/WordPress/wordpress-playground/actions/runs/5143790977/jobs/9259248772

@adamziel
Copy link
Collaborator Author

adamziel commented Jun 1, 2023

Oh, I guess it's just the repo as stands today is 500MB+. That makes it easier, though. We can just move a bunch of built assets to GH releases.

@dmsnell
Copy link
Member

dmsnell commented Jun 1, 2023

it may be fetch-depth: 0 causing it to grab everything. the default is a shallow clone. you can try removing the with: params and see if that fixes it.

@adamziel
Copy link
Collaborator Author

adamziel commented Jun 1, 2023

Haha that was it. The inverse optimization. Nx also needs trunk, though, to run tasks only on the affected projects, so I'm trying to figure that out.

@dmsnell
Copy link
Member

dmsnell commented Jun 1, 2023

it needs the ref trunk? you can do a manual git fetch --depth=1 origin/trunk I think, or something like that

@adamziel
Copy link
Collaborator Author

adamziel commented Jun 1, 2023

Yay, it worked! The workflows are now separated and this issue isn't a problem after all: #487

@adamziel adamziel closed this as completed Jun 1, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

2 participants