mirror of
https://github.com/swift-server/swift-service-lifecycle
synced 2026-11-26 04:57:53 +00:00
# Motivation We want to switch our CI to GitHub actions. # Modification This PR sets up the reusable workflows from NIO. # Result More modern CI.
86 lines
2.2 KiB
Swift
86 lines
2.2 KiB
Swift
// swift-tools-version:5.8
|
|
import PackageDescription
|
|
|
|
let package = Package(
|
|
name: "swift-service-lifecycle",
|
|
platforms: [
|
|
.macOS(.v10_15),
|
|
.iOS(.v13),
|
|
.watchOS(.v6),
|
|
.tvOS(.v13),
|
|
],
|
|
products: [
|
|
.library(
|
|
name: "ServiceLifecycle",
|
|
targets: ["ServiceLifecycle"]
|
|
),
|
|
.library(
|
|
name: "ServiceLifecycleTestKit",
|
|
targets: ["ServiceLifecycleTestKit"]
|
|
),
|
|
.library(
|
|
name: "UnixSignals",
|
|
targets: ["UnixSignals"]
|
|
),
|
|
],
|
|
dependencies: [
|
|
.package(
|
|
url: "https://github.com/apple/swift-log.git",
|
|
from: "1.5.2"
|
|
),
|
|
.package(
|
|
url: "https://github.com/apple/swift-async-algorithms.git",
|
|
from: "1.0.0"
|
|
),
|
|
],
|
|
targets: [
|
|
.target(
|
|
name: "ServiceLifecycle",
|
|
dependencies: [
|
|
.product(
|
|
name: "Logging",
|
|
package: "swift-log"
|
|
),
|
|
.product(
|
|
name: "AsyncAlgorithms",
|
|
package: "swift-async-algorithms"
|
|
),
|
|
.target(name: "UnixSignals"),
|
|
.target(name: "ConcurrencyHelpers"),
|
|
]
|
|
),
|
|
.target(
|
|
name: "ServiceLifecycleTestKit",
|
|
dependencies: [
|
|
.target(name: "ServiceLifecycle")
|
|
]
|
|
),
|
|
.target(
|
|
name: "UnixSignals",
|
|
dependencies: [
|
|
.target(name: "ConcurrencyHelpers")
|
|
]
|
|
),
|
|
.target(
|
|
name: "ConcurrencyHelpers"
|
|
),
|
|
.testTarget(
|
|
name: "ServiceLifecycleTests",
|
|
dependencies: [
|
|
.target(name: "ServiceLifecycle"),
|
|
.target(name: "ServiceLifecycleTestKit"),
|
|
]
|
|
),
|
|
.testTarget(
|
|
name: "UnixSignalsTests",
|
|
dependencies: [
|
|
.target(name: "UnixSignals")
|
|
]
|
|
),
|
|
]
|
|
)
|
|
|
|
for target in package.targets {
|
|
target.swiftSettings?.append(.enableUpcomingFeature("StrictConcurrency"))
|
|
}
|