Skip to content

Commit b72ca8c

Browse files
CI: Pin Windows SDK version to 10.0.22621.0
1 parent 086dd2f commit b72ca8c

File tree

1 file changed

+14
-3
lines changed

1 file changed

+14
-3
lines changed

.github/workflows/main.yml

Lines changed: 14 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -193,8 +193,8 @@ jobs:
193193
steps:
194194
- uses: compnerd/gha-setup-swift@main
195195
with:
196-
branch: swift-5.10.1-release
197-
tag: 5.10.1-RELEASE
196+
branch: swift-6.0.3-release
197+
tag: 6.0.3-RELEASE
198198
- uses: actions/checkout@v4
199199
- run: python3 ./Vendor/checkout-dependency
200200
# FIXME: CMake build is failing on CI due to "link: extra operand '/OUT:lib\\libXXXX.a'" error
@@ -207,7 +207,18 @@ jobs:
207207
# - run: cmake -G Ninja -B .build/cmake
208208
# - run: cmake --build .build/cmake
209209
# Run tests with SwiftPM
210-
- run: swift test
210+
- name: Run tests with SwiftPM
211+
run: |
212+
# Workaround for https://github.com/compnerd/swift-build/issues/909
213+
$Win10SdkRoot = Get-ItemPropertyValue `
214+
-Path "Registry::HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\Windows Kits\Installed Roots" `
215+
-Name "KitsRoot10"
216+
$WinSDKVersion = "10.0.22621.0"
217+
$ExtraFlags = @("-Xswiftc", "-windows-sdk-version", "-Xswiftc", "${WinSDKVersion}",
218+
"-Xswiftc", "-windows-sdk-root", "-Xswiftc", "${Win10SdkRoot}",
219+
"-Xbuild-tools-swiftc", "-windows-sdk-version", "-Xbuild-tools-swiftc", "${WinSDKVersion}",
220+
"-Xbuild-tools-swiftc", "-windows-sdk-root", "-Xbuild-tools-swiftc", "${Win10SdkRoot}")
221+
swift test @ExtraFlags
211222
212223
build-cmake:
213224
runs-on: ubuntu-20.04

0 commit comments

Comments
 (0)