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 example #494

Closed
devinburnette opened this issue Nov 5, 2024 · 1 comment
Closed

CI example #494

devinburnette opened this issue Nov 5, 2024 · 1 comment

Comments

@devinburnette
Copy link

Hello,

Firstly, thanks so much for an awesome gem! Saves us so much time in development. We're currently thinking about ways to translate those same savings to CI specifically when running tests. Was wondering if you had a working example of how to properly restore and save the bootsnap cache in CI, we use CircleCI.

I've seen a few issues related to mtime and compile cache. What works and what doesn't in CI and are there any workarounds? I've tried enabling the instrumentation logging, but I see many misses still, so I think there's something I'm not quite understanding about how things work in CI vs. development. I also tried using a tool like git restore mtime but am still seeing misses. So I'm wondering if it's still the mtime or some other part of the cache key that's being invalidated between runs?

Any advice or insights on how to get this working would be greatly appreciated! Also, let me know if there's a better place for these types of questions. Thanks again!

@casperisfine
Copy link
Contributor

I'm not familiar with CircleCI but presumably it has some cache mecanism that allow to persist a directory across builds, you can just cache the directory in which bootsnap stores its cache (likely tmp/cache assuming defaults).

Just note that bootsnap cache isn't self cleaning, so the cache may grow over time and will need to be periodically cleaned up.

As for mtime, it's no longer a concern since 1.18.0 https://github.com/Shopify/bootsnap/blob/main/CHANGELOG.md#1180

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

No branches or pull requests

2 participants