mirror of
https://github.com/curl/curl.git
synced 2026-07-24 20:17:17 +03:00
msvc: VS2026: unlock picky warning in cmake, test in CI
Upgrade a GHA/windows job to VS2026 (from VS2022), using a runner image
released a week ago. It also comes with the same Windows SDK as VS2022:
v10.0.26100.0.
The runner image uses Windows 2025 unfortunately, which makes the job
run significantly slower than before this patch:
- configure: 49s -> 1m10s
- build: 3s -> 5s
- install test prereqs: 23s -> 27s
- run tests: 3m18s -> 4m11s
- build examples: 15s -> 25s
It's a shame.
Also:
- cmake: enable picky warnings for VS2026 internal version 19.50.
Build is clean with existing options.
- GHA/windows: make the built-in OpenSSH intall path recognize
the windows-2025-vs2026 image as windows-2025.
- windows-2025-vs2026 is able to load the cached stunnel made on
the windows-2022 runner.
- disk use of the build is almost identical to VS2022.
Before: https://github.com/curl/curl/actions/runs/21955482367/job/63418133880
After: https://github.com/curl/curl/actions/runs/21957589847/job/63426546943
Ref: 71f0157880/images/windows/Windows2025-VS2026-Readme.md
Ref: #20575
Closes #20577
This commit is contained in:
parent
aece530e26
commit
3ce596a956
2 changed files with 8 additions and 3 deletions
9
.github/workflows/windows.yml
vendored
9
.github/workflows/windows.yml
vendored
|
|
@ -808,6 +808,7 @@ jobs:
|
|||
env: 'ucrt-x86_64'
|
||||
plat: 'windows'
|
||||
type: 'Debug'
|
||||
image: 'windows-2025-vs2026'
|
||||
chkprefill: '_chkprefill'
|
||||
config: >-
|
||||
-DENABLE_DEBUG=ON
|
||||
|
|
@ -910,9 +911,11 @@ jobs:
|
|||
# Officially this requires the vcvarsall.bat MS-DOS batch file (as of
|
||||
# VS2022). Since it integrates badly with CI steps and shell scripts,
|
||||
# reproduce the necessary build configuration manually, without envs.
|
||||
MSVC_EDITION='2022/Enterprise/vc/tools/msvc'
|
||||
[[ "${MATRIX_IMAGE}" = *'vs2026'* ]] && MSVC_EDITION='18/Enterprise/vc/tools/msvc'
|
||||
[[ "$(uname -s)" = *'ARM64'* ]] && MSVC_HOST='arm64' || MSVC_HOST='x64' # x86
|
||||
MSVC_ROOTD="$(cygpath --mixed --short-name "$PROGRAMFILES/Microsoft Visual Studio")" # to avoid spaces in directory names
|
||||
MSVC_ROOTU="$(/usr/bin/find "$(cygpath --unix "$MSVC_ROOTD/2022/Enterprise/vc/tools/msvc")" -mindepth 1 -maxdepth 1 -type d -name '*.*' | sort | tail -n 1)"
|
||||
MSVC_ROOTU="$(/usr/bin/find "$(cygpath --unix "$MSVC_ROOTD/$MSVC_EDITION")" -mindepth 1 -maxdepth 1 -type d -name '*.*' | sort | tail -n 1)"
|
||||
MSVC_ROOTW="$(cygpath --mixed "$MSVC_ROOTU")"
|
||||
MSVC_ROOTU="$(cygpath --unix "$MSVC_ROOTW")"
|
||||
MSVC_BINU="$MSVC_ROOTU/bin/Host$MSVC_HOST/$MATRIX_ARCH"
|
||||
|
|
@ -938,6 +941,8 @@ jobs:
|
|||
options+=" -DCMAKE_MT=$MSDK_BINU/mt.exe"
|
||||
options+=" -DCMAKE_C_COMPILER=$MSVC_BINU/cl.exe"
|
||||
export CMAKE_GENERATOR='Ninja Multi-Config' # pass it via env to avoid space issues
|
||||
echo "Using MSVC: ${MSVC_ROOTW}"
|
||||
echo "Using Windows SDK: ${MSDK_VER}"
|
||||
fi
|
||||
[ "${_chkprefill}" = '_chkprefill' ] && options+=' -D_CURL_PREFILL=OFF'
|
||||
if [ -n "${MATRIX_INSTALL_VCPKG}" ]; then
|
||||
|
|
@ -1009,7 +1014,7 @@ jobs:
|
|||
/usr/bin/pacman --noconfirm --noprogressbar --sync --needed openssh
|
||||
elif [ "${MATRIX_OPENSSH}" = 'OpenSSH-Windows-builtin' ]; then
|
||||
# https://learn.microsoft.com/windows-server/administration/openssh/openssh_install_firstuse
|
||||
if [ "${MATRIX_IMAGE}" != 'windows-2025' ]; then
|
||||
if [[ "${MATRIX_IMAGE}" = *'windows-2025'* ]]; then
|
||||
pwsh -Command 'Add-WindowsCapability -Online -Name OpenSSH.Client~~~~0.0.1.0'
|
||||
pwsh -Command 'Add-WindowsCapability -Online -Name OpenSSH.Server~~~~0.0.1.0'
|
||||
fi
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue