From 1fa3eb05b18c3201735fb34a47bfe269f23117f5 Mon Sep 17 00:00:00 2001 From: Viktor Szakats Date: Thu, 6 Feb 2025 14:09:58 +0100 Subject: [PATCH] GHA/windows: always pass `-A ` to cmake in vcpkg jobs Instead of relying on the default `-A x64` on `windows-latest` runners, tell cmake the arch explicitly, to be in sync with `matrix.arch`. Also add support for arm64 and x86. `-DVCPKG_TARGET_TRIPLET=` isn't enough to select the platform, ref: https://github.com/curl/curl/actions/runs/13179082565/job/36785363766?pr=16210 Closes #16210 --- .github/workflows/windows.yml | 3 +++ 1 file changed, 3 insertions(+) diff --git a/.github/workflows/windows.yml b/.github/workflows/windows.yml index 393dc7681a20..5992e0bea781 100644 --- a/.github/workflows/windows.yml +++ b/.github/workflows/windows.yml @@ -689,6 +689,9 @@ 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' cmake -B bld ${options} \ -DCMAKE_TOOLCHAIN_FILE="$VCPKG_INSTALLATION_ROOT/scripts/buildsystems/vcpkg.cmake" \ -DVCPKG_INSTALLED_DIR="$VCPKG_INSTALLATION_ROOT/installed" \