@@ -253,9 +253,76 @@ jobs:
253
253
with :
254
254
name : pkg-${{matrix.arch.name}}
255
255
path : artifacts
256
+ build-arm64 :
257
+ needs : bundle-artifacts
258
+ env :
259
+ MSYSTEM : MINGW64
260
+ NO_PERL : 1
261
+ GIT_CONFIG_PARAMETERS : " 'user.name=CI' 'user.email=ci@git'"
262
+ runs-on : windows-latest
263
+ steps :
264
+ - uses : actions/checkout@v1
265
+ - name : Cache git-sdk-64-build-installers
266
+ id : cache-sdk-build-installers
267
+ uses : actions/cache@v2
268
+ with :
269
+ path : git-sdk-64-build-installers
270
+ key : build-installers-64-${{ needs.bundle-artifacts.outputs.latest-sdk64-extra-build-id }}
271
+ - name : Download git-sdk-64-build-installers
272
+ if : steps.cache-sdk-build-installers.outputs.cache-hit != 'true'
273
+ shell : bash
274
+ run : |
275
+ # Use Git Bash to download and unpack the artifact
276
+
277
+ ## Get artifact
278
+ urlbase=https://dev.azure.com/git-for-windows/git/_apis/build/builds
279
+ id=${{ needs.bundle-artifacts.outputs.latest-sdk64-extra-build-id }}
280
+ download_url=$(curl "$urlbase/$id/artifacts" |
281
+ jq -r '.value[] | select(.name == "git-sdk-64-build-installers").resource.downloadUrl')
282
+
283
+ curl -o artifacts.zip "$download_url"
284
+
285
+ ## Unpack artifact
286
+ unzip artifacts.zip
287
+ - name : initialize vcpkg
288
+ uses : actions/checkout@v2
289
+ with :
290
+ repository : ' microsoft/vcpkg'
291
+ path : ' compat/vcbuild/vcpkg'
292
+ - name : download vcpkg artifacts
293
+ shell : powershell
294
+ run : |
295
+ $urlbase = "https://dev.azure.com/git/git/_apis/build/builds"
296
+ $id = ((Invoke-WebRequest -UseBasicParsing "${urlbase}?definitions=9&statusFilter=completed&resultFilter=succeeded&`$top=1").content | ConvertFrom-JSON).value[0].id
297
+ $downloadUrl = ((Invoke-WebRequest -UseBasicParsing "${urlbase}/$id/artifacts").content | ConvertFrom-JSON).value[0].resource.downloadUrl
298
+ (New-Object Net.WebClient).DownloadFile($downloadUrl, "compat.zip")
299
+ Expand-Archive compat.zip -DestinationPath . -Force
300
+ Remove-Item compat.zip
301
+ - name : add msbuild to PATH
302
+ uses : microsoft/setup-msbuild@v1
303
+ - name : copy dlls to root
304
+ shell : powershell
305
+ run : |
306
+ & compat\vcbuild\vcpkg_copy_dlls.bat release arm64-windows
307
+ if (!$?) { exit(1) }
308
+ - name : generate Visual Studio solution
309
+ shell : bash
310
+ run : |
311
+ cmake `pwd`/contrib/buildsystems/ -DCMAKE_PREFIX_PATH=`pwd`/compat/vcbuild/vcpkg/installed/arm64-windows \
312
+ -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 \
313
+ -DCMAKE_INSTALL_PREFIX="`pwd`/git-arm64"
314
+ - name : MSBuild
315
+ run : msbuild git.sln -property:Configuration=Release
316
+ - name : Link the Git executables
317
+ run : msbuild INSTALL.vcxproj -property:Configuration=Release
318
+ - name : upload build artifacts
319
+ uses : actions/upload-artifact@v1
320
+ with :
321
+ name : arm64-artifacts
322
+ path : ./git-arm64
256
323
artifacts :
257
324
runs-on : windows-latest
258
- needs : pkg
325
+ needs : [ pkg, build-arm64]
259
326
strategy :
260
327
matrix :
261
328
artifact :
@@ -277,6 +344,15 @@ jobs:
277
344
bitness : 64
278
345
- name : i686
279
346
bitness : 32
347
+ - name : arm64
348
+ bitness : 32
349
+ exclude :
350
+ # Needs https://github.com/git-for-windows/build-extra/pull/326
351
+ - artifact :
352
+ name : installer
353
+ arch :
354
+ name : arm64
355
+ bitness : 32
280
356
fail-fast : false
281
357
env :
282
358
MSYSTEM : MINGW${{matrix.arch.bitness}}
@@ -289,12 +365,27 @@ jobs:
289
365
*" ${{matrix.artifact.name}} "*|*" ${{matrix.artifact.name}}-${{matrix.arch.name}} "*) ;; # build this artifact
290
366
*) echo "SKIP=true" >>$GITHUB_ENV;;
291
367
esac
368
+ - name : Configure user
369
+ shell : bash
370
+ run :
371
+ USER_NAME="${{github.actor}}" &&
372
+ USER_EMAIL="${{github.actor}}@users.noreply.github.com" &&
373
+ mkdir -p "$HOME" &&
374
+ git config --global user.name "$USER_NAME" &&
375
+ git config --global user.email "$USER_EMAIL" &&
376
+ echo "PACKAGER=$USER_NAME <$USER_EMAIL>" >>$GITHUB_ENV
292
377
- name : Download pkg-${{matrix.arch.name}}
293
- if : env.SKIP != 'true'
378
+ if : env.SKIP != 'true' && matrix.arch.name != 'arm64'
294
379
uses : actions/download-artifact@v1
295
380
with :
296
381
name : pkg-${{matrix.arch.name}}
297
382
path : pkg-${{matrix.arch.name}}
383
+ - name : Download pkg-i686
384
+ if : env.SKIP != 'true' && matrix.arch.name == 'arm64'
385
+ uses : actions/download-artifact@v1
386
+ with :
387
+ name : pkg-i686
388
+ path : pkg-i686
298
389
- name : Download bundle-artifacts
299
390
if : env.SKIP != 'true'
300
391
uses : actions/download-artifact@v1
@@ -324,6 +415,12 @@ jobs:
324
415
325
416
## Unpack artifact
326
417
unzip artifacts.zip
418
+ - name : Download arm64 artifact
419
+ if : matrix.arch.name == 'arm64'
420
+ uses : actions/download-artifact@v1
421
+ with :
422
+ name : arm64-artifacts
423
+ path : ${{github.workspace}}/arm64
327
424
- name : Determine latest git-sdk-32-extra-artifacts build ID
328
425
if : env.SKIP != 'true' && matrix.arch.bitness == '32'
329
426
id : determine-latest-sdk32-extra-build-id
@@ -383,7 +480,7 @@ jobs:
383
480
echo -n "$CODESIGN_PASS" >home/.sig/codesign.pass &&
384
481
git config --global alias.signtool '!sh "/usr/src/build-extra/signtool.sh"'
385
482
- name : Build ${{matrix.arch.bitness}}-bit ${{matrix.artifact.name}}
386
- if : env.SKIP != 'true'
483
+ if : env.SKIP != 'true' && matrix.arch.name != 'arm64'
387
484
shell : powershell
388
485
run : |
389
486
& .\git-sdk-${{matrix.arch.bitness}}-build-installers\usr\bin\bash.exe -lc @"
@@ -395,6 +492,20 @@ jobs:
395
492
fi &&
396
493
openssl dgst -sha256 artifacts/${{matrix.artifact.fileprefix}}-*.${{matrix.artifact.fileextension}} | sed \"s/.* //\" >artifacts/sha-256.txt
397
494
"@
495
+ # The ARM64 build uses the i686 package with some added ARM64 artifacts
496
+ - name : Build ARM64 ${{matrix.artifact.name}}
497
+ if : env.SKIP != 'true' && matrix.arch.name == 'arm64'
498
+ shell : powershell
499
+ run : |
500
+ & .\git-sdk-${{matrix.arch.bitness}}-build-installers\usr\bin\bash.exe -lc @"
501
+ set -x
502
+ /usr/src/build-extra/please.sh make_installers_from_mingw_w64_git --include-arm64-artifacts=\"`$PWD/arm64\" --version=`$(cat pkg-i686/ver) -o artifacts --${{matrix.artifact.name}} --pkg=pkg-i686/mingw-w64-i686-git-[0-9]*.tar.xz --pkg=pkg-i686/mingw-w64-i686-git-doc-html-[0-9]*.tar.xz &&
503
+ if test portable = '${{matrix.artifact.name}}' && test -n \"`$(git config alias.signtool)\"
504
+ then
505
+ git signtool artifacts/PortableGit-*.exe
506
+ fi &&
507
+ openssl dgst -sha256 artifacts/${{matrix.artifact.fileprefix}}-*.${{matrix.artifact.fileextension}} | sed \"s/.* //\" >artifacts/sha-256.txt
508
+ "@
398
509
- name : Copy package-versions and pdbs
399
510
if : env.SKIP != 'true' && matrix.artifact.name == 'installer'
400
511
shell : powershell
0 commit comments