Skip to content

Commit f143a5e

Browse files
authored
Merge pull request #25 from git-for-windows/fix-arm64-builds
build-and-deploy: several optimizations, mostly to facilitate arm64 workflows
2 parents c701662 + 8f2f906 commit f143a5e

File tree

1 file changed

+17
-11
lines changed

1 file changed

+17
-11
lines changed

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

Lines changed: 17 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -140,8 +140,6 @@ jobs:
140140
flavor: ${{ env.PACKAGE_TO_BUILD == 'mingw-w64-git' && 'build-installers' || 'full' }}
141141
architecture: ${{ env.ARCHITECTURE || 'x86_64' }}
142142
msys: ${{ env.REPO == 'MSYS2-packages' || env.PACKAGE_TO_BUILD == 'git-for-windows-keyring' }}
143-
# We only have to clean up on self-hosted runners
144-
cleanup: ${{ runner.arch == 'ARM64' && true || false }}
145143

146144
- name: Clone ${{ env.REPO }}
147145
shell: bash
@@ -250,9 +248,20 @@ jobs:
250248
dir="$(cygpath -au artifacts)" &&
251249
mkdir -p "$dir" &&
252250
251+
case "$ARCHITECTURE" in
252+
aarch64)
253+
GIT_EXE="/clangarm64/bin/git.exe"
254+
BUILD_SRC=
255+
;;
256+
*)
257+
GIT_EXE="/mingw64/bin/git.exe"
258+
BUILD_SRC="YesPlease"
259+
;;
260+
esac &&
261+
253262
{
254263
test -f /usr/bin/git ||
255-
printf '#!/bin/sh\n\nexec /mingw64/bin/git.exe "$@"\n' >/usr/bin/git
264+
printf '#!/bin/sh\n\nexec '$GIT_EXE' "$@"\n' >/usr/bin/git
256265
} &&
257266
258267
MINGW_ARCHS_TO_BUILD=$(
@@ -265,18 +274,15 @@ jobs:
265274
esac
266275
)
267276
268-
# No need to rebuild i686/x86_64 flavors when building the initial
269-
# arm64 versions of the wintoast/GCM packages
270-
test ebe6c944c573ee4d8900f0e015365468606c9e1e != "$REF" ||
271-
test "mingw32 mingw64 clangarm64" != "$MINGW_ARCHS_TO_BUILD" ||
272-
MINGW_ARCHS_TO_BUILD=clangarm64
273-
274277
cd "/usr/src/$REPO/$PACKAGE_TO_BUILD" &&
275278
MAKEFLAGS=-j6 PKGEXT='.pkg.tar.xz' MINGW_ARCH=$MINGW_ARCHS_TO_BUILD $MAKEPKG -s --noconfirm &&
276279
cp *.pkg.tar* "$dir/" &&
277280
278-
MAKEFLAGS=-j6 SRCEXT='.src.tar.gz' MINGW_ARCH=mingw64 $MAKEPKG --allsource &&
279-
cp *.src.tar* "$dir/" &&
281+
if test -n "$BUILD_SRC"
282+
then
283+
MAKEFLAGS=-j6 SRCEXT='.src.tar.gz' MINGW_ARCH=mingw64 $MAKEPKG --allsource &&
284+
cp *.src.tar* "$dir/"
285+
fi &&
280286
281287
# Ensure that the Git worktree is still clean
282288
ls -la &&

0 commit comments

Comments
 (0)