Skip to content

Commit c09c530

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 c09c530

File tree

1 file changed

+47
-7
lines changed

1 file changed

+47
-7
lines changed

.github/workflows/sync.yml

Lines changed: 47 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,56 @@ 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+
shell: pwsh
50+
run: "C:\\Windows\\system32\\tar -xf ${{ steps.download.outputs.result }}"
51+
- name: commit MSYS2 runtime
52+
shell: bash
53+
run: |
54+
# Give the `/etc/profile.d/` scripts a chance to set things up
55+
bash -lc 'uname -a' &&
56+
57+
git add -A &&
58+
git commit -m 'Install patches MSYS2 runtime' &&
59+
sed -i 's/^*\(IgnorePkg *=\).*/# &/' etc/pacman.conf &&
60+
git commit -m 'Allow `pacman` to be upgraded again' \
61+
-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' \
62+
etc/pacman.conf &&
63+
git push origin HEAD
2864
- name: Update all Pacman packages
2965
shell: pwsh
3066
run: |
3167
& .\update-via-pacman.ps1
68+
- name: Update all Pacman packages again, for good measure
69+
shell: pwsh
70+
run: |
71+
& .\update-via-pacman.ps1
3272
- name: use git-sdk-arm64's Bash and Git for Windows' git.exe
3373
run: "usr\\bin\\bash.exe -lc 'cygpath -aw /usr/bin >>$GITHUB_PATH && cygpath -aw /c/Program\ Files/Git/cmd/ >>$GITHUB_PATH'"
3474
- name: deal with large DLL files

0 commit comments

Comments
 (0)