Skip to content

Commit 96c3357

Browse files
authored
Enable swift-corelibs-foundation tests on Windows (#75932)
1 parent 1b2c13b commit 96c3357

File tree

1 file changed

+17
-12
lines changed

1 file changed

+17
-12
lines changed

utils/build.ps1

Lines changed: 17 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -1690,18 +1690,23 @@ function Build-Foundation([Platform]$Platform, $Arch, [switch]$Test = $false) {
16901690
-Arch $HostArch
16911691
}
16921692

1693-
# swift-corelibs-foundation tests are disabled since the package does not build for Windows yet
1694-
# $OutDir = Join-Path -Path $HostArch.BinaryCache -ChildPath foundation-tests
1695-
1696-
# Isolate-EnvVars {
1697-
# $env:SWIFTCI_USE_LOCAL_DEPS=1
1698-
# $env:DISPATCH_INCLUDE_PATH="$($Arch.SDKInstallRoot)/usr/lib/swift"
1699-
# Build-SPMProject `
1700-
# -Test `
1701-
# -Src $SourceCache\swift-corelibs-foundation `
1702-
# -Bin $OutDir `
1703-
# -Arch $HostArch
1704-
# }
1693+
$OutDir = Join-Path -Path $HostArch.BinaryCache -ChildPath foundation-tests
1694+
$ShortArch = $Arch.LLVMName
1695+
1696+
Isolate-EnvVars {
1697+
$env:SWIFTCI_USE_LOCAL_DEPS=1
1698+
$env:DISPATCH_INCLUDE_PATH="$($Arch.SDKInstallRoot)/usr/lib/swift"
1699+
$env:LIBXML_LIBRARY_PATH="$LibraryRoot/libxml2-2.11.5/usr/lib/$Platform/$ShortArch"
1700+
$env:LIBXML_INCLUDE_PATH="$LibraryRoot/libxml2-2.11.5/usr/include/libxml2"
1701+
$env:ZLIB_LIBRARY_PATH="$LibraryRoot/zlib-1.3.1/usr/lib/$Platform/$ShortArch"
1702+
$env:CURL_LIBRARY_PATH="$LibraryRoot/curl-8.9.1/usr/lib/$Platform/$ShortArch"
1703+
$env:CURL_INCLUDE_PATH="$LibraryRoot/curl-8.9.1/usr/include"
1704+
Build-SPMProject `
1705+
-Test `
1706+
-Src $SourceCache\swift-corelibs-foundation `
1707+
-Bin $OutDir `
1708+
-Arch $HostArch
1709+
}
17051710
} else {
17061711
$DispatchBinaryCache = Get-TargetProjectBinaryCache $Arch Dispatch
17071712
$FoundationBinaryCache = Get-TargetProjectBinaryCache $Arch Foundation

0 commit comments

Comments
 (0)