Skip to content

Commit 8b153eb

Browse files
vszakatspps83
authored andcommitted
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 cygwin/cygwin@f78009c cygwin/cygwin@7f3c225 actions/runner-images#10843 git-for-windows/git#5199 git-for-windows/msys2-runtime#75 git-for-windows/msys2-runtime@7913a41 git-for-windows/msys2-runtime@555afcb cygwin/cygwin@1c5f4dc Follow-up to c33174d curl#15364 Follow-up to 1e03059 curl#15356 Closes curl#15380
1 parent f8daf8f commit 8b153eb

File tree

1 file changed

+13
-6
lines changed

1 file changed

+13
-6
lines changed

.github/workflows/windows.yml

Lines changed: 13 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -614,7 +614,7 @@ jobs:
614614
timeout-minutes: 55
615615
defaults:
616616
run:
617-
shell: bash
617+
shell: C:\msys64\usr\bin\bash.exe {0}
618618
env:
619619
VCPKG_BINARY_SOURCES: 'clear;x-gha,readwrite'
620620
VCPKG_DISABLE_METRICS: '1'
@@ -737,6 +737,7 @@ jobs:
737737
- name: 'cmake configure'
738738
timeout-minutes: 5
739739
run: |
740+
PATH="/c/msys64/usr/bin:$PATH"
740741
cmake -B bld ${options} \
741742
"-DCMAKE_TOOLCHAIN_FILE=$VCPKG_INSTALLATION_ROOT/scripts/buildsystems/vcpkg.cmake" \
742743
"-DVCPKG_INSTALLED_DIR=$VCPKG_INSTALLATION_ROOT/installed" \
@@ -762,7 +763,9 @@ jobs:
762763
763764
- name: 'cmake build'
764765
timeout-minutes: 5
765-
run: cmake --build bld --config '${{ matrix.type }}' --parallel 5
766+
run: |
767+
PATH="/c/msys64/usr/bin:$PATH"
768+
cmake --build bld --config '${{ matrix.type }}' --parallel 5
766769
767770
- name: 'curl version'
768771
timeout-minutes: 1
@@ -776,7 +779,9 @@ jobs:
776779
- name: 'cmake build tests'
777780
if: ${{ matrix.tflags != 'skipall' }}
778781
timeout-minutes: 10
779-
run: cmake --build bld --config '${{ matrix.type }}' --parallel 5 --target testdeps
782+
run: |
783+
PATH="/c/msys64/usr/bin:$PATH"
784+
cmake --build bld --config '${{ matrix.type }}' --parallel 5 --target testdeps
780785
781786
- name: 'install test prereqs'
782787
if: ${{ matrix.tflags != 'skipall' && matrix.tflags != 'skiprun' }}
@@ -792,18 +797,20 @@ jobs:
792797
793798
- name: 'cmake run tests'
794799
if: ${{ matrix.tflags != 'skipall' && matrix.tflags != 'skiprun' }}
795-
timeout-minutes: 12
800+
timeout-minutes: 10
796801
run: |
797802
export TFLAGS='-j8 ~WebSockets ~SCP ~612 ${{ matrix.tflags }}'
798-
TFLAGS+=' ~987' # 'SMTPS with redundant explicit SSL request'
799803
if [[ '${{ matrix.install }}' = *'libssh2[core,zlib]'* ]]; then
800804
TFLAGS+=' ~SFTP'
801805
elif [[ '${{ matrix.install }}' = *'libssh '* ]]; then
802806
TFLAGS+=' ~614' # 'SFTP pre-quote chmod' SFTP, pre-quote, directory
803807
fi
804808
PATH="$PWD/bld/lib:$PATH:/c/Program Files (x86)/stunnel/bin:/c/Program Files/OpenSSH-Win64"
809+
PATH="/c/msys64/usr/bin:$PATH"
805810
cmake --build bld --config '${{ matrix.type }}' --target test-ci
806811
807812
- name: 'cmake build examples'
808813
timeout-minutes: 5
809-
run: cmake --build bld --config '${{ matrix.type }}' --parallel 5 --target curl-examples
814+
run: |
815+
PATH="/c/msys64/usr/bin:$PATH"
816+
cmake --build bld --config '${{ matrix.type }}' --parallel 5 --target curl-examples

0 commit comments

Comments
 (0)