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

Caching #2

Closed
saltycrys opened this issue Dec 7, 2020 · 6 comments
Closed

Caching #2

saltycrys opened this issue Dec 7, 2020 · 6 comments

Comments

@saltycrys
Copy link

Hello,

Invidious now uses this action to install Crystal, see https://github.com/iv-org/invidious/blob/eb6d3d68a9ed880fe0e3e4b6404925d0f4a4c5ad/.github/workflows/ci.yml.
I tried to set up caching for Crystal but couldn't figure it out. Is caching possible? I noticed that Crystal needs some dependencies that might be hard to cache.

If caching is possible could you please add support for it in this action?

@oprypin
Copy link
Member

oprypin commented Dec 7, 2020

What exactly should be cached?

@saltycrys
Copy link
Author

The Crystal binary and all of its dependencies.

@oprypin
Copy link
Member

oprypin commented Dec 7, 2020

Crystal is already being downloaded from GitHub's own servers, everything is pre-packaged, so there is little to no advantage to caching it, because even a cache is also just a download from GitHub's servers.

@saltycrys
Copy link
Author

Yeah, it would only save six seconds. Is there a way to install a statically linked Crystal instead?

@oprypin
Copy link
Member

oprypin commented Dec 7, 2020

So indeed, installing Ubuntu packages is the slower part of this. No, I am not aware of any statically linked Crystal build.

@saltycrys
Copy link
Author

Okay. In that case there's no way of caching. Six seconds is not a huge deal anyways.

Thank you for this great action! It is very helpful because the Crystal container ships with a git version too old for the checkout action. So instead of doing a git clone it downloads the sources using the GitHub API, which breaks the usage of git commands in builds.

saltycrys added a commit to saltycrys/invidious that referenced this issue Dec 7, 2020
There is no way to cache Crystal unfortunately.
See crystal-lang/install-crystal#2
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