You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Much of what the `setup-git-for-windows-sdk` Action does is to download
an artifact (in a robust fashion, retrying a couple times if necessary)
and caching it.
This is useful for other things, too.
Let's transmogrify the Action that is rather specific for Git for
Windows' use case to allow downloading arbitrary artifacts from
arbitrary Azure Pipelines.
Signed-off-by: Johannes Schindelin <johannes.schindelin@gmx.de>
This Action supports several flavors (read: subsets) of the Git for Windows SDK that can be configured like this:
27
+
This Action needs to know in which repository the artifact lives. Example: [https://dev.azure.com/git/git/_build](https://dev.azure.com/git/git/_build) shows the Azure Pipelines of the `git/git` repository. It can be configured like this:
This is the most useful flavor to build Git for Windows' source code and run its own test suite. Only available for x86_64.
39
-
40
-
- `makepkg-git`:
41
-
42
-
This flavor allows packaging `mingw-w64-git`, the Pacman package. It is only available for x86_64 but can be used to "cross-compile" for i686.
43
-
44
-
- `build-installers`:
45
-
46
-
In addition to building `mingw-w64-git`, this flavor allows bundling Git for Windows' artifacts such as the installer and the Portable Git.
47
-
48
-
- `full`:
49
-
50
-
This is the "full" SDK, [as users would install it](https://gitforwindows.org/#download-sdk), with a pre-selected set of packages pre-installed. Additional packages can be installed via `pacman -S <package>`.
51
-
52
-
### CPU architecture support
53
-
54
-
Git for Windows SDK comes in variants targeting `x86_64` (AKA "64-bit") and `i686` (AKA 32-bit). The default is `x86_64` and can be overridden like this:
37
+
Every Azure Pipeline has a numerical identifier that is part of the URL. For example, the "Build sparse for Ubuntu" Pipeline in `git/git` at [https://dev.azure.com/git/git/_build?definitionId=10](https://dev.azure.com/git/git/_build?definitionId=10) has the identifier `10`. It needs to be configured via the `definitionId` key.
Please note that only the `build-installers` and the `full` flavors are available for `i686`.
45
+
### Artifact name
64
46
65
-
### Verbosity
47
+
Pipelines can have an arbitrary number of artifacts, which are identified by a name. The `artifact` parameter specifies which one to download. It can be omitted if the given Pipeline run has only one artifact attached to it.
66
48
67
-
By default, this Action prints a line whenever 250 items were extracted (this does not work for the `full` flavor, where this Action is silent by default). It can be overridden by setting the input parameter `verbose`; setting it to a number will show updates whenever that many items were extracted. Setting it to `false` will suppress progress updates. Setting it to `true` will print every extracted file (this also works for the `full` flavor).
49
+
### Output location
50
+
51
+
By default, the artifact files will be stored in the current directory. The `path` parameter can be used to override that.
52
+
53
+
This directory needs to be unless caching is turned off.
68
54
69
55
### Caching
70
56
71
57
To accelerate this Action, artifacts are cached once downloaded. This can be turned off by setting the input parameter `cache` to `false`.
72
58
73
-
In practice, caching the `full` artifacts does not provide much of a speed-up. Instead, it slows it down by adding several minutes during with the artifact is cached. Therefore, caching is disabled for the `full` artifacts by default, corresponding to `cache: auto`.
74
-
75
59
## Developing _this_ Action
76
60
77
61
> First, you'll need to have a reasonably modern version of `node` handy, such as Node 12.
@@ -92,26 +76,4 @@ Run the tests :heavy_check_mark:
92
76
93
77
```bash
94
78
$ npm test
95
-
96
-
> setup-git-for-windows-sdk@0.0.0 test C:\Users\me\setup-git-for-windows-sdk
0 commit comments