From 419ca2f143d4c8de18468193f474930b8d5beb78 Mon Sep 17 00:00:00 2001 From: Viktor Szakats Date: Sun, 17 Aug 2025 11:19:58 +0200 Subject: [PATCH] limit ninja to native x64 targets only --- .github/workflows/windows.yml | 15 ++++++++++----- 1 file changed, 10 insertions(+), 5 deletions(-) diff --git a/.github/workflows/windows.yml b/.github/workflows/windows.yml index 8effb580e8..b38efd965c 100644 --- a/.github/workflows/windows.yml +++ b/.github/workflows/windows.yml @@ -827,15 +827,20 @@ jobs: ldflags='-OPT:NOREF -OPT:NOICF -APPCONTAINER:NO' vsglobals=';AppxPackage=false;WindowsAppContainer=false' fi - [ "${MATRIX_ARCH}" = 'arm64' ] && options+=' -A ARM64' - [ "${MATRIX_ARCH}" = 'x64' ] && options+=' -A x64' - [ "${MATRIX_ARCH}" = 'x86' ] && options+=' -A Win32' if [ "${TFLAGS}" = 'skiprun' ]; then options+=' -D_CURL_SKIP_BUILD_CERTS=ON' + fi + if [ "${TFLAGS}" = 'skiprun' ] && [ "${MATRIX_ARCH}" != 'x64' ]; then + [ "${MATRIX_ARCH}" = 'arm64' ] && options+=' -A ARM64' + [ "${MATRIX_ARCH}" = 'x64' ] && options+=' -A x64' + [ "${MATRIX_ARCH}" = 'x86' ] && options+=' -A Win32' options+=" -DCMAKE_VS_GLOBALS=TrackFileAccess=false${vsglobals}" else - # Use Ninja when running tests to avoid MSBuild heuristics picking up - # "error messages" in the test log output and making the job fail. + # Use Ninja when running tests to avoid MSBuild heuristics picking + # up "error messages" in the test log output and making the job fail. + # Unfortunately switching CPU target requires vcvarsall.bat, which + # has no stable disk location, its an MS-DOS batch file setting env, + # and makes it problematic to use from this script. options+=' -G Ninja' options+=' -DCMAKE_C_COMPILER=cl.exe' fi