Skip to content

Commit 763cd24

Browse files
dennisamelingdscho
authored andcommitted
ci(vs-build) also build Windows/ARM64 artifacts
There are no Windows/ARM64 agents in GitHub Actions yet, therefore we just skip adjusting the `vs-test` job for now. Signed-off-by: Dennis Ameling <[email protected]> Signed-off-by: Johannes Schindelin <[email protected]>
1 parent 2a87a2f commit 763cd24

File tree

1 file changed

+13
-6
lines changed

1 file changed

+13
-6
lines changed

.github/workflows/main.yml

Lines changed: 13 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -164,6 +164,9 @@ jobs:
164164
NO_PERL: 1
165165
GIT_CONFIG_PARAMETERS: "'user.name=CI' 'user.email=ci@git'"
166166
runs-on: windows-latest
167+
strategy:
168+
matrix:
169+
arch: [x64, arm64]
167170
steps:
168171
- uses: actions/checkout@v1
169172
- name: download git-sdk-64-minimal
@@ -182,6 +185,7 @@ jobs:
182185
unzip artifacts.zip
183186
rm artifacts.zip
184187
- name: download vcpkg artifacts
188+
if: matrix.arch == 'x64'
185189
shell: powershell
186190
run: |
187191
$urlbase = "https://dev.azure.com/git/git/_apis/build/builds"
@@ -190,20 +194,23 @@ jobs:
190194
(New-Object Net.WebClient).DownloadFile($downloadUrl, "compat.zip")
191195
Expand-Archive compat.zip -DestinationPath . -Force
192196
Remove-Item compat.zip
197+
- name: install vcpkg deps for arm64
198+
if: matrix.arch == 'arm64'
199+
run: .\compat\vcbuild\vcpkg_install.bat arm64-windows
193200
- name: add msbuild to PATH
194201
uses: microsoft/setup-msbuild@v1
195202
- name: copy dlls to root
196203
shell: powershell
197204
run: |
198-
& compat\vcbuild\vcpkg_copy_dlls.bat release
205+
& compat\vcbuild\vcpkg_copy_dlls.bat release ${{ matrix.arch }}-windows
199206
if (!$?) { exit(1) }
200207
- name: generate Visual Studio solution
201208
shell: bash
202209
run: |
203-
cmake `pwd`/contrib/buildsystems/ -DCMAKE_PREFIX_PATH=`pwd`/compat/vcbuild/vcpkg/installed/x64-windows \
204-
-DMSGFMT_EXE=`pwd`/git-sdk-64-minimal/mingw64/bin/msgfmt.exe -DPERL_TESTS=OFF -DPYTHON_TESTS=OFF -DCURL_NO_CURL_CMAKE=ON
210+
cmake `pwd`/contrib/buildsystems/ -DCMAKE_PREFIX_PATH=`pwd`/compat/vcbuild/vcpkg/installed/${{ matrix.arch }}-windows \
211+
-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=${{ matrix.arch }} -DVCPKG_ARCH=${{ matrix.arch }}-windows
205212
- name: MSBuild
206-
run: msbuild git.sln -property:Configuration=Release -property:Platform=x64 -maxCpuCount:4 -property:PlatformToolset=v142
213+
run: msbuild git.sln -property:Configuration=Release -property:Platform=${{ matrix.arch }} -maxCpuCount:4 -property:PlatformToolset=v142
207214
- name: bundle artifact tar
208215
shell: powershell
209216
env:
@@ -217,7 +224,7 @@ jobs:
217224
- name: upload build artifacts
218225
uses: actions/upload-artifact@v1
219226
with:
220-
name: vs-artifacts
227+
name: vs-artifacts-${{ matrix.arch }}
221228
path: artifacts
222229
vs-test:
223230
runs-on: windows-latest
@@ -235,7 +242,7 @@ jobs:
235242
- name: download build artifacts
236243
uses: actions/download-artifact@v1
237244
with:
238-
name: vs-artifacts
245+
name: vs-artifacts-x64
239246
path: ${{github.workspace}}
240247
- name: extract build artifacts
241248
shell: bash

0 commit comments

Comments
 (0)