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: try and cache the bundle between builds #133

Merged
merged 2 commits into from
Feb 25, 2021
Merged

Conversation

joshpencheon
Copy link
Contributor

It currently takes ~5 minutes of compute time per job to do this.

This PR uses caching functionality provided by the default setup-ruby action to preserve a cache of the installed + built gems between runs.

It currently takes ~5 minutes of compute time per job to do this.
@joshpencheon
Copy link
Contributor Author

I'll restart the builds once done, to see what effect there is.

@joshpencheon
Copy link
Contributor Author

Although the caching worked, it would appear that the version of sassc being used made use of some very CPU-specific features during the native install. The upshot being that the bundle cache key was not granular enough, and builds using the cache could fail depending on the CPU they were scheduled against. More recent sassc versions apparently build in a slightly more flexible way.

@joshpencheon
Copy link
Contributor Author

It would seem the "Ruby + Bundle" drops to <10s with maximal use of the cache. Even if there are some changes to the bundle in a commit, the unchanged portion still benefits from the cache too. :)

Copy link
Collaborator

@ollietulloch ollietulloch left a comment

Choose a reason for hiding this comment

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

Thanks @joshpencheon - looks good, now seeing checks (eg Test / brakeman (push)) in ~25 seconds instead of ~5 minutes

@joshpencheon joshpencheon merged commit c97f64f into master Feb 25, 2021
@joshpencheon joshpencheon deleted the ci-bundle-cache branch February 25, 2021 11:29
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