Skip to content

Commit 3583132

Browse files
committed
Conditionalize the testing targets for non-windows targets to avoid the TaskDriver requirements
1 parent 18e2398 commit 3583132

File tree

1 file changed

+18
-2
lines changed

1 file changed

+18
-2
lines changed

Package.swift

Lines changed: 18 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -5,6 +5,20 @@ import CompilerPluginSupport
55

66
// Availability Macros
77

8+
let supportedTestingPlatforms: [Platform] = [
9+
.macOS,
10+
.iOS,
11+
.tvOS,
12+
.watchOS,
13+
.visionOS,
14+
.macCatalyst,
15+
.android,
16+
.linux,
17+
.freebsd,
18+
.openbsd,
19+
.wasi
20+
]
21+
822
let availabilityMacros: [SwiftSetting] = [
923
.enableExperimentalFeature("AvailabilityMacro=AsyncAlgorithms 1.0:macOS 10.15, iOS 13.0, tvOS 13.0, watchOS 6.0"),
1024
.enableExperimentalFeature("AvailabilityMacro=AsyncAlgorithms 1.1:macOS 15.0, iOS 18.0, tvOS 18.0, watchOS 11.0, visionOS 2.0"),
@@ -39,14 +53,16 @@ let package = Package(
3953
dependencies: ["AsyncAlgorithms", "AsyncSequenceValidation"],
4054
swiftSettings: availabilityMacros + [
4155
.enableExperimentalFeature("StrictConcurrency=complete")
42-
]
56+
],
57+
condition: .when(platforms: supportedTestingPlatforms)
4358
),
4459
.testTarget(
4560
name: "AsyncAlgorithmsTests",
4661
dependencies: ["AsyncAlgorithms", "AsyncSequenceValidation", "AsyncAlgorithms_XCTest"],
4762
swiftSettings: availabilityMacros + [
4863
.enableExperimentalFeature("StrictConcurrency=complete")
49-
]
64+
],
65+
condition: .when(platforms: supportedTestingPlatforms)
5066
),
5167
]
5268
)

0 commit comments

Comments
 (0)