GHA/windows: work around Git for Windows perf regression

Fix the significant perf regression for vcpkg jobs by switching to the
MSYS2 shell environment from Git for Windows. This env is already used
for old-mingw-w64 job that remained unaffected by this issue.

The issue began with the windows-runner update 20241015.1.0. It bumped
Git for Windows from Git 2.46.2.windows.1 to Git 2.47.0.windows.1. GfW
bumped its MSYS2 components, including `msys-2.0.dll`. That's Cygwin
code, which may have contributed to this. Pipes were involved and
`runtests.pl` relies on pipes heavily in parallel mode. (The issue was
not seen with parallel tests disabled, in retrospect.)

This is useful as a permanent solution too. It drop GfW as a dependency
and makes Windows jobs use one less shell/env flavour.

Long term it might help to use native Windows Perl to avoid the MSYS
layer completely, if there is a way to make that work.

Assortment of possibly related links:
https://cygwin.com/pipermail/cygwin/2024-August/256398.html
f78009cb1c
7f3c225325

https://github.com/actions/runner-images/issues/10843
https://github.com/git-for-windows/git/issues/5199
https://github.com/git-for-windows/msys2-runtime/pull/75
7913a41703
555afcb2f3
1c5f4dcdc5

Follow-up to c33174d42f #15364
Follow-up to 1e0305973c #15356

Closes #15380
This commit is contained in:
Viktor Szakats 2024-10-23 11:06:27 +02:00
parent 73d2779196
commit 5f9411f953
No known key found for this signature in database
GPG Key ID: B5ABD165E2AEF201

View File

@ -614,7 +614,7 @@ jobs:
timeout-minutes: 55 timeout-minutes: 55
defaults: defaults:
run: run:
shell: bash shell: C:\msys64\usr\bin\bash.exe {0}
env: env:
VCPKG_BINARY_SOURCES: 'clear;x-gha,readwrite' VCPKG_BINARY_SOURCES: 'clear;x-gha,readwrite'
VCPKG_DISABLE_METRICS: '1' VCPKG_DISABLE_METRICS: '1'
@ -737,6 +737,7 @@ jobs:
- name: 'cmake configure' - name: 'cmake configure'
timeout-minutes: 5 timeout-minutes: 5
run: | run: |
PATH="/c/msys64/usr/bin:$PATH"
cmake -B bld ${options} \ cmake -B bld ${options} \
"-DCMAKE_TOOLCHAIN_FILE=$VCPKG_INSTALLATION_ROOT/scripts/buildsystems/vcpkg.cmake" \ "-DCMAKE_TOOLCHAIN_FILE=$VCPKG_INSTALLATION_ROOT/scripts/buildsystems/vcpkg.cmake" \
"-DVCPKG_INSTALLED_DIR=$VCPKG_INSTALLATION_ROOT/installed" \ "-DVCPKG_INSTALLED_DIR=$VCPKG_INSTALLATION_ROOT/installed" \
@ -762,7 +763,9 @@ jobs:
- name: 'cmake build' - name: 'cmake build'
timeout-minutes: 5 timeout-minutes: 5
run: cmake --build bld --config '${{ matrix.type }}' --parallel 5 run: |
PATH="/c/msys64/usr/bin:$PATH"
cmake --build bld --config '${{ matrix.type }}' --parallel 5
- name: 'curl version' - name: 'curl version'
timeout-minutes: 1 timeout-minutes: 1
@ -776,7 +779,9 @@ jobs:
- name: 'cmake build tests' - name: 'cmake build tests'
if: ${{ matrix.tflags != 'skipall' }} if: ${{ matrix.tflags != 'skipall' }}
timeout-minutes: 10 timeout-minutes: 10
run: cmake --build bld --config '${{ matrix.type }}' --parallel 5 --target testdeps run: |
PATH="/c/msys64/usr/bin:$PATH"
cmake --build bld --config '${{ matrix.type }}' --parallel 5 --target testdeps
- name: 'install test prereqs' - name: 'install test prereqs'
if: ${{ matrix.tflags != 'skipall' && matrix.tflags != 'skiprun' }} if: ${{ matrix.tflags != 'skipall' && matrix.tflags != 'skiprun' }}
@ -792,18 +797,20 @@ jobs:
- name: 'cmake run tests' - name: 'cmake run tests'
if: ${{ matrix.tflags != 'skipall' && matrix.tflags != 'skiprun' }} if: ${{ matrix.tflags != 'skipall' && matrix.tflags != 'skiprun' }}
timeout-minutes: 12 timeout-minutes: 10
run: | run: |
export TFLAGS='-j8 ~WebSockets ~SCP ~612 ${{ matrix.tflags }}' export TFLAGS='-j8 ~WebSockets ~SCP ~612 ${{ matrix.tflags }}'
TFLAGS+=' ~987' # 'SMTPS with redundant explicit SSL request'
if [[ '${{ matrix.install }}' = *'libssh2[core,zlib]'* ]]; then if [[ '${{ matrix.install }}' = *'libssh2[core,zlib]'* ]]; then
TFLAGS+=' ~SFTP' TFLAGS+=' ~SFTP'
elif [[ '${{ matrix.install }}' = *'libssh '* ]]; then elif [[ '${{ matrix.install }}' = *'libssh '* ]]; then
TFLAGS+=' ~614' # 'SFTP pre-quote chmod' SFTP, pre-quote, directory TFLAGS+=' ~614' # 'SFTP pre-quote chmod' SFTP, pre-quote, directory
fi fi
PATH="$PWD/bld/lib:$PATH:/c/Program Files (x86)/stunnel/bin:/c/Program Files/OpenSSH-Win64" PATH="$PWD/bld/lib:$PATH:/c/Program Files (x86)/stunnel/bin:/c/Program Files/OpenSSH-Win64"
PATH="/c/msys64/usr/bin:$PATH"
cmake --build bld --config '${{ matrix.type }}' --target test-ci cmake --build bld --config '${{ matrix.type }}' --target test-ci
- name: 'cmake build examples' - name: 'cmake build examples'
timeout-minutes: 5 timeout-minutes: 5
run: cmake --build bld --config '${{ matrix.type }}' --parallel 5 --target curl-examples run: |
PATH="/c/msys64/usr/bin:$PATH"
cmake --build bld --config '${{ matrix.type }}' --parallel 5 --target curl-examples