From 118a3dd0581df8323c51f7a96f559ecf08ed6b95 Mon Sep 17 00:00:00 2001 From: Johannes Schindelin Date: Tue, 13 Feb 2024 09:48:10 +0100 Subject: [PATCH] fixup! ci: add a workflow to test custom MSYS2 runtimes --- .github/workflows/test-msys2-runtime.yml | 29 ++++++++++++++---------- 1 file changed, 17 insertions(+), 12 deletions(-) diff --git a/.github/workflows/test-msys2-runtime.yml b/.github/workflows/test-msys2-runtime.yml index 7876d60f..a6d48914 100644 --- a/.github/workflows/test-msys2-runtime.yml +++ b/.github/workflows/test-msys2-runtime.yml @@ -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 @@ -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: @@ -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 @@ -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