-
Notifications
You must be signed in to change notification settings - Fork 1.6k
Minimize the size of clones in the CI #1513
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
StephanTLavavej
merged 6 commits into
microsoft:master
from
cbezault:sparse-checkout-llvm
Dec 17, 2020
Merged
Minimize the size of clones in the CI #1513
StephanTLavavej
merged 6 commits into
microsoft:master
from
cbezault:sparse-checkout-llvm
Dec 17, 2020
Conversation
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This comment has been minimized.
This comment has been minimized.
e7447e5 to
35d7c37
Compare
35d7c37 to
753b16b
Compare
CaseyCarter
approved these changes
Dec 10, 2020
StephanTLavavej
requested changes
Dec 11, 2020
StephanTLavavej
requested changes
Dec 12, 2020
StephanTLavavej
approved these changes
Dec 12, 2020
CaseyCarter
approved these changes
Dec 14, 2020
Member
|
Thanks for significantly accelerating PR/CI builds yet again, increasing the productivity of every contributor! 🚀 😻 |
This was referenced Dec 17, 2020
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Normally we clone the entirety of the
llvm-projectandvcpkgsubmodules. This includes getting the entirety of the history of each of these repositories as well as downloading/synthesizing all of the files in the repository.In general we have no interest in the history of these repositories when using them in the CI and, in the case of llvm-project, we have no need for the vast majority of the files.
In light of the above we are able to take advantage of both git's partial clone feature and sparse-checkout feature.
The partial clone/checkout is done with
--filter=tree:0to not include any git trees so that they get lazily fetched during the sparse-checkout and--depth=1to get the minimal amount of history (only the commit we care about).For llvm-project we initialize the repository for sparse-checkouts and then just pull in the required subdirectories.