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

ci: use treeless clone instead of actions/checkout #41130

Merged
merged 3 commits into from Dec 21, 2022

Conversation

classabbyamp
Copy link
Member

@classabbyamp classabbyamp commented Dec 16, 2022

Summary:

  • use treeless fetches instead of --depth
    • this is not supported by actions/checkout, so it was implemented as a short script (staying with actions/checkout@v1 does not seem like a good idea because of its age, and updating to actions/checkout@v3 would require adding libstdc++ to any CI workflows that run in void containers because of node's requirements)
  • This applies to the build and cycles CI workflows, and some additional cleanups were applied to the cycles workflow
    • it can't be implemented as a script in common/travis/ because the repo doesn't exist on the runner (yet!)
  • changed_templates.sh had a small logic change, because we now have the complete commit history instead of just --depth=200. This preserves the 200 commit limit with a slightly-enhanced error message (wording clarified and it now shows up as an error annotation)
  • fetch_upstream.sh is no longer needed now that the checkout script fetches the entire commit history of master and the PR branch

Testing the changes

@classabbyamp classabbyamp force-pushed the ci/treeless-clone branch 5 times, most recently from e6b5f1e to 01ad15d Compare December 16, 2022 12:04
uses treeless fetches instead of `--depth`. This is not supported by
`actions/checkout`, so it was implemented as a short script (staying
with `actions/checkout@v1` does not seem like a good idea because of
its age, and updating to `actions/checkout@v3` would require adding
`libstdc++` to any CI workflows that run in void containers because
of node's requirements)

see also: https://github.blog/2020-12-21-get-up-to-speed-with-partial-clone-and-shallow-clone/

this can't be implemented as a script in `common/travis/` because the
repo doesn't exist on the runner (yet!)

also fix indentation in cycle check
no longer needed now that the checkout script fetches the entire
commit history of master and the PR branch
small logic change because we now have the complete commit history instead
of just `--depth=200`. This preserves the 200 commit limit with a slightly-
enhanced error message (wording clarified and it now shows up as an error
annotation)
@classabbyamp classabbyamp marked this pull request as ready for review December 16, 2022 12:25
@classabbyamp classabbyamp merged commit c1dc168 into void-linux:master Dec 21, 2022
@classabbyamp classabbyamp deleted the ci/treeless-clone branch December 21, 2022 06:15
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.

None yet

2 participants