89
89
with :
90
90
name : bundle-artifacts
91
91
path : bundle-artifacts
92
- pkg-x86_64 :
92
+ pkg :
93
93
runs-on : windows-latest
94
94
needs : bundle-artifacts
95
+ strategy :
96
+ matrix :
97
+ arch :
98
+ - name : x86_64
99
+ bitness : 64
100
+ bin : /amd64
101
+ - name : i686
102
+ bitness : 32
103
+ bin : ' '
95
104
steps :
96
105
- name : Configure user
97
106
shell : bash
@@ -157,17 +166,17 @@ jobs:
157
166
git config --global user.email "<${info#*<}"
158
167
env :
159
168
GPGKEY : ${{secrets.GPGKEY}}
160
- - name : Build mingw-w64-x86_64 -git
169
+ - name : Build mingw-w64-${{matrix.arch.name}} -git
161
170
env :
162
171
GPGKEY : " ${{secrets.GPGKEY}}"
163
172
shell : powershell
164
173
run : |
165
174
& git-sdk-64-makepkg-git\usr\bin\sh.exe -lc @"
166
175
set -x
167
176
# Let `cv2pdb` find the DLLs
168
- PATH=\"`$PATH:/c/Program Files/Microsoft Visual Studio/2022/Enterprise/Common7/IDE/:/C/Program Files (x86)/Microsoft Visual Studio 14.0/VC/bin/amd64 \"
177
+ PATH=\"`$PATH:/c/Program Files/Microsoft Visual Studio/2022/Enterprise/Common7/IDE/:/C/Program Files (x86)/Microsoft Visual Studio 14.0/VC/bin${{matrix.arch.bin}} \"
169
178
type -p mspdb140.dll || exit 1
170
- sh -x /usr/src/build-extra/please.sh build-mingw-w64-git --only-64 -bit --build-src-pkg -o artifacts HEAD &&
179
+ sh -x /usr/src/build-extra/please.sh build-mingw-w64-git --only-${{matrix.arch.bitness}} -bit --build-src-pkg -o artifacts HEAD &&
171
180
cp bundle-artifacts/ver artifacts/ &&
172
181
if test -n \"`$GPGKEY\"
173
182
then
@@ -188,10 +197,10 @@ jobs:
188
197
if : always()
189
198
shell : bash
190
199
run : rm -rf home
191
- - name : Publish mingw-w64-x86_64 -git
200
+ - name : Publish mingw-w64-${{matrix.arch.name}} -git
192
201
uses : actions/upload-artifact@v1
193
202
with :
194
- name : pkg-x86_64
203
+ name : pkg-${{matrix.arch.name}}
195
204
path : artifacts
196
205
artifacts :
197
206
runs-on : windows-latest
@@ -214,21 +223,27 @@ jobs:
214
223
- name : mingit-busybox
215
224
fileprefix : MinGit
216
225
fileextension : zip
226
+ arch :
227
+ - name : x86_64
228
+ bitness : 64
229
+ - name : i686
230
+ bitness : 32
217
231
fail-fast : false
218
232
env :
219
- MSYSTEM : MINGW64
233
+ MSYSTEM : MINGW${{matrix.arch.bitness}}
220
234
steps :
221
- - name : Download pkg-x86_64
235
+ - name : Download pkg-${{matrix.arch.name}}
222
236
uses : actions/download-artifact@v1
223
237
with :
224
- name : pkg-x86_64
225
- path : pkg-x86_64
238
+ name : pkg-${{matrix.arch.name}}
239
+ path : pkg-${{matrix.arch.name}}
226
240
- name : Download bundle-artifacts
227
241
uses : actions/download-artifact@v1
228
242
with :
229
243
name : bundle-artifacts
230
244
path : bundle-artifacts
231
245
- name : Download git-sdk-64-build-installers
246
+ if : matrix.arch.bitness == '64'
232
247
shell : bash
233
248
run : |
234
249
# Use Git Bash to download and unpack the artifact
@@ -241,12 +256,29 @@ jobs:
241
256
242
257
curl -o artifacts.zip "$download_url"
243
258
259
+ ## Unpack artifact
260
+ unzip artifacts.zip
261
+ - name : Download git-sdk-32-build-installers
262
+ if : matrix.arch.bitness == '32'
263
+ shell : bash
264
+ run : |
265
+ # Use Git Bash to download and unpack the artifact
266
+
267
+ ## Get artifact
268
+ urlbase=https://dev.azure.com/git-for-windows/git/_apis/build/builds
269
+ id=$(curl "$urlbase?definitions=30&statusFilter=completed&resultFilter=succeeded&\$top=1" |
270
+ jq -r '.value[0].id')
271
+ download_url=$(curl "$urlbase/$id/artifacts" |
272
+ jq -r '.value[] | select(.name == "git-sdk-32-build-installers").resource.downloadUrl')
273
+
274
+ curl -o artifacts.zip "$download_url"
275
+
244
276
## Unpack artifact
245
277
unzip artifacts.zip
246
278
- name : Clone and update build-extra
247
279
shell : bash
248
280
run : |
249
- d=git-sdk-64 -build-installers/usr/src/build-extra &&
281
+ d=git-sdk-${{matrix.arch.bitness}} -build-installers/usr/src/build-extra &&
250
282
git clone --single-branch -b main https://github.com/git-for-windows/build-extra $d &&
251
283
git -C $d pull "$PWD"/bundle-artifacts/build-extra.bundle main
252
284
- name : Prepare home directory for code-signing
@@ -260,12 +292,12 @@ jobs:
260
292
echo -n "$CODESIGN_P12" | tr % '\n' | base64 -d >home/.sig/codesign.p12 &&
261
293
echo -n "$CODESIGN_PASS" >home/.sig/codesign.pass &&
262
294
git config --global alias.signtool '!sh "/usr/src/build-extra/signtool.sh"'
263
- - name : Build 64 -bit ${{matrix.artifact.name}}
295
+ - name : Build ${{matrix.arch.bitness}} -bit ${{matrix.artifact.name}}
264
296
shell : powershell
265
297
run : |
266
- & .\git-sdk-64 -build-installers\usr\bin\bash.exe -lc @"
298
+ & .\git-sdk-${{matrix.arch.bitness}} -build-installers\usr\bin\bash.exe -lc @"
267
299
set -x
268
- /usr/src/build-extra/please.sh make_installers_from_mingw_w64_git --version=`$(cat pkg-x86_64 /ver) -o artifacts --${{matrix.artifact.name}} --pkg=pkg-x86_64 /mingw-w64-x86_64 -git-[0-9]*.tar.xz --pkg=pkg-x86_64 /mingw-w64-x86_64 -git-doc-html-[0-9]*.tar.xz &&
300
+ /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 &&
269
301
if test portable = '${{matrix.artifact.name}}' && test -n \"`$(git config alias.signtool)\"
270
302
then
271
303
git signtool artifacts/PortableGit-*.exe
@@ -276,22 +308,22 @@ jobs:
276
308
if : matrix.artifact.name == 'installer'
277
309
shell : powershell
278
310
run : |
279
- & .\git-sdk-64 -build-installers\usr\bin\bash.exe -lc @"
311
+ & .\git-sdk-${{matrix.arch.bitness}} -build-installers\usr\bin\bash.exe -lc @"
280
312
cp /usr/src/build-extra/installer/package-versions.txt artifacts/ &&
281
313
282
314
a=`$PWD/artifacts &&
283
- p=`$PWD/pkg-x86_64 &&
315
+ p=`$PWD/pkg-${{matrix.arch.name}} &&
284
316
(cd /usr/src/build-extra &&
285
317
mkdir -p cached-source-packages &&
286
318
cp \"`$p\"/*-pdb* cached-source-packages/ &&
287
- GIT_CONFIG_PARAMETERS=\"'windows.sdk64. path='\" ./please.sh bundle_pdbs --arch=x86_64 --directory=\"`$a\" installer/package-versions.txt)
319
+ GIT_CONFIG_PARAMETERS=\"'windows.sdk${{matrix.arch.bitness}}. path='\" ./please.sh bundle_pdbs --arch=${{matrix.arch.name}} --directory=\"`$a\" installer/package-versions.txt)
288
320
"@
289
321
- name : Clean up temporary files
290
322
if : always()
291
323
shell : bash
292
324
run : rm -rf home
293
- - name : Publish ${{matrix.artifact.name}}-x86_64
325
+ - name : Publish ${{matrix.artifact.name}}-${{matrix.arch.name}}
294
326
uses : actions/upload-artifact@v1
295
327
with :
296
- name : ${{matrix.artifact.name}}-x86_64
328
+ name : ${{matrix.artifact.name}}-${{matrix.arch.name}}
297
329
path : artifacts
0 commit comments