Skip to content

Commit e31a706

Browse files
committed
Merge pull request #3017 from dennisameling/add-arm64-artifacts
git-artifacts: add ARM64 artifacts
2 parents a1bd06a + ab950ae commit e31a706

File tree

1 file changed

+72
-3
lines changed

1 file changed

+72
-3
lines changed

.github/workflows/git-artifacts.yml

Lines changed: 72 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:
@@ -275,8 +324,13 @@ jobs:
275324
arch:
276325
- name: x86_64
277326
bitness: 64
327+
arm64: false
278328
- name: i686
279329
bitness: 32
330+
arm64: false
331+
- name: i686
332+
bitness: 32
333+
arm64: true
280334
fail-fast: false
281335
env:
282336
MSYSTEM: MINGW${{matrix.arch.bitness}}
@@ -358,6 +412,12 @@ jobs:
358412
359413
## Unpack artifact
360414
unzip artifacts.zip
415+
- name: Download arm64 artifact
416+
if: matrix.arch.arm64 == true
417+
uses: actions/download-artifact@v1
418+
with:
419+
name: arm64-artifacts
420+
path: ${{github.workspace}}/arm64
361421
- name: Clone and update build-extra
362422
if: env.SKIP != 'true'
363423
shell: bash
@@ -388,7 +448,8 @@ jobs:
388448
run: |
389449
& .\git-sdk-${{matrix.arch.bitness}}-build-installers\usr\bin\bash.exe -lc @"
390450
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 &&
451+
[[ \"${{matrix.arch.arm64}}\" = true ]] && ARM64=\"--include-arm64-artifacts=\\\"`$PWD/arm64\\\"\" || ARM64=
452+
/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 &&
392453
if test portable = '${{matrix.artifact.name}}' && test -n \"`$(git config alias.signtool)\"
393454
then
394455
git signtool artifacts/PortableGit-*.exe
@@ -413,12 +474,20 @@ jobs:
413474
if: always() && env.SKIP != 'true'
414475
shell: bash
415476
run: rm -rf home
477+
416478
- name: Publish ${{matrix.artifact.name}}-${{matrix.arch.name}}
417-
if: env.SKIP != 'true'
479+
if: env.SKIP != 'true' && matrix.arch.arm64 != true
418480
uses: actions/upload-artifact@v1
419481
with:
420482
name: ${{matrix.artifact.name}}-${{matrix.arch.name}}
421483
path: artifacts
484+
485+
- name: Publish ${{matrix.artifact.name}}-arm64
486+
if: env.SKIP != 'true' && matrix.arch.arm64 == true
487+
uses: actions/upload-artifact@v1
488+
with:
489+
name: ${{matrix.artifact.name}}-arm64
490+
path: artifacts
422491
nuget:
423492
runs-on: windows-latest
424493
needs: pkg

0 commit comments

Comments
 (0)