Skip to content

Commit a3ee609

Browse files
committed
DEBUG: verify that the newly-patched MSYS2 runtime works around the Windows/ARM64 deadlocks
I updated git-for-windows/msys2-runtime#73 to build the newest iteration of the dead-lock workaround, which worked 100% in my tests. Let's verify that it works around the issues in `update-via-pacman.ps1`, too. Signed-off-by: Johannes Schindelin <[email protected]>
1 parent 87ec58c commit a3ee609

File tree

1 file changed

+46
-7
lines changed

1 file changed

+46
-7
lines changed

.github/workflows/sync.yml

Lines changed: 46 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -1,13 +1,7 @@
11
name: sync
22

33
on:
4-
schedule:
5-
- cron: "57 2 * * *"
6-
workflow_dispatch:
7-
inputs:
8-
debug_with_ssh_key:
9-
description: 'Public SSH key to use to debug failures'
10-
required: false
4+
push:
115

126
env:
137
GIT_CONFIG_PARAMETERS: "'user.name=Git for Windows Build Agent' '[email protected]' 'windows.sdk64.path=${{ github.workspace }}' 'windows.sdk32.path=' 'http.sslbackend=schannel' 'core.autocrlf=false' 'checkout.workers=16'"
@@ -25,10 +19,55 @@ jobs:
2519
with:
2620
persist-credentials: true
2721
token: ${{ secrets.PUSH_TOKEN }}
22+
- name: use git-sdk-arm64's Bash and Git for Windows' git.exe
23+
run: "usr\\bin\\bash.exe -lc 'cygpath -aw /usr/bin >>$GITHUB_PATH && cygpath -aw /c/Program\\ Files/Git/cmd/ >>$GITHUB_PATH'"
24+
- name: download patched MSYS2 runtime
25+
id: download
26+
shell: bash
27+
env:
28+
GH_TOKEN: ${{ github.token }}
29+
run: |
30+
# Only do this if `pacman` is prevented from being upgraded
31+
grep '^ *IgnorePkg *= *pacman' etc/pacman.conf || exit 0
32+
33+
pacman -S --noconfirm mingw-w64-clang-aarch64-github-cli &&
34+
git add -A &&
35+
git commit -sm 'TO-DROP: install GitHub CLI' || exit 1
36+
export PATH=$PATH:/clangarm64/bin
37+
38+
sha="$(gh api repos/git-for-windows/msys2-runtime/pulls/73 \
39+
--jq '.head.sha')" &&
40+
check_run_url="$(gh api repos/git-for-windows/msys2-runtime/commits/$sha/check-runs \
41+
--jq '.check_runs[] | select(.name=="build") | .url')" &&
42+
workflow_job_url="$(gh api "${check_run_url#https://api.github.com/}" --jq '.details_url')" &&
43+
workflow_run_url="${workflow_job_url%/job/*}" &&
44+
artifacts_url="$(gh api "repos/${workflow_run_url#https://github.com/}" --jq '.artifacts_url')" &&
45+
zip_url="$(gh api "${artifacts_url#https://api.github.com/}" --jq '.artifacts[].archive_download_url')" &&
46+
curl -H "Authorization: token ${{secrets.GITHUB_TOKEN}}" -#sLo /tmp/install.zip "$zip_url" &&
47+
echo "result=$(cygpath -aw /tmp/install.zip)" >>$GITHUB_OUTPUT
48+
- name: unzip MSYS2 runtime
49+
run: tar -xf {{ steps.download.outputs.result }}
50+
- name: commit MSYS2 runtime
51+
shell: bash
52+
run: |
53+
# Give the `/etc/profile.d/` scripts a chance to set things up
54+
bash -lc 'uname -a' &&
55+
56+
git add -A &&
57+
git commit -m 'Install patches MSYS2 runtime' &&
58+
sed -i 's/^*\(IgnorePkg *=\).*/# &/' etc/pacman.conf &&
59+
git commit -m 'Allow `pacman` to be upgraded again' \
60+
-m 'It had been overridden with a version that does not deadlock on Windows/ARM64, but now an MSYS2 runtime has been installed that prevents that deadlock in a much better way' \
61+
etc/pacman.conf &&
62+
git push origin HEAD
2863
- name: Update all Pacman packages
2964
shell: pwsh
3065
run: |
3166
& .\update-via-pacman.ps1
67+
- name: Update all Pacman packages again, for good measure
68+
shell: pwsh
69+
run: |
70+
& .\update-via-pacman.ps1
3271
- name: use git-sdk-arm64's Bash and Git for Windows' git.exe
3372
run: "usr\\bin\\bash.exe -lc 'cygpath -aw /usr/bin >>$GITHUB_PATH && cygpath -aw /c/Program\ Files/Git/cmd/ >>$GITHUB_PATH'"
3473
- name: deal with large DLL files

0 commit comments

Comments
 (0)