Skip to content

Conversation

@cbezault
Copy link
Contributor

@cbezault cbezault commented Dec 2, 2020

Normally we clone the entirety of the llvm-project and vcpkg submodules. 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:0 to not include any git trees so that they get lazily fetched during the sparse-checkout and --depth=1 to 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.

@cbezault cbezault added the infrastructure Related to repository automation label Dec 2, 2020
@cbezault cbezault marked this pull request as ready for review December 2, 2020 17:14
@cbezault cbezault requested a review from a team as a code owner December 2, 2020 17:14
@cbezault cbezault changed the title Try sparse checkout Minimize the size of clones in the CI Dec 2, 2020
@StephanTLavavej

This comment has been minimized.

@cbezault cbezault force-pushed the sparse-checkout-llvm branch from 35d7c37 to 753b16b Compare December 9, 2020 22:30
@microsoft microsoft deleted a comment from azure-pipelines bot Dec 9, 2020
@microsoft microsoft deleted a comment from azure-pipelines bot Dec 9, 2020
@microsoft microsoft deleted a comment from azure-pipelines bot Dec 9, 2020
@CaseyCarter CaseyCarter removed their assignment Dec 10, 2020
@StephanTLavavej StephanTLavavej self-assigned this Dec 16, 2020
@StephanTLavavej StephanTLavavej merged commit 4bee6b7 into microsoft:master Dec 17, 2020
@StephanTLavavej
Copy link
Member

Thanks for significantly accelerating PR/CI builds yet again, increasing the productivity of every contributor! 🚀 😻

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

infrastructure Related to repository automation

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants