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

Add dependency caching to GH Actions for faster CI #258

Merged
merged 23 commits into from
Mar 8, 2024

Conversation

escritorio-gustavo
Copy link
Contributor

@escritorio-gustavo escritorio-gustavo commented Mar 8, 2024

Our CI takes quite a while to run, mostly because of the Rust compiler being kinda slow. This PR attempts to remedy that by caching its dependencies. It also runs twice on every commit when we do PR's from within the repo, this PR also fixes that.

I have no idea if it will actually work, but should be worth the shot

Our CI takes quite a while to run, mostly because of the Rust compiler being kinda slow. This PR attempts to remedy that by caching its dependencies.

The caveat is... I have no idea if it will actually work
@escritorio-gustavo
Copy link
Contributor Author

Okay, first CI run finished in 2m 30s.

We have a few dead code warnings in our tests, I'll add #![allow(dead_code)] to remove those and trigger CI so we can see if there is a difference

@escritorio-gustavo
Copy link
Contributor Author

2m 22s... that's disappointing

@escritorio-gustavo
Copy link
Contributor Author

I think it's not caching because it has to compile both --all-features and --no-default-features. I'll try splitting them up to see if helps, if it doesn't, I'll just close this PR

@escritorio-gustavo
Copy link
Contributor Author

Oops, running these tests in parallel breaks them due to everyone messing with the same files

@escritorio-gustavo

This comment was marked as off-topic.

@escritorio-gustavo escritorio-gustavo marked this pull request as draft March 8, 2024 12:13
@escritorio-gustavo

This comment was marked as off-topic.

@escritorio-gustavo escritorio-gustavo deleted the cache-dependencies-gh-actions branch March 8, 2024 12:20
@escritorio-gustavo escritorio-gustavo restored the cache-dependencies-gh-actions branch March 8, 2024 12:23
@escritorio-gustavo

This comment was marked as outdated.

@escritorio-gustavo
Copy link
Contributor Author

Well, I finally got CI to run again

@escritorio-gustavo

This comment was marked as outdated.

@escritorio-gustavo
Copy link
Contributor Author

escritorio-gustavo commented Mar 8, 2024

Finally! Got the time down to 1m06s

@escritorio-gustavo
Copy link
Contributor Author

escritorio-gustavo commented Mar 8, 2024

Finally! Got the time down to 1m06s

The only reason for it to still be this slow is that the --all-features test still takes 40s+ to compile for some reason... still, better than the previous 2m+

image

@escritorio-gustavo escritorio-gustavo marked this pull request as ready for review March 8, 2024 13:39
Copy link
Collaborator

@NyxCode NyxCode left a comment

Choose a reason for hiding this comment

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

It also runs twice on every commit when we do PR's from within the repo, this PR also fixes that.

🥳

Great change, super happy to see this!
To keep main clean, it'd be nice if you could squash the commits.

@escritorio-gustavo escritorio-gustavo merged commit 92082fb into main Mar 8, 2024
14 checks passed
@escritorio-gustavo escritorio-gustavo deleted the cache-dependencies-gh-actions branch March 8, 2024 18:58
@escritorio-gustavo
Copy link
Contributor Author

To keep main clean, it'd be nice if you could squash the commits.

Agreed, this has way too many commits for something that really should be simple

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants