Skip to content

Commit 628651c

Browse files
dennisamelingdscho
authored andcommitted
git-artifacts: add ARM64 artifacts
Adds ARM64 artifacts to the git-artifacts GitHub Action workflow. Signed-off-by: Dennis Ameling <[email protected]> Signed-off-by: Johannes Schindelin <[email protected]>
1 parent 781ed8c commit 628651c

File tree

1 file changed

+72
-3
lines changed

1 file changed

+72
-3
lines changed

.github/workflows/git-artifacts.yml

+72-3
Original file line numberDiff line numberDiff line change
@@ -253,9 +253,54 @@ jobs:
253253
with:
254254
name: pkg-${{matrix.arch.name}}
255255
path: artifacts
256+
build-arm64:
257+
needs: bundle-artifacts
258+
runs-on: windows-latest
259+
steps:
260+
- name: Configure user
261+
shell: bash
262+
run:
263+
USER_NAME="${{github.actor}}" &&
264+
USER_EMAIL="${{github.actor}}@users.noreply.github.com" &&
265+
mkdir -p "$HOME" &&
266+
git config --global user.name "$USER_NAME" &&
267+
git config --global user.email "$USER_EMAIL"
268+
- uses: actions/checkout@v2
269+
- name: initialize vcpkg
270+
uses: actions/checkout@v2
271+
with:
272+
repository: 'microsoft/vcpkg'
273+
path: 'compat/vcbuild/vcpkg'
274+
- name: download vcpkg artifacts
275+
uses: git-for-windows/get-azure-pipelines-artifact@v0
276+
with:
277+
repository: git/git
278+
definitionId: 9
279+
- name: add msbuild to PATH
280+
uses: microsoft/setup-msbuild@v1
281+
- name: copy dlls to root
282+
shell: powershell
283+
run: |
284+
& compat\vcbuild\vcpkg_copy_dlls.bat release arm64-windows
285+
if (!$?) { exit(1) }
286+
- name: generate Visual Studio solution
287+
shell: bash
288+
run: |
289+
cmake `pwd`/contrib/buildsystems/ -DCMAKE_PREFIX_PATH=`pwd`/compat/vcbuild/vcpkg/installed/arm64-windows \
290+
-DNO_GETTEXT=YesPlease -DPERL_TESTS=OFF -DPYTHON_TESTS=OFF -DCURL_NO_CURL_CMAKE=ON -DCMAKE_GENERATOR_PLATFORM=arm64 -DVCPKG_ARCH=arm64-windows \
291+
-DCMAKE_INSTALL_PREFIX="`pwd`/git-arm64"
292+
- name: MSBuild
293+
run: msbuild git.sln -property:Configuration=Release
294+
- name: Link the Git executables
295+
run: msbuild INSTALL.vcxproj -property:Configuration=Release
296+
- name: upload build artifacts
297+
uses: actions/upload-artifact@v1
298+
with:
299+
name: arm64-artifacts
300+
path: ./git-arm64
256301
artifacts:
257302
runs-on: windows-latest
258-
needs: pkg
303+
needs: [pkg, build-arm64]
259304
strategy:
260305
matrix:
261306
artifact:
@@ -277,8 +322,13 @@ jobs:
277322
arch:
278323
- name: x86_64
279324
bitness: 64
325+
arm64: false
280326
- name: i686
281327
bitness: 32
328+
arm64: false
329+
- name: i686
330+
bitness: 32
331+
arm64: true
282332
fail-fast: false
283333
env:
284334
MSYSTEM: MINGW${{matrix.arch.bitness}}
@@ -360,6 +410,12 @@ jobs:
360410
361411
## Unpack artifact
362412
unzip artifacts.zip
413+
- name: Download arm64 artifact
414+
if: env.SKIP != 'true' && matrix.arch.arm64 == true
415+
uses: actions/download-artifact@v1
416+
with:
417+
name: arm64-artifacts
418+
path: ${{github.workspace}}/arm64
363419
- name: Clone and update build-extra
364420
if: env.SKIP != 'true'
365421
shell: bash
@@ -390,7 +446,14 @@ jobs:
390446
run: |
391447
& .\git-sdk-${{matrix.arch.bitness}}-build-installers\usr\bin\bash.exe -lc @"
392448
set -x
393-
/usr/src/build-extra/please.sh make_installers_from_mingw_w64_git --version=`$(cat pkg-${{matrix.arch.name}}/ver) -o artifacts --${{matrix.artifact.name}} --pkg=pkg-${{matrix.arch.name}}/mingw-w64-${{matrix.arch.name}}-git-[0-9]*.tar.xz --pkg=pkg-${{matrix.arch.name}}/mingw-w64-${{matrix.arch.name}}-git-doc-html-[0-9]*.tar.xz &&
449+
if test "${{matrix.arch.arm64}}" = true
450+
then
451+
ARM64="--include-arm64-artifacts=\"$PWD/arm64\""
452+
else
453+
ARM64=
454+
fi
455+
456+
eval /usr/src/build-extra/please.sh make_installers_from_mingw_w64_git `$ARM64 --version=`$(cat pkg-${{matrix.arch.name}}/ver) -o artifacts --${{matrix.artifact.name}} --pkg=pkg-${{matrix.arch.name}}/mingw-w64-${{matrix.arch.name}}-git-[0-9]*.tar.xz --pkg=pkg-${{matrix.arch.name}}/mingw-w64-${{matrix.arch.name}}-git-doc-html-[0-9]*.tar.xz &&
394457
if test portable = '${{matrix.artifact.name}}' && test -n \"`$(git config alias.signtool)\"
395458
then
396459
git signtool artifacts/PortableGit-*.exe
@@ -416,11 +479,17 @@ jobs:
416479
shell: bash
417480
run: rm -rf home
418481
- name: Publish ${{matrix.artifact.name}}-${{matrix.arch.name}}
419-
if: env.SKIP != 'true'
482+
if: env.SKIP != 'true' && matrix.arch.arm64 != true
420483
uses: actions/upload-artifact@v1
421484
with:
422485
name: ${{matrix.artifact.name}}-${{matrix.arch.name}}
423486
path: artifacts
487+
- name: Publish ${{matrix.artifact.name}}-arm64
488+
if: env.SKIP != 'true' && matrix.arch.arm64 == true
489+
uses: actions/upload-artifact@v1
490+
with:
491+
name: ${{matrix.artifact.name}}-arm64
492+
path: artifacts
424493
nuget:
425494
runs-on: windows-latest
426495
needs: pkg

0 commit comments

Comments
 (0)