Skip to content

Commit bbeea79

Browse files
committed
build-and-deploy: fix builds on arm64
Obviously, the git-sdk-arm64 doesn't have /mingw64/bin/git.exe. Building the source files using MINGW_ARCH=mingw64 also isn't going to work. Let's update the logic a bit to account for this scenario.
1 parent c701662 commit bbeea79

File tree

1 file changed

+17
-3
lines changed

1 file changed

+17
-3
lines changed

.github/workflows/build-and-deploy.yml

Lines changed: 17 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -250,9 +250,20 @@ jobs:
250250
dir="$(cygpath -au artifacts)" &&
251251
mkdir -p "$dir" &&
252252
253+
case "$ARCHITECTURE" in
254+
aarch64)
255+
GIT_EXE="/clangarm64/bin/git.exe"
256+
BUILD_SRC=
257+
;;
258+
*)
259+
GIT_EXE="/mingw64/bin/git.exe"
260+
BUILD_SRC="YesPlease"
261+
;;
262+
esac &&
263+
253264
{
254265
test -f /usr/bin/git ||
255-
printf '#!/bin/sh\n\nexec /mingw64/bin/git.exe "$@"\n' >/usr/bin/git
266+
printf '#!/bin/sh\n\nexec '$GIT_EXE' "$@"\n' >/usr/bin/git
256267
} &&
257268
258269
MINGW_ARCHS_TO_BUILD=$(
@@ -275,8 +286,11 @@ jobs:
275286
MAKEFLAGS=-j6 PKGEXT='.pkg.tar.xz' MINGW_ARCH=$MINGW_ARCHS_TO_BUILD $MAKEPKG -s --noconfirm &&
276287
cp *.pkg.tar* "$dir/" &&
277288
278-
MAKEFLAGS=-j6 SRCEXT='.src.tar.gz' MINGW_ARCH=mingw64 $MAKEPKG --allsource &&
279-
cp *.src.tar* "$dir/" &&
289+
if test -n "$BUILD_SRC"
290+
then
291+
MAKEFLAGS=-j6 SRCEXT='.src.tar.gz' MINGW_ARCH=mingw64 $MAKEPKG --allsource &&
292+
cp *.src.tar* "$dir/"
293+
fi &&
280294
281295
# Ensure that the Git worktree is still clean
282296
ls -la &&

0 commit comments

Comments
 (0)