Skip to content

Commit 9eebd27

Browse files
committed
ci: also run the Windows test suite with BusyBox' ash
The BusyBox flavor of MinGit ships without an MSYS2 shell and instead points `core.shell` at BusyBox' `ash.exe`. To keep that configuration working, and as a step toward the longer-term goal of running Git for Windows' test suite faster by using BusyBox instead of the MSYS2 Bash, let's exercise the entire Windows test suite a second time using `ash` as the POSIX shell. This adds a `use-busybox` dimension to the `win test` matrix. The build artifacts are shared between the two legs; only the shell used to run the tests differs, so the extra coverage is comparatively cheap. The minimal Git for Windows SDK used in CI does not include the BusyBox applets, so `ash.exe` is fetched from the full SDK. It is then wired in via `GIT_TEST_SHELL_PATH` and `SHELL` (so that `git.exe` and the test framework's BUSYBOX prerequisite pick it up) as well as `SHELL_PATH` and `TEST_SHELL_PATH` (so that the test scripts themselves are run by it). Assisted-by: Opus 4.8 Signed-off-by: Johannes Schindelin <johannes.schindelin@gmx.de>
1 parent 1c1bf61 commit 9eebd27

1 file changed

Lines changed: 16 additions & 2 deletions

File tree

.github/workflows/main.yml

Lines changed: 16 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -135,8 +135,9 @@ jobs:
135135
fail-fast: false
136136
matrix:
137137
nr: [0, 1, 2, 3, 4, 5, 6, 7, 8, 9]
138+
use-busybox: [false, true]
138139
concurrency:
139-
group: windows-test-${{ matrix.nr }}-${{ github.ref }}
140+
group: windows-test-${{ matrix.nr }}-${{ matrix.use-busybox }}-${{ github.ref }}
140141
cancel-in-progress: ${{ needs.ci-config.outputs.skip_concurrent == 'yes' }}
141142
steps:
142143
- name: download tracked files and build artifacts
@@ -148,6 +149,19 @@ jobs:
148149
shell: bash
149150
run: tar xf artifacts.tar.gz && tar xf tracked.tar.gz
150151
- uses: git-for-windows/setup-git-for-windows-sdk@v2
152+
- name: download BusyBox' ash.exe and use it as the POSIX shell
153+
if: matrix.use-busybox == true
154+
shell: bash
155+
run: |
156+
curl -fLo /mingw64/bin/ash.exe \
157+
https://github.com/git-for-windows/git-sdk-64/raw/c7bf8b60df36106efa91fc0f68034bcef4896bfb/mingw64/libexec/busybox/ash.exe &&
158+
ash="$(cygpath -aw /mingw64/bin/ash.exe)" &&
159+
echo "GIT_TEST_SHELL_PATH=$ash" >>$GITHUB_ENV &&
160+
echo "SHELL=$ash" >>$GITHUB_ENV &&
161+
echo "SHELL_PATH=$ash" >>$GITHUB_ENV &&
162+
echo "TEST_SHELL_PATH=$ash" >>$GITHUB_ENV &&
163+
echo "SHELL_PATH=$ash" >>GIT-BUILD-OPTIONS &&
164+
echo "TEST_SHELL_PATH=$ash" >>GIT-BUILD-OPTIONS
151165
- name: test
152166
shell: bash
153167
run: . /etc/profile && ci/run-test-slice.sh $((${{matrix.nr}} + 1)) 10
@@ -159,7 +173,7 @@ jobs:
159173
if: failure() && env.FAILED_TEST_ARTIFACTS != ''
160174
uses: actions/upload-artifact@v7
161175
with:
162-
name: failed-tests-windows-${{ matrix.nr }}
176+
name: failed-tests-windows-${{ matrix.nr }}-${{ matrix.use-busybox }}
163177
path: ${{env.FAILED_TEST_ARTIFACTS}}
164178
vs-build:
165179
name: win+VS build

0 commit comments

Comments
 (0)