]> git.ipfire.org Git - thirdparty/curl.git/commitdiff
GHA/windows: always pass `-A <arch>` to cmake in vcpkg jobs
authorViktor Szakats <commit@vsz.me>
Thu, 6 Feb 2025 13:09:58 +0000 (14:09 +0100)
committerViktor Szakats <commit@vsz.me>
Thu, 6 Feb 2025 14:44:18 +0000 (15:44 +0100)
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

index 393dc7681a20bea8e95c2feaf5349a41c7f5320f..5992e0bea7813e69a498bc2264e007d169fc8aa5 100644 (file)
@@ -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" \