Skip to content

Commit 891a363

Browse files
committed
ci: retire the busybox-w32 PR workaround for ash.exe
Until now, the workflow pulled `ash.exe` from an unmerged `busybox-w32` PR build because the `busybox.exe` shipped in the SDK was broken, and was separately also slow on account of being size-optimized. Both the correctness fix and a speed-optimized rebuild have since landed as a regular `mingw-w64-x86_64-busybox` package, so the in-flight workaround can go. I still assert a minimum installed version, because a stale SDK image could pin an older `busybox`, and I would much rather have CI fail loudly than silently run the test suite under a slow shell. Assisted-by: Opus 4.7 Signed-off-by: Johannes Schindelin <johannes.schindelin@gmx.de>
1 parent 1194f96 commit 891a363

1 file changed

Lines changed: 8 additions & 17 deletions

File tree

.github/workflows/main.yml

Lines changed: 8 additions & 17 deletions
Original file line numberDiff line numberDiff line change
@@ -149,26 +149,17 @@ jobs:
149149
shell: bash
150150
run: tar xf artifacts.tar.gz && tar xf tracked.tar.gz
151151
- uses: git-for-windows/setup-git-for-windows-sdk@v2
152-
- name: download BusyBox' ash.exe and use it as the POSIX shell
152+
- name: install BusyBox' ash.exe and use it as the POSIX shell
153153
if: matrix.use-busybox == true
154154
shell: bash
155-
env:
156-
GH_TOKEN: ${{ secrets.GITHUB_TOKEN }}
157155
run: |
158-
# TEMPORARY: pull the freshly-built, heap-corruption-fixed ash.exe
159-
# straight from the busybox-w32 PR build (git-for-windows/busybox-w32#15)
160-
# instead of the stale copy shipped in git-sdk-64. Once that fix is
161-
# released into the SDK this step reverts to the pinned download.
162-
run_id="$(gh run list -R git-for-windows/busybox-w32 \
163-
--branch fix-quote-arg-msys2-heap-corruption \
164-
--workflow build.yml --status success --limit 1 \
165-
--json databaseId --jq '.[0].databaseId')" &&
166-
test -n "$run_id" &&
167-
gh run download -R git-for-windows/busybox-w32 "$run_id" \
168-
-n busybox -D bb &&
169-
test -f bb/busybox.exe &&
170-
cp bb/busybox.exe /mingw64/bin/ash.exe &&
171-
ash="$(cygpath -am /mingw64/bin/ash.exe)" &&
156+
pacman -Sy --noconfirm &&
157+
pacman -S --noconfirm --needed mingw-w64-x86_64-busybox &&
158+
installed="$(pacman -Q mingw-w64-x86_64-busybox | awk '{print $2}')" &&
159+
echo "installed mingw-w64-x86_64-busybox: $installed" &&
160+
test "$(vercmp "$installed" 1.38.0.21234.d8d8bb397-1)" -ge 0 ||
161+
{ echo "::error::busybox $installed is older than required 1.38.0.21234.d8d8bb397-1 (missing the speed-optimized build); see https://github.com/git-for-windows/busybox-w32/pull/16"; exit 1; } &&
162+
ash="$(cygpath -am /mingw64/libexec/busybox/ash.exe)" &&
172163
echo "GIT_TEST_SHELL_PATH=$ash" >>$GITHUB_ENV &&
173164
echo "SHELL=$ash" >>$GITHUB_ENV &&
174165
echo "SHELL_PATH=$ash" >>$GITHUB_ENV &&

0 commit comments

Comments
 (0)