Skip to content

Commit 3e49537

Browse files
committed
[tests] Run swift-(corelibs-)foundation tests in debug configuration on Windows
This should improve CI times because building in debug configuration instead of release configuration is significantly faster. Since we don’t install the build of swift-(corelibs-)foundation using SwiftPM into the toolchain, this doesn’t have any performance impact on users of the toolchain.
1 parent 1c78d0c commit 3e49537

File tree

1 file changed

+6
-3
lines changed

1 file changed

+6
-3
lines changed

utils/build.ps1

Lines changed: 6 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1478,6 +1478,7 @@ function Build-SPMProject {
14781478
[string] $Src,
14791479
[string] $Bin,
14801480
[hashtable] $Arch,
1481+
[string] $Configuration = "release",
14811482
[Parameter(ValueFromRemainingArguments)]
14821483
[string[]] $AdditionalArguments
14831484
)
@@ -1507,7 +1508,7 @@ function Build-SPMProject {
15071508
$Arguments = @(
15081509
"--scratch-path", $Bin,
15091510
"--package-path", $Src,
1510-
"-c", "release",
1511+
"-c", $Configuration,
15111512
"-Xbuild-tools-swiftc", "-I$(Get-SwiftSDK Windows)\usr\lib\swift",
15121513
"-Xbuild-tools-swiftc", "-L$(Get-SwiftSDK Windows)\usr\lib\swift\windows",
15131514
"-Xcc", "-I$(Get-SwiftSDK Windows)\usr\lib\swift",
@@ -2360,7 +2361,8 @@ function Build-Foundation {
23602361
-Action Test `
23612362
-Src $SourceCache\swift-foundation `
23622363
-Bin "$BinaryCache\$($Arch.LLVMTarget)\CoreFoundationTests" `
2363-
-Arch $HostArch
2364+
-Arch $HostArch `
2365+
-Configuration debug
23642366

23652367
$ShortArch = $Arch.LLVMName
23662368
Invoke-IsolatingEnvVars {
@@ -2374,7 +2376,8 @@ function Build-Foundation {
23742376
-Action Test `
23752377
-Src $SourceCache\swift-corelibs-foundation `
23762378
-Bin "$BinaryCache\$($Arch.LLVMTarget)\FoundationTests" `
2377-
-Arch $HostArch
2379+
-Arch $HostArch `
2380+
-Configuration debug
23782381
}
23792382
} else {
23802383
$DispatchBinaryCache = Get-TargetProjectBinaryCache $Arch Dispatch

0 commit comments

Comments
 (0)