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

Use mdbook release binary #495

Merged
merged 1 commit into from
Jan 2, 2019
Merged

Conversation

RadicalZephyr
Copy link
Contributor

Travis has pretty good support for caching rust builds now by store the .cargo directory. This would enable this build to rebuild mdbook every time.

From my test, it looks like the average build time will go from ~10 minutes to ~1 minute.

The one potential downside to this is mdbook won't be rebuilt with new nightly versions of Rust. Presumably this doesn't matter though since the version of mdbook is pinned, and upgrading it would require running one build with cargo install --force --version =<new-version>, and then removing the --force again (otherwise it would always rebuild and thus remove the point of caching it). It doesn't seem like the version of mdbook is getting updated regularly though so this seems like it shouldn't be too big of a burden.

@RadicalZephyr
Copy link
Contributor Author

I just realized that it might be really important to build a new version of mdbook with each nightly to ensure that the code examples in the reference are being run against the new nightly, I'm not familiar with it's necessary to rebuild mdbook to make that happen. If that's the case feel free to just close this :)

@ehuss
Copy link
Contributor

ehuss commented Dec 31, 2018

I recently swapped cargo to use a pre-built package instead: rust-lang/cargo#6443. I think that works better than caching (much easier to change versions). mdbook shells out to rustdoc to run tests, so a single mdbook works with different toolchains.

@RadicalZephyr
Copy link
Contributor Author

Ah, that makes a lot of sense. Definitely easier to change :)

@RadicalZephyr RadicalZephyr changed the title Enable CI cache Use mdbook release binaries Dec 31, 2018
@RadicalZephyr RadicalZephyr changed the title Use mdbook release binaries Use mdbook release binary Dec 31, 2018
@ehuss ehuss merged commit 6112697 into rust-lang:master Jan 2, 2019
@ehuss
Copy link
Contributor

ehuss commented Jan 2, 2019

Thanks!

@RadicalZephyr RadicalZephyr deleted the enable-ci-cache branch January 4, 2019 06:36
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

Successfully merging this pull request may close these issues.

2 participants