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

sccache is a pain to install in CI #12

Open
kornelski opened this issue Apr 20, 2018 · 4 comments
Open

sccache is a pain to install in CI #12

kornelski opened this issue Apr 20, 2018 · 4 comments
Labels

Comments

@kornelski
Copy link

kornelski commented Apr 20, 2018

I've spent way too much time trying to get https://github.com/imazen/imageflow use sccache, and it still doesn't work that well.

  • cargo install sccache takes way longer than time saving from sccache.

    • Travis cache only partially solves this problem, because there are still cases where the cache is cleared/missing.
    • Use of Docker in Travis disables cache: cargo, so these targets are left without ability to cache cargo install!
    • I've tried building static musl versions of sccache, but because of openssl dependency that turned out to be annoyingly hard, too.
  • I may be using AWS wrong, but having password-protected S3 bucket requires writing JSON!? I hoped I could set up a bucket for the cache just by ticking a few checkboxes in a GUI, but nope.

    • If sccache could also set up minimal IAM roles it needs it'd be great (I imagine I'd give it admin access once, and it'd tell me AWS key+secret to use in CI).
    • If other providers are much easier to set up, shout about it in the docs!
  • I get ~20% cache hit ratio in sccache, and I'm not sure if that's good or bad and what can I do to improve it.

@epage epage added the question label Apr 21, 2018
@epage
Copy link
Contributor

epage commented Apr 21, 2018

Thanks for recording the challenges you've run into! I've marked this as a "question", not to question whether we should fix it but to help note that further investigation is needed to create proposals on how to fix this.

#11 talks a little about the challenges of musl, including openssl. Do you mind posting in there more concrete details?

I get ~20% cache hit ratio in sccache, and I'm not sure if that's good or bad and what can I do to improve it.

Is your Cargo.toml checked in? I'm wondering how often deps are changing from run to run, lowering your cache hit rate.

I wish I could ask more clarifying questions but I've not yet dealt with sccache. My CI times haven't been bad enough.

I'd love it if we could have some kind of community caching service though I know that has all sorts of security complications.

@kornelski
Copy link
Author

I have both Cargo.toml and Cargo.lock checked in. The hit rate is for re-running the same build on the same git commit, so there are no source code changes.

@epage
Copy link
Contributor

epage commented Apr 21, 2018

Ouch. I was assuming this was more related to how often the cache is useful, not that it was flat out failing. What have the maintainers said?

@kornelski
Copy link
Author

kornelski commented Apr 21, 2018

I'm the (co)maintainer, so ¯\_(ツ)_/¯ :)

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

No branches or pull requests

2 participants