Skip to content

Commit 8ef99b3

Browse files
committed
ci(main): avoid using deprecated --bitness
Signed-off-by: Johannes Schindelin <[email protected]>
1 parent 15be1e2 commit 8ef99b3

File tree

1 file changed

+32
-15
lines changed

1 file changed

+32
-15
lines changed

.github/workflows/main.yml

Lines changed: 32 additions & 15 deletions
Original file line numberDiff line numberDiff line change
@@ -129,7 +129,7 @@ jobs:
129129
shell: bash
130130
run: |
131131
./please.sh create-sdk-artifact \
132-
--bitness=64 \
132+
--architecture=x86_64 \
133133
--sdk=.sdk \
134134
--out=sdk-artifact \
135135
build-installers &&
@@ -213,12 +213,28 @@ jobs:
213213
fail-fast: false
214214
matrix:
215215
artifact: ['minimal', 'makepkg-git', 'build-installers', 'full']
216-
bitness: ['32', '64']
216+
arch:
217+
- name: i686
218+
mingw-prefix: mingw32
219+
msystem: MINGW32
220+
sdk-repo: git-sdk-32
221+
- name: x86_64
222+
mingw-prefix: mingw64
223+
msystem: MINGW64
224+
sdk-repo: git-sdk-64
217225
exclude:
218226
- artifact: minimal
219-
bitness: 32
227+
arch:
228+
name: i686
229+
mingw-prefix: mingw32
230+
msystem: MINGW32
231+
sdk-repo: git-sdk-32
220232
- artifact: makepkg-git
221-
bitness: 32
233+
arch:
234+
name: i686
235+
mingw-prefix: mingw32
236+
msystem: MINGW32
237+
sdk-repo: git-sdk-32
222238
steps:
223239
- uses: actions/checkout@v4
224240
- name: initialize bare SDK clone
@@ -229,7 +245,7 @@ jobs:
229245
*) partial=--filter=blob:none;;
230246
esac &&
231247
git clone --bare --depth=1 --single-branch --branch=main $partial \
232-
https://github.com/git-for-windows/git-sdk-${{ matrix.bitness }} .sdk
248+
https://github.com/git-for-windows/${{ matrix.arch.sdk-repo }} .sdk
233249
- name: build ${{ matrix.artifact }} artifact
234250
id: build-artifact
235251
shell: bash
@@ -240,7 +256,7 @@ jobs:
240256
;;
241257
*)
242258
./please.sh create-sdk-artifact \
243-
--bitness=${{ matrix.bitness }} \
259+
--architecture=${{ matrix.arch.name }} \
244260
--sdk=.sdk \
245261
--out=sdk-artifact \
246262
${{ matrix.artifact }}
@@ -249,34 +265,35 @@ jobs:
249265
echo "git-version=$(sdk-artifact/cmd/git.exe version)" >>$GITHUB_OUTPUT &&
250266
cygpath -aw "$PWD/sdk-artifact/usr/bin/core_perl" >>$GITHUB_PATH &&
251267
cygpath -aw "$PWD/sdk-artifact/usr/bin" >>$GITHUB_PATH &&
252-
cygpath -aw "$PWD/sdk-artifact/mingw${{ matrix.bitness }}/bin" >>$GITHUB_PATH &&
253-
echo "MSYSTEM=MINGW${{ matrix.bitness }}" >>$GITHUB_ENV
268+
cygpath -aw "$PWD/sdk-artifact/${{ matrix.arch.mingw-prefix }}/bin" >>$GITHUB_PATH &&
269+
echo "MSYSTEM=${{ matrix.arch.msystem }}" >>$GITHUB_ENV &&
270+
cat $GITHUB_PATH
254271
- name: build installer
255272
if: matrix.artifact == 'build-installers'
256273
shell: bash
257-
run: ./installer/release.sh --include-self-check --output=$PWD/installer-${{ matrix.bitness }} 0-test
274+
run: ./installer/release.sh --include-self-check --output=$PWD/installer-${{ matrix.arch.name }} 0-test
258275
- uses: actions/upload-artifact@v4
259276
if: matrix.artifact == 'build-installers'
260277
with:
261-
name: installer-${{ matrix.bitness }}
262-
path: installer-${{ matrix.bitness }}
278+
name: installer-${{ matrix.arch.name }}
279+
path: installer-${{ matrix.arch.name }}
263280
- name: run the installer
264281
if: matrix.artifact == 'build-installers'
265282
shell: pwsh
266283
run: |
267-
$exePath = Get-ChildItem -Path installer-${{ matrix.bitness }}/*.exe | %{$_.FullName}
284+
$exePath = Get-ChildItem -Path installer-${{ matrix.arch.name }}/*.exe | %{$_.FullName}
268285
$installer = Start-Process -PassThru -Wait -FilePath "$exePath" -ArgumentList "/SILENT /VERYSILENT /NORESTART /SUPPRESSMSGBOXES /ALLOWDOWNGRADE=1 /ALLOWINSTALLING32ON64=1 /LOG=installer.log"
269286
$exitCode = $installer.ExitCode
270287
if ($exitCode -ne 0) {
271288
Write-Host "::error::Installer failed with exit code $exitCode!"
272289
exit 1
273290
}
274-
if ("${{ matrix.bitness }}" -eq 32) {
291+
if ("${{ matrix.arch.name }}" -eq "i686") {
275292
"${env:ProgramFiles(x86)}\Git\usr\bin" | Out-File -Encoding ascii -Append $env:GITHUB_PATH
276-
"${env:ProgramFiles(x86)}\Git\mingw32\bin" | Out-File -Encoding ascii -Append $env:GITHUB_PATH
293+
"${env:ProgramFiles(x86)}\Git\${{ matrix.arch.mingw-prefix }}\bin" | Out-File -Encoding ascii -Append $env:GITHUB_PATH
277294
} else {
278295
"$env:ProgramFiles\Git\usr\bin" | Out-File -Encoding ascii -Append $env:GITHUB_PATH
279-
"$env:ProgramFiles\Git\mingw${{ matrix.bitness }}\bin" | Out-File -Encoding ascii -Append $env:GITHUB_PATH
296+
"$env:ProgramFiles\Git\${{ matrix.arch.mingw-prefix }}\bin" | Out-File -Encoding ascii -Append $env:GITHUB_PATH
280297
}
281298
- name: show installer log
282299
# run this even if the installation failed (actually, _in particular_ when the installation failed)

0 commit comments

Comments
 (0)