Skip to content

Commit 73ce178

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 4899f9d commit 73ce178

File tree

1 file changed

+76
-3
lines changed

1 file changed

+76
-3
lines changed

.github/workflows/git-artifacts.yml

Lines changed: 76 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -253,9 +253,58 @@ 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+
shell: powershell
276+
run: |
277+
$urlbase = "https://dev.azure.com/git/git/_apis/build/builds"
278+
$id = ((Invoke-WebRequest -UseBasicParsing "${urlbase}?definitions=9&statusFilter=completed&resultFilter=succeeded&`$top=1").content | ConvertFrom-JSON).value[0].id
279+
$downloadUrl = ((Invoke-WebRequest -UseBasicParsing "${urlbase}/$id/artifacts").content | ConvertFrom-JSON).value[0].resource.downloadUrl
280+
(New-Object Net.WebClient).DownloadFile($downloadUrl, "compat.zip")
281+
Expand-Archive compat.zip -DestinationPath . -Force
282+
Remove-Item compat.zip
283+
- name: add msbuild to PATH
284+
uses: microsoft/setup-msbuild@v1
285+
- name: copy dlls to root
286+
shell: powershell
287+
run: |
288+
& compat\vcbuild\vcpkg_copy_dlls.bat release arm64-windows
289+
if (!$?) { exit(1) }
290+
- name: generate Visual Studio solution
291+
shell: bash
292+
run: |
293+
cmake `pwd`/contrib/buildsystems/ -DCMAKE_PREFIX_PATH=`pwd`/compat/vcbuild/vcpkg/installed/arm64-windows \
294+
-DNO_GETTEXT=YesPlease -DPERL_TESTS=OFF -DPYTHON_TESTS=OFF -DCURL_NO_CURL_CMAKE=ON -DCMAKE_GENERATOR_PLATFORM=arm64 -DVCPKG_ARCH=arm64-windows \
295+
-DCMAKE_INSTALL_PREFIX="`pwd`/git-arm64"
296+
- name: MSBuild
297+
run: msbuild git.sln -property:Configuration=Release
298+
- name: Link the Git executables
299+
run: msbuild INSTALL.vcxproj -property:Configuration=Release
300+
- name: upload build artifacts
301+
uses: actions/upload-artifact@v1
302+
with:
303+
name: arm64-artifacts
304+
path: ./git-arm64
256305
artifacts:
257306
runs-on: windows-latest
258-
needs: pkg
307+
needs: [pkg, build-arm64]
259308
strategy:
260309
matrix:
261310
artifact:
@@ -277,8 +326,13 @@ jobs:
277326
arch:
278327
- name: x86_64
279328
bitness: 64
329+
arm64: false
280330
- name: i686
281331
bitness: 32
332+
arm64: false
333+
- name: i686
334+
bitness: 32
335+
arm64: true
282336
fail-fast: false
283337
env:
284338
MSYSTEM: MINGW${{matrix.arch.bitness}}
@@ -360,6 +414,12 @@ jobs:
360414
361415
## Unpack artifact
362416
unzip artifacts.zip
417+
- name: Download arm64 artifact
418+
if: env.SKIP != 'true' && matrix.arch.arm64 == true
419+
uses: actions/download-artifact@v1
420+
with:
421+
name: arm64-artifacts
422+
path: ${{github.workspace}}/arm64
363423
- name: Clone and update build-extra
364424
if: env.SKIP != 'true'
365425
shell: bash
@@ -390,7 +450,14 @@ jobs:
390450
run: |
391451
& .\git-sdk-${{matrix.arch.bitness}}-build-installers\usr\bin\bash.exe -lc @"
392452
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 &&
453+
if test "${{matrix.arch.arm64}}" = true
454+
then
455+
ARM64="--include-arm64-artifacts=\"$PWD/arm64\""
456+
else
457+
ARM64=
458+
fi
459+
460+
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 &&
394461
if test portable = '${{matrix.artifact.name}}' && test -n \"`$(git config alias.signtool)\"
395462
then
396463
git signtool artifacts/PortableGit-*.exe
@@ -416,11 +483,17 @@ jobs:
416483
shell: bash
417484
run: rm -rf home
418485
- name: Publish ${{matrix.artifact.name}}-${{matrix.arch.name}}
419-
if: env.SKIP != 'true'
486+
if: env.SKIP != 'true' && matrix.arch.arm64 != true
420487
uses: actions/upload-artifact@v1
421488
with:
422489
name: ${{matrix.artifact.name}}-${{matrix.arch.name}}
423490
path: artifacts
491+
- name: Publish ${{matrix.artifact.name}}-arm64
492+
if: env.SKIP != 'true' && matrix.arch.arm64 == true
493+
uses: actions/upload-artifact@v1
494+
with:
495+
name: ${{matrix.artifact.name}}-arm64
496+
path: artifacts
424497
nuget:
425498
runs-on: windows-latest
426499
needs: pkg

0 commit comments

Comments
 (0)