Skip to content

Commit

Permalink
ci: pin Windows SDK for ARM builds
Browse files Browse the repository at this point in the history
While here, use the -A Arch,version= syntax since CMake may ignore
CMAKE_SYSTEM_VERSION.
  • Loading branch information
LDVG committed Dec 2, 2024
1 parent fae3b4e commit e34155b
Showing 1 changed file with 10 additions and 8 deletions.
18 changes: 10 additions & 8 deletions windows/build.ps1
Original file line number Diff line number Diff line change
Expand Up @@ -74,11 +74,13 @@ if (-Not (Test-Path $GPG)) {
throw "Unable to find GPG at $GPG"
}

# Override CMAKE_SYSTEM_VERSION if $WinSDK is set.
# 10.0.261000.0 appear to have dropped ARM32 support, pin the SDK version
if ($Arch -eq "ARM" -and [string]::IsNullOrEmpty($WinSDK)) {
$WinSDK = '10.0.22621.0'
}
# Override Windows SDK version if $WinSDK is set.
if (-Not ([string]::IsNullOrEmpty($WinSDK))) {
$CMAKE_SYSTEM_VERSION = "-DCMAKE_SYSTEM_VERSION='$WinSDK'"
} else {
$CMAKE_SYSTEM_VERSION = ''
$Arch = "$Arch,version=$WinSDK"
}

Write-Host "WinSDK: $WinSDK"
Expand Down Expand Up @@ -155,7 +157,7 @@ try {
-DLIBRESSL_APPS=OFF -DCMAKE_C_FLAGS_DEBUG="${CFLAGS_DEBUG}" `
-DCMAKE_C_FLAGS_RELEASE="${CFLAGS_RELEASE}" `
-DCMAKE_MSVC_RUNTIME_LIBRARY="${CMAKE_MSVC_RUNTIME_LIBRARY}" `
-DCMAKE_INSTALL_PREFIX="${PREFIX}" "${CMAKE_SYSTEM_VERSION}"; `
-DCMAKE_INSTALL_PREFIX="${PREFIX}"; `
ExitOnError
& $CMake --build . --config ${Config} --verbose; ExitOnError
& $CMake --build . --config ${Config} --target install --verbose; `
Expand All @@ -174,7 +176,7 @@ try {
-DBUILD_SHARED_LIBS="${SHARED}" `
-DCMAKE_C_FLAGS_DEBUG="${CFLAGS_DEBUG} /wd4703" `
-DCMAKE_C_FLAGS_RELEASE="${CFLAGS_RELEASE} /wd4703" `
-DCMAKE_INSTALL_PREFIX="${PREFIX}" "${CMAKE_SYSTEM_VERSION}"; `
-DCMAKE_INSTALL_PREFIX="${PREFIX}"; `
ExitOnError
& $CMake --build . --config ${Config} --verbose; ExitOnError
& $CMake --build . --config ${Config} --target install --verbose; `
Expand All @@ -193,7 +195,7 @@ try {
-DCMAKE_C_FLAGS_DEBUG="${CFLAGS_DEBUG}" `
-DCMAKE_C_FLAGS_RELEASE="${CFLAGS_RELEASE}" `
-DCMAKE_MSVC_RUNTIME_LIBRARY="${CMAKE_MSVC_RUNTIME_LIBRARY}" `
-DCMAKE_INSTALL_PREFIX="${PREFIX}" "${CMAKE_SYSTEM_VERSION}"; `
-DCMAKE_INSTALL_PREFIX="${PREFIX}"; `
ExitOnError
& $CMake --build . --config ${Config} --verbose; ExitOnError
& $CMake --build . --config ${Config} --target install --verbose; `
Expand Down Expand Up @@ -232,7 +234,7 @@ try {
-DCRYPTO_LIBRARIES="${CRYPTO_LIBRARIES}" `
-DCMAKE_C_FLAGS_DEBUG="${CFLAGS_DEBUG} ${Fido2Flags}" `
-DCMAKE_C_FLAGS_RELEASE="${CFLAGS_RELEASE} ${Fido2Flags}" `
-DCMAKE_INSTALL_PREFIX="${PREFIX}" "${CMAKE_SYSTEM_VERSION}"; `
-DCMAKE_INSTALL_PREFIX="${PREFIX}"; `
ExitOnError
& $CMake --build . --config ${Config} --verbose; ExitOnError
& $CMake --build . --config ${Config} --target regress --verbose; `
Expand Down

0 comments on commit e34155b

Please sign in to comment.