Commit Graph

21 Commits

Author SHA1 Message Date
Johannes Schindelin
086f6f4ba4 Merge pull request #3076 from dennisameling/git-credential-manager-core-arm64
git-artifacts: add workaround for GCM Core on ARM64
2021-05-17 11:11:56 +02:00
Dennis Ameling
4bc2f4bec9 git-artifacts: add workaround for GCM Core on ARM64
Since there is no GCM Core for ARM64, let's just install a simple shell
script that calls the i686 version for now.

Signed-off-by: Dennis Ameling <dennis@dennisameling.com>
Signed-off-by: Johannes Schindelin <johannes.schindelin@gmx.de>
2021-05-17 11:11:44 +02:00
Johannes Schindelin
fd2a4e710c git-artifacts: Use the shiny new setup-git-for-windows-sdk Action
This simplifies the workflow dramatically.

Note that we have to reinstate that `/usr/bin/git` hack (a shell script
that simply redirects to `/mingw64/bin/git.exe`) in the `pkg` job
manually, since we no longer cache the `build-installers` artifact
_after_ installing that hack in `bundle-artifacts`.

Signed-off-by: Johannes Schindelin <johannes.schindelin@gmx.de>
2021-05-17 11:11:44 +02:00
Dennis Ameling
e728a680e3 git-artifacts: add ARM64 artifacts
Adds ARM64 artifacts to the git-artifacts GitHub Action workflow.

Signed-off-by: Dennis Ameling <dennis@dennisameling.com>
Signed-off-by: Johannes Schindelin <johannes.schindelin@gmx.de>
2021-05-17 11:11:44 +02:00
Johannes Schindelin
36d37130ec git-artifacts(build-arm64): build artifacts using the intended Git revision
We cannot just check out the current revision: The user might have
overridden `REPOSITORY` and `REF` via the workflow dispatch.

Signed-off-by: Johannes Schindelin <johannes.schindelin@gmx.de>
2021-05-17 11:11:44 +02:00
Johannes Schindelin
a1b83cf100 git-artifacts: mark all inputs as "not required"
This workflow needs to be triggered manually, and it offers to specify a
couple input parameters. But none of them are required. Make that
explicit.

Signed-off-by: Johannes Schindelin <johannes.schindelin@gmx.de>
2021-05-17 11:11:44 +02:00
Johannes Schindelin
27b85be93b git-artifacts: extend the SKIP logic to handle pkg and build-arm64
When the user asked for `installer-x86_64`, there is no point in
building `pkg-i686` or `build-arm64`; Let's be a bit smarter about this.

Signed-off-by: Johannes Schindelin <johannes.schindelin@gmx.de>
2021-05-17 11:11:44 +02:00
Johannes Schindelin
7ad9dea88f git-artifacts: fix BUILD_ONLY handling for ARM64
The workflow allows users to restrict what parts are being built. For
example, `installer-i686` will build only the 32-bit installer, not the
64-bit one nor any MinGit flavor.

However, this logic was not extended when introducing support for ARM64:
Instead, we _also_ built the ARM64 installer when the user asked for
`installer-i686`.

Let's allow restricting to `installer-i686` _without_ building the ARM64
version, and allow restricting to `installer-arm64` _just_ for the ARM64
version.

Signed-off-by: Johannes Schindelin <johannes.schindelin@gmx.de>
2021-05-17 11:11:44 +02:00
Johannes Schindelin
1ea380576c git-artifacts: use a narrower PATH
GitHub workflows run in agents that have quite a bit of stuff in their
`PATH`, e.g. Chocolatey. To make sure that those bits and pieces are
_not_ used to build the artifacts, let's whittle down the `PATH` to
contain the bare minimum.

Signed-off-by: Johannes Schindelin <johannes.schindelin@gmx.de>
2021-05-17 11:11:44 +02:00
Johannes Schindelin
8374862879 git-artifacts(arm64): avoid hard-linking the dashed built-ins
The archive and MinGit variants really get bloated because they handle
those as straight copies instead of hard-links.

Signed-off-by: Johannes Schindelin <johannes.schindelin@gmx.de>
2021-05-17 11:11:44 +02:00
Johannes Schindelin
fa0db7cdeb git-artifacts: use the cached build-installers instead of makepkg-git
When building the Pacman packages, we technically do not need the full
`build-installers` artifact (which is substantially larger than the
`makepkg-git` artifact). However, the former is already cached and
includes the latter's files. And it is _so_ much faster to download the
cached (larger) artifact than to download the smaller `makepkg-git`
artifact from Azure Pipelines.

Suggested-by: Dennis Ameling <dennis@dennisameling.com>
Signed-off-by: Johannes Schindelin <johannes.schindelin@gmx.de>
2021-05-17 11:11:43 +02:00
Dennis Ameling
552448283f git-artifacts: cache the build-installers artifact
It is a bit expensive to fetch just the git-sdk-64-build-installers
artifact from Azure Pipelines and then to unpack it (takes some 6-7
minutes, typically). Let's cache it if possible.

Signed-off-by: Dennis Ameling <dennis@dennisameling.com>
Signed-off-by: Johannes Schindelin <johannes.schindelin@gmx.de>
2021-05-17 11:11:43 +02:00
Johannes Schindelin
078b0ed393 git-artifacts: allow specifying repo/ref via workflow_dispatch
With this change, users can specify the branch and repository from which
they want to build Git for Windows' artifacts, via the `ref` and
`repository` inputs.

This allows e.g. building `refs/heads/seen` of `git/git` (even if no
`git-artifacts` workflow is configured in that repository), or
`refs/pull/<number>/merge` for a given Pull Request.

Signed-off-by: Johannes Schindelin <johannes.schindelin@gmx.de>
2021-05-17 11:11:43 +02:00
Johannes Schindelin
6b5e5d75f0 git-artifacts: allow restricting which artifacts are built
Users can now specify which artifacts they want to build, via the
`build_only` input, which is a space-separated list of artifacts. For
example, `installer portable` will build `installer-x86_64`,
`installer-i686`, `portable-x86_64` and `portable-i686`, and an empty or
unset value will build all artifacts.

Please note that the `mingw-w64-git` packages are built always, as it
would be tricky to figure out when they need to be built (for example,
`build_only=portable-x86_64` technically does not need `pkg-i686` to be
built, while `build_only=portable` does).

Signed-off-by: Johannes Schindelin <johannes.schindelin@gmx.de>
2021-05-17 11:11:43 +02:00
Johannes Schindelin
38041d56d1 git-artifacts: also build the nuget package
The two NuGet artifact exists only in the 64-bit version. So let's make
them in a separate, non-matrix job.

Signed-off-by: Johannes Schindelin <johannes.schindelin@gmx.de>
2021-05-17 11:11:43 +02:00
Johannes Schindelin
dcc4f98919 git-artifacts: also build 32-bit versions
Just in case that we need to generate those real quick.

Signed-off-by: Johannes Schindelin <johannes.schindelin@gmx.de>
2021-05-17 11:11:43 +02:00
Johannes Schindelin
2313162758 git-artifacts: also build portable, mingit and mingit-busybox
... because we can.

Signed-off-by: Johannes Schindelin <johannes.schindelin@gmx.de>
2021-05-17 11:11:43 +02:00
Johannes Schindelin
8843fff6de git-artifacts: also build the installer
While at it, we might just as well build the Git for Windows installer
;-)

Signed-off-by: Johannes Schindelin <johannes.schindelin@gmx.de>
2021-05-17 11:11:43 +02:00
Johannes Schindelin
fb3520640e git-artifacts: also code-sign, if configured via the secrets
When the secrets `CODESIGN_P12` and `CODESIGN_PASS` are set, the
workflow will now code-sign the `.exe` files contained in the package.

This should help with a few anti-malware programs, at least when the
certificate saw some action and gained trust.

Note: `CODESIGN_P12` needs to be generated via

	cat <certificate>.p12 | base64 | tr '\n' %

Signed-off-by: Johannes Schindelin <johannes.schindelin@gmx.de>
2021-05-17 11:11:43 +02:00
Johannes Schindelin
5560ec5d14 git-artifacts: if GPG secrets are available, use them
This expects the `GPGKEY` and `PRIVGPGKEY` secrets to be set in the
respective GitHub repository.

The `GPGKEY` value should be of the form

	<short-key> --passphrase <pass> --yes --batch --no-tty --pinentry-mode loopback --digest-algo SHA256

and the `PRIVGPGKEY` should be generated via

	gpg --export-secret-keys | base64 | tr '\n' %

Signed-off-by: Johannes Schindelin <johannes.schindelin@gmx.de>
2021-05-17 11:11:43 +02:00
Johannes Schindelin
93ac13cd70 Add a GitHub workflow to generate Git for Windows' Pacman package
Git for Windows uses MSYS2 as base system, and therefore the Git
binaries are bundled as Pacman package.

This workflow allows building the 64-bit version of this package (which
is called `mingw-w64-x86_64-git`).

Signed-off-by: Johannes Schindelin <johannes.schindelin@gmx.de>
2021-05-17 11:11:43 +02:00