-
Notifications
You must be signed in to change notification settings - Fork 13.3k
Use --depth to speed up pristine submodule cloning #42665
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
Conversation
I expect this to save us 5-7min on OSX builds. |
src/ci/init_repo.sh
Outdated
|
||
travis_fold start update_cache | ||
travis_time_start | ||
|
||
# Update the cache (a pristine copy of the rust source master) | ||
if [ ! -d "$cache_src_dir/.git" ]; then | ||
retry sh -c "rm -rf $cache_src_dir && mkdir -p $cache_src_dir && \ | ||
git clone https://github.com/rust-lang/rust.git $cache_src_dir" | ||
git clone --depth 1 https://github.com/rust-lang/rust.git $cache_src_dir" | ||
fi | ||
retry sh -c "cd $cache_src_dir && git reset --hard && git pull" |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
git pull
here I think will make us no longer have a depth of 1 anyway, but I'm not sure. https://stackoverflow.com/questions/19352894/how-to-git-fetch-efficiently-from-a-shallow-clone
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Oops, I have some other changes I didn't push.
In addition, remove all the unused cache stuff
e8264a4
to
d0c1e64
Compare
I'll wait for Travis, but looks good to me overall. |
@bors r+ p=1 Setting higher priority since this helps with OS X timeouts (at least a little). Looks like this passed the cache stage in Travis. |
📌 Commit d0c1e64 has been approved by |
…acrum Use --depth to speed up pristine submodule cloning In addition, remove all the unused cache stuff r? @Mark-Simulacrum
☀️ Test successful - status-appveyor, status-travis |
In addition, remove all the unused cache stuff
r? @Mark-Simulacrum