Skip to content

Commit

Permalink
fixup! ci: add a workflow to test custom MSYS2 runtimes
Browse files Browse the repository at this point in the history
  • Loading branch information
dscho committed Feb 13, 2024
1 parent dbcb422 commit 118a3dd
Showing 1 changed file with 17 additions and 12 deletions.
29 changes: 17 additions & 12 deletions .github/workflows/test-msys2-runtime.yml
Original file line number Diff line number Diff line change
Expand Up @@ -18,6 +18,8 @@ env:
jobs:
minimal-sdk-artifact:
runs-on: windows-latest
outputs:
git-artifacts-extract-location: ${{ steps.git-artifacts-extract-location.outputs.result }}
steps:
- name: get latest successful ci-artifacts run
id: ci-artifacts-run-id
Expand Down Expand Up @@ -68,21 +70,19 @@ jobs:
tar xzf ../git-sdk-64-minimal.tar.gz &&
unzip -qo ../msys2-runtime.zip &&
tar cvf - * .[0-9A-Za-z]* | gzip -1 >../git-sdk-64-minimal.tar.gz
- name: run `uname`
run: minimal-sdk\usr\bin\uname.exe -a
- name: adjust absolute paths in bin-wrappers/*
shell: bash
run: |
tar xf git-artifacts.tar.gz &&
from="$(sed -n 's|^GIT_EXEC_PATH='\''\(.*/git\)'\''$|\1|p' git/bin-wrappers/git)" &&
to="$(cygpath -au ../git)" &&
sed -i "s|$from|$to|g" git/bin-wrappers/* &&
tar czf git-artifacts.tar.gz git
- name: upload minimal-sdk artifact
uses: actions/upload-artifact@v4
with:
name: minimal-sdk
path: git-sdk-64-minimal.tar.gz
- name: run `uname`
run: minimal-sdk\usr\bin\uname.exe -a
- name: determine where `git-artifacts` want to be extracted
id: git-artifacts-extract-location
shell: bash
run: |
echo "result=$(tar Ox git-artifacts.tar.gz git/bin-wrappers/git |
sed -n 's|^GIT_EXEC_PATH='\''\(.*\)/git'\''$|\1|p')" >>$GITHUB_OUTPUT
- name: upload git artifacts for testing
uses: actions/upload-artifact@v4
with:
Expand Down Expand Up @@ -115,13 +115,17 @@ jobs:
path: ${{github.workspace}}
- name: uncompress git-artifacts
shell: bash
run: tar -C .. -xzf git-artifacts.tar.gz
env:
GIT_ARTIFACTS_EXTRACT_LOCATION: ${{ needs.minimal-sdk-artifact.outputs.git-artifacts-extract-location }}
run: |
mkdir -p "$GIT_ARTIFACTS_EXTRACT_LOCATION" &&
tar -C "$GIT_ARTIFACTS_EXTRACT_LOCATION" -xzf git-artifacts.tar.gz
- name: test
shell: bash
run: |
set -x
test "$(cygpath -aw /)" = "${{github.workspace}}\minimal-sdk" || exit 1
cd ../git/t &&
cd "$GIT_ARTIFACTS_EXTRACT_LOCATION"/git/t &&
make T="$(ls -S t[0-9]*.sh | awk '!((NR+${{matrix.nr}})%17)' | tr '\n' \ )" prove || {
for d in trash*
do
Expand All @@ -133,6 +137,7 @@ jobs:
exit 1
}
env:
GIT_ARTIFACTS_EXTRACT_LOCATION: ${{ needs.minimal-sdk-artifact.outputs.git-artifacts-extract-location }}
PATH: ${{github.workspace}}\minimal-sdk\mingw64\bin;${{github.workspace}}\minimal-sdk\usr\bin;${{github.workspace}}\minimal-sdk\usr\bin\core_perl;C:\Windows\system32;C:\Windows;C:\Windows\system32\wbem
GIT_TEST_OPTS: --verbose-log -x --no-chain-lint
GIT_PROVE_OPTS: --timer --jobs 8
Expand Down

0 comments on commit 118a3dd

Please sign in to comment.