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

Consider using sccache to cache Rust code on CI builds #48412

Closed
Aaron1011 opened this issue Feb 21, 2018 · 3 comments
Closed

Consider using sccache to cache Rust code on CI builds #48412

Aaron1011 opened this issue Feb 21, 2018 · 3 comments
Labels
C-enhancement Category: An issue proposing an enhancement or a PR with one. T-infra Relevant to the infrastructure team, which will review and decide on the PR/issue.

Comments

@Aaron1011
Copy link
Member

Aaron1011 commented Feb 21, 2018

Currently, sccache is only used for caching C dependencies of the rust compiler. However, sccache has (experimental) support for caching Rust builds. Since any given pull request will usually only modify a few compiler crates, this has the potential to greatly reduce build times (helping to address issues such as #46903).

At the moment, sscache doesn't appear to handle incremental compilation. It might be worthwhile to look into extending sscache to support caching incremental compilation output - though given the total number of jobs Rust runs on Appveyor and Travis CI, the amount of storage required could be prohibitive.

@ishitatsuyuki
Copy link
Contributor

Significant amount of time is spent compiling stage1, and running compiler tests. Those are not going to be cached (since the codegen can change). In short, only stage0 builds may be cached.

@Aaron1011
Copy link
Member Author

@ishitatsuyuki: That's a good point. However, building stage 0 can take up to 20 minutes on Travis CI (see https://travis-ci.org/rust-lang/rust/jobs/344517882 for an example), so this could still be a significant improvement.

@pietroalbini pietroalbini added C-enhancement Category: An issue proposing an enhancement or a PR with one. T-infra Relevant to the infrastructure team, which will review and decide on the PR/issue. labels Feb 27, 2018
@Mark-Simulacrum
Copy link
Member

Even stage 0 builds are somewhat unlikely to be cached as it's pretty easy to invalidate it, and it's also something that we'd need to be very careful about to avoid false negatives due to not detecting dependency edges; all in all I don't think this is tenable.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
C-enhancement Category: An issue proposing an enhancement or a PR with one. T-infra Relevant to the infrastructure team, which will review and decide on the PR/issue.
Projects
None yet
Development

No branches or pull requests

4 participants