-
Notifications
You must be signed in to change notification settings - Fork 17
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
Get the minimal
flavor from the ci-artifacts
GitHub Release
#965
Conversation
9c351a5
to
5a3cf09
Compare
As a result of recent changes, the Git SDK `ci-artifacts` are published as GitHub release assets now, including several variants of the minimal flavor of Git for Windows' SDK. This eliminates the need for us to clone the minimal SDK in this GitHub Action. Let's simply download the latest `.tar.gz` from the `ci-artifacts` and extract it. Note: As per the analysis in git-for-windows/git-sdk-64@fdb0cea37389, we use the native `tar.exe` to unpack the minimal SDK while it is downloaded, for maximal speed. The analysis also suggests to use the `.zip` file, as this results in the fastest operation when download speeds are above 6MB/second (which we hope will be reliably the case in GitHub Actions). However, we want to pipe the archive to `tar -xf -` while fetching, and it seems that for some reason `C:\Windows\system32\tar.exe` misses `.sparse/` and `etc/` when extracting `.zip` files from `stdin`, but the same is not true with `.tar.gz` files. So let's use the latter. See also: git-for-windows/git-sdk-64#87. Signed-off-by: Dennis Ameling <[email protected]> Signed-off-by: Johannes Schindelin <[email protected]>
Due to the fact that GitHub Release assets cannot be overwritten atomically, there is an off-chance that the asset we're looking for is not actually there. In those rare circumstances when we try to download such an asset while it has been deleted so that a new version can be uploaded, just wait a little and try again. Signed-off-by: Johannes Schindelin <[email protected]>
As downloading the minimal SDK is now so blazing fast, we can avoid caching it. This saves half a minute that we would otherwise spend on caching the artifact alone. Signed-off-by: Dennis Ameling <[email protected]> Signed-off-by: Johannes Schindelin <[email protected]>
Signed-off-by: Dennis Ameling <[email protected]>
5a3cf09
to
8bfbac8
Compare
minimal
flavor from the ci-artifacts
GitHub Release
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.
@dennisameling thank you so much for working on this! Sorry it took me so long.
I wanted to ensure a couple of things, and have implemented those now:
- When the
ci-artifacts
release is in the process of being updated, I want the Action to play nice and back off, then try again. - I want the downloaded archive to be extracted on the fly (why wait until the archive is downloaded entirely?)
- I wanted the code that accesses the
ci-artifacts
GitHub Release to be separate from the code that usesgit clone
, i.e. it should have different home thangit.ts
, and now it has. - I want the change to skip caching the
minimal
artifact to be separate from the rest so that it can be easily reverted.
It is still blazing fast, and there seems no need whatsoever to "un-skip caching". Exciting!
Range-diff relative to pre-force-push
Not sure how useful this is ;-) I guess it shows that I almost rewrote the patch... 😊 |
As a result of recent changes, the Git SDK
ci-artifacts
are published as GitHub release assets now. This eliminates the need for us to clone and cache the artifacts in this GitHub action.Let's simply download the latest
.tar.gz
from theci-artifacts
and extract it.Ref: git-for-windows/git-sdk-64@fdb0cea
Ref: git-for-windows/git-sdk-64#87