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

Prune some build artifacts on CI to speed up caching #1580

Merged
merged 5 commits into from
Dec 23, 2018

Conversation

jtgeibel
Copy link
Member

This script deletes final build artifacts, which are often large and
cannot be reused if any backend code has changed. Dependencies and
incremental artifacts are left in place.

This script deletes final build artifacts, which are often large and
cannot be reused if any backend code has changed.  Dependencies and
incremental artifacts are left in place.
@Eh2406
Copy link
Contributor

Eh2406 commented Dec 19, 2018

Looks to be a big savings, Nice fined!

Running `cargo test` produces a set of normal build artifacts in
addition to test versions of each.  (That is, running `cargo build`
after `cargo test` is a no-op.)  By removing the explicit `cargo build`
invocation the test dependencies can begin building in parallel a bit
sooner.
Building and uploading the cache now takes about 130 seconds on the
stable channel.  On beta and nightly it takes around 90 seconds.  The
cache on stable is larger because of additional clippy and npm files.

The caching behavior seems to be consistent enough to switch back to
the default setting of 180 seconds.
@jtgeibel jtgeibel changed the title [WIP] Prune some build artifacts on CI to speed up caching Prune some build artifacts on CI to speed up caching Dec 22, 2018
@jtgeibel
Copy link
Member Author

Looks to be a big savings

Thanks for the encouragement @Eh2406! Here is a summary of the results I'm seeing:

  • Stable:
    • The script reduces the size of target/ from 2.9G to 1.6G. (The extra ~200M relative to beta/nightly are for cargo clippy.)
    • Estimated compressed size of ~950M. (This includes $HOME/.npm as well. npm ci is not run on the other channels.)
    • Cache download and extract is down from 115s to 68s.
    • Cache build and upload is down from 195s to 126s. (Now under the default timeout is 180s.)
  • Beta and nightly:
    • The script reduces the size of target/ from 2.7 to 1.4G.
    • Estimated compressed size of ~700M each.
    • Cache download and extract is down from 77s to 44s.
    • Cache build and upload is down from 153s to 92s.

bors: r+

bors-voyager bot added a commit that referenced this pull request Dec 22, 2018
1580: Prune some build artifacts on CI to speed up caching r=jtgeibel a=jtgeibel

This script deletes final build artifacts, which are often large and
cannot be reused if any backend code has changed.  Dependencies and
incremental artifacts are left in place.

Co-authored-by: Justin Geibel <jtgeibel@gmail.com>
@bors-voyager
Copy link
Contributor

bors-voyager bot commented Dec 23, 2018

Build succeeded

@bors-voyager bors-voyager bot merged commit e37a650 into rust-lang:master Dec 23, 2018
@Eh2406
Copy link
Contributor

Eh2406 commented Dec 23, 2018

@jtgeibel It is not entirely altruistic. I am helping with / building tools to help clean out the target directory. It is lovely to have numbers (here and on #1578) to point to for why this is important work.

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