Skip to content

Improve build times by caching cargo install artifacts for diesel, clippy, and rustfmt #1216

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

Merged
merged 3 commits into from
Jan 4, 2018

Conversation

jtgeibel
Copy link
Member

The primary change is to set CARGO_TARGET_DIR=target which instructs cargo install to use the target/ directory which is cached between builds on travis. This is only available on recent nightlies so I've bumped clippy and rustfmt versions.

Unfortunately, ring v0.11.0 does not compile on recent nightlies and upstream provides no support for older versions. Therefore I've added a patch section to use a git repo that incorporates the fix and a few other cleanups. This issue would have broken the build soon anyway when rust 1.24 goes into beta.

A few other changes:

  • only npm install on the stable job
  • removed travis-cargo which appears to be unused
  • removed rustfmt configuration options that were removed upstream

…clippy, and rustfmt

The primary change is to set `CARGO_TARGET_DIR=target` which instructs
`cargo install` to use the target/ directory which is cached between
builds on travis.  This is only available on recent nightlies so I've
bumped clippy and rustfmt versions.

Unfortunately, `ring v0.11.0` does not compile on recent nightlies and
upstream provides no support for older versions.  Therefore I've added
a patch section to use a git repo that incorporates the fix and a few
other cleanups.  This issue would have broken the build soon anyway
when rust 1.24 goes into beta.

A few other changes:

* only `npm install` on the stable job
* removed travis-cargo which appears to be unused
* removed rustfmt configuration options that were removed upstream
@jtgeibel jtgeibel added the C-internal 🔧 Category: Nonessential work that would make the codebase more consistent or clear label Dec 29, 2017
I'm assuming this was compiled with `--debug` previously to reduce
build times.  Now that `cargo target` is cached on CI, it seems fine to
build this with optimizations enabled.
@jtgeibel jtgeibel mentioned this pull request Jan 3, 2018
@carols10cents
Copy link
Member

i like faster!

bors: r+

bors-voyager bot added a commit that referenced this pull request Jan 4, 2018
1216: Improve build times by caching `cargo install` artifacts for diesel, clippy, and rustfmt r=carols10cents

The primary change is to set `CARGO_TARGET_DIR=target` which instructs `cargo install` to use the target/ directory which is cached between builds on travis.  This is only available on recent nightlies so I've bumped clippy and rustfmt versions.

Unfortunately, `ring v0.11.0` does not compile on recent nightlies and upstream provides no support for older versions.  Therefore I've added a patch section to use a git repo that incorporates the fix and a few other cleanups.  This issue would have broken the build soon anyway when rust 1.24 goes into beta.

A few other changes:

* only `npm install` on the stable job
* removed travis-cargo which appears to be unused
* removed rustfmt configuration options that were removed upstream
@bors-voyager
Copy link
Contributor

bors-voyager bot commented Jan 4, 2018

Build succeeded

@bors-voyager bors-voyager bot merged commit c8cd197 into rust-lang:master Jan 4, 2018
@jtgeibel jtgeibel deleted the cargo-target-dir branch September 19, 2018 03:16
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
C-internal 🔧 Category: Nonessential work that would make the codebase more consistent or clear
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants