8989 with :
9090 name : bundle-artifacts
9191 path : bundle-artifacts
92- pkg-x86_64 :
92+ pkg :
9393 runs-on : windows-latest
9494 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 : ' '
95104 steps :
96105 - name : Configure user
97106 shell : bash
@@ -157,17 +166,17 @@ jobs:
157166 git config --global user.email "<${info#*<}"
158167 env :
159168 GPGKEY : ${{secrets.GPGKEY}}
160- - name : Build mingw-w64-x86_64 -git
169+ - name : Build mingw-w64-${{matrix.arch.name}} -git
161170 env :
162171 GPGKEY : " ${{secrets.GPGKEY}}"
163172 shell : powershell
164173 run : |
165174 & git-sdk-64-makepkg-git\usr\bin\sh.exe -lc @"
166175 set -x
167176 # 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}} \"
169178 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 &&
171180 cp bundle-artifacts/ver artifacts/ &&
172181 if test -n \"`$GPGKEY\"
173182 then
@@ -188,10 +197,10 @@ jobs:
188197 if : always()
189198 shell : bash
190199 run : rm -rf home
191- - name : Publish mingw-w64-x86_64 -git
200+ - name : Publish mingw-w64-${{matrix.arch.name}} -git
192201 uses : actions/upload-artifact@v1
193202 with :
194- name : pkg-x86_64
203+ name : pkg-${{matrix.arch.name}}
195204 path : artifacts
196205 artifacts :
197206 runs-on : windows-latest
@@ -214,21 +223,27 @@ jobs:
214223 - name : mingit-busybox
215224 fileprefix : MinGit
216225 fileextension : zip
226+ arch :
227+ - name : x86_64
228+ bitness : 64
229+ - name : i686
230+ bitness : 32
217231 fail-fast : false
218232 env :
219- MSYSTEM : MINGW64
233+ MSYSTEM : MINGW${{matrix.arch.bitness}}
220234 steps :
221- - name : Download pkg-x86_64
235+ - name : Download pkg-${{matrix.arch.name}}
222236 uses : actions/download-artifact@v1
223237 with :
224- name : pkg-x86_64
225- path : pkg-x86_64
238+ name : pkg-${{matrix.arch.name}}
239+ path : pkg-${{matrix.arch.name}}
226240 - name : Download bundle-artifacts
227241 uses : actions/download-artifact@v1
228242 with :
229243 name : bundle-artifacts
230244 path : bundle-artifacts
231245 - name : Download git-sdk-64-build-installers
246+ if : matrix.arch.bitness == '64'
232247 shell : bash
233248 run : |
234249 # Use Git Bash to download and unpack the artifact
@@ -241,12 +256,29 @@ jobs:
241256
242257 curl -o artifacts.zip "$download_url"
243258
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+
244276 ## Unpack artifact
245277 unzip artifacts.zip
246278 - name : Clone and update build-extra
247279 shell : bash
248280 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 &&
250282 git clone --single-branch -b main https://github.com/git-for-windows/build-extra $d &&
251283 git -C $d pull "$PWD"/bundle-artifacts/build-extra.bundle main
252284 - name : Prepare home directory for code-signing
@@ -260,12 +292,12 @@ jobs:
260292 echo -n "$CODESIGN_P12" | tr % '\n' | base64 -d >home/.sig/codesign.p12 &&
261293 echo -n "$CODESIGN_PASS" >home/.sig/codesign.pass &&
262294 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}}
264296 shell : powershell
265297 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 @"
267299 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 &&
269301 if test portable = '${{matrix.artifact.name}}' && test -n \"`$(git config alias.signtool)\"
270302 then
271303 git signtool artifacts/PortableGit-*.exe
@@ -276,22 +308,22 @@ jobs:
276308 if : matrix.artifact.name == 'installer'
277309 shell : powershell
278310 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 @"
280312 cp /usr/src/build-extra/installer/package-versions.txt artifacts/ &&
281313
282314 a=`$PWD/artifacts &&
283- p=`$PWD/pkg-x86_64 &&
315+ p=`$PWD/pkg-${{matrix.arch.name}} &&
284316 (cd /usr/src/build-extra &&
285317 mkdir -p cached-source-packages &&
286318 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)
288320 "@
289321 - name : Clean up temporary files
290322 if : always()
291323 shell : bash
292324 run : rm -rf home
293- - name : Publish ${{matrix.artifact.name}}-x86_64
325+ - name : Publish ${{matrix.artifact.name}}-${{matrix.arch.name}}
294326 uses : actions/upload-artifact@v1
295327 with :
296- name : ${{matrix.artifact.name}}-x86_64
328+ name : ${{matrix.artifact.name}}-${{matrix.arch.name}}
297329 path : artifacts
0 commit comments