@@ -253,9 +253,88 @@ jobs:
253
253
with :
254
254
name : pkg-${{matrix.arch.name}}
255
255
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@v1
269
+ - name : Determine latest git-sdk-64-minimal build ID
270
+ id : determine-latest-git-sdk-64-minimal-build-id
271
+ shell : bash
272
+ run : |
273
+ urlbase=https://dev.azure.com/git-for-windows/git/_apis/build/builds
274
+ id=$(curl "$urlbase?definitions=22&statusFilter=completed&resultFilter=succeeded&\$top=1" |
275
+ jq -r '.value[0].id')
276
+
277
+ echo "Latest ID is ${id}"
278
+ echo "::set-output name=id::$id"
279
+ - name : Cache git-sdk-64-minimal
280
+ id : cache-git-sdk-64-minimal
281
+ uses : actions/cache@v2
282
+ with :
283
+ path : git-sdk-64-minimal
284
+ key : sdk-64-minimal-${{ steps.determine-latest-git-sdk-64-minimal-build-id.outputs.id }}
285
+ - name : download git-sdk-64-minimal
286
+ if : steps.cache-git-sdk-64-minimal.outputs.cache-hit != 'true'
287
+ shell : bash
288
+ run : |
289
+ ## Get artifact
290
+ urlbase=https://dev.azure.com/git-for-windows/git/_apis/build/builds
291
+ id=${{ steps.determine-latest-git-sdk-64-minimal-build-id.outputs.id }}
292
+ download_url="$(curl "$urlbase/$id/artifacts" |
293
+ jq -r '.value[] | select(.name == "git-sdk-64-minimal").resource.downloadUrl')"
294
+ curl --connect-timeout 10 --retry 5 --retry-delay 0 --retry-max-time 240 \
295
+ -o artifacts.zip "$download_url"
296
+ ## Unzip and remove the artifact
297
+ unzip artifacts.zip
298
+ rm artifacts.zip
299
+ - name : initialize vcpkg
300
+ uses : actions/checkout@v2
301
+ with :
302
+ repository : ' microsoft/vcpkg'
303
+ path : ' compat/vcbuild/vcpkg'
304
+ - name : download vcpkg artifacts
305
+ shell : powershell
306
+ run : |
307
+ $urlbase = "https://dev.azure.com/git/git/_apis/build/builds"
308
+ $id = ((Invoke-WebRequest -UseBasicParsing "${urlbase}?definitions=9&statusFilter=completed&resultFilter=succeeded&`$top=1").content | ConvertFrom-JSON).value[0].id
309
+ $downloadUrl = ((Invoke-WebRequest -UseBasicParsing "${urlbase}/$id/artifacts").content | ConvertFrom-JSON).value[0].resource.downloadUrl
310
+ (New-Object Net.WebClient).DownloadFile($downloadUrl, "compat.zip")
311
+ Expand-Archive compat.zip -DestinationPath . -Force
312
+ Remove-Item compat.zip
313
+ - name : add msbuild to PATH
314
+ uses : microsoft/setup-msbuild@v1
315
+ - name : copy dlls to root
316
+ shell : powershell
317
+ run : |
318
+ & compat\vcbuild\vcpkg_copy_dlls.bat release arm64-windows
319
+ if (!$?) { exit(1) }
320
+ - name : generate Visual Studio solution
321
+ shell : bash
322
+ run : |
323
+ cmake `pwd`/contrib/buildsystems/ -DCMAKE_PREFIX_PATH=`pwd`/compat/vcbuild/vcpkg/installed/arm64-windows \
324
+ -DMSGFMT_EXE=`pwd`/git-sdk-64-minimal/mingw64/bin/msgfmt.exe -DPERL_TESTS=OFF -DPYTHON_TESTS=OFF -DCURL_NO_CURL_CMAKE=ON -DCMAKE_GENERATOR_PLATFORM=arm64 -DVCPKG_ARCH=arm64-windows \
325
+ -DCMAKE_INSTALL_PREFIX="`pwd`/git-arm64"
326
+ - name : MSBuild
327
+ run : msbuild git.sln -property:Configuration=Release
328
+ - name : Link the Git executables
329
+ run : msbuild INSTALL.vcxproj -property:Configuration=Release
330
+ - name : upload build artifacts
331
+ uses : actions/upload-artifact@v1
332
+ with :
333
+ name : arm64-artifacts
334
+ path : ./git-arm64
256
335
artifacts :
257
336
runs-on : windows-latest
258
- needs : pkg
337
+ needs : [ pkg, build-arm64]
259
338
strategy :
260
339
matrix :
261
340
artifact :
@@ -275,8 +354,13 @@ jobs:
275
354
arch :
276
355
- name : x86_64
277
356
bitness : 64
357
+ arm64 : false
358
+ - name : i686
359
+ bitness : 32
360
+ arm64 : false
278
361
- name : i686
279
362
bitness : 32
363
+ arm64 : true
280
364
fail-fast : false
281
365
env :
282
366
MSYSTEM : MINGW${{matrix.arch.bitness}}
@@ -358,6 +442,12 @@ jobs:
358
442
359
443
## Unpack artifact
360
444
unzip artifacts.zip
445
+ - name : Download arm64 artifact
446
+ if : matrix.arch.arm64 == true
447
+ uses : actions/download-artifact@v1
448
+ with :
449
+ name : arm64-artifacts
450
+ path : ${{github.workspace}}/arm64
361
451
- name : Clone and update build-extra
362
452
if : env.SKIP != 'true'
363
453
shell : bash
@@ -388,7 +478,8 @@ jobs:
388
478
run : |
389
479
& .\git-sdk-${{matrix.arch.bitness}}-build-installers\usr\bin\bash.exe -lc @"
390
480
set -x
391
- /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 &&
481
+ [[ \"${{matrix.arch.arm64}}\" = true ]] && ARM64=\"--include-arm64-artifacts=\"`$PWD/arm64\"\" || ARM64=
482
+ /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 &&
392
483
if test portable = '${{matrix.artifact.name}}' && test -n \"`$(git config alias.signtool)\"
393
484
then
394
485
git signtool artifacts/PortableGit-*.exe
@@ -413,12 +504,20 @@ jobs:
413
504
if : always() && env.SKIP != 'true'
414
505
shell : bash
415
506
run : rm -rf home
507
+
416
508
- name : Publish ${{matrix.artifact.name}}-${{matrix.arch.name}}
417
- if : env.SKIP != 'true'
509
+ if : env.SKIP != 'true' && matrix.arch.arm64 != true
418
510
uses : actions/upload-artifact@v1
419
511
with :
420
512
name : ${{matrix.artifact.name}}-${{matrix.arch.name}}
421
513
path : artifacts
514
+
515
+ - name : Publish ${{matrix.artifact.name}}-arm64
516
+ if : env.SKIP != 'true' && matrix.arch.arm64 == true
517
+ uses : actions/upload-artifact@v1
518
+ with :
519
+ name : ${{matrix.artifact.name}}-arm64
520
+ path : artifacts
422
521
nuget :
423
522
runs-on : windows-latest
424
523
needs : pkg
0 commit comments