Skip to content

Commit 01b731f

Browse files
authored
Adding Package.swift for Swift 5 versions (#225)
1 parent 813ab2c commit 01b731f

File tree

2 files changed

+98
-0
lines changed

2 files changed

+98
-0
lines changed

.github/workflows/swift.yml

Lines changed: 21 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -23,3 +23,24 @@ jobs:
2323
steps:
2424
- uses: actions/checkout@v1
2525
- run: ASAN_OPTIONS=detect_leaks=0 swift test --sanitize=address
26+
focal-5-10:
27+
container:
28+
image: swift:5.10-focal
29+
runs-on: ubuntu-latest
30+
steps:
31+
- uses: actions/checkout@v1
32+
- run: swift test
33+
thread-5-10:
34+
container:
35+
image: swift:5.10-focal
36+
runs-on: ubuntu-latest
37+
steps:
38+
- uses: actions/checkout@v1
39+
- run: swift test --sanitize=thread
40+
address-5-10:
41+
container:
42+
image: swift:5.10-focal
43+
runs-on: ubuntu-latest
44+
steps:
45+
- uses: actions/checkout@v1
46+
- run: ASAN_OPTIONS=detect_leaks=0 swift test --sanitize=address

[email protected]

Lines changed: 77 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,77 @@
1+
// swift-tools-version:5.10
2+
import PackageDescription
3+
4+
let package = Package(
5+
name: "apnswift",
6+
platforms: [
7+
.macOS(.v13),
8+
.iOS(.v16),
9+
.watchOS(.v9),
10+
.tvOS(.v16),
11+
],
12+
products: [
13+
.executable(name: "APNSExample", targets: ["APNSExample"]),
14+
.library(name: "APNS", targets: ["APNS"]),
15+
.library(name: "APNSCore", targets: ["APNSCore"]),
16+
.library(name: "APNSURLSession", targets: ["APNSURLSession"]),
17+
.library(name: "APNSTestServer", targets: ["APNSTestServer"]),
18+
],
19+
dependencies: [
20+
.package(url: "https://github.com/apple/swift-log.git", from: "1.0.0"),
21+
.package(url: "https://github.com/apple/swift-crypto.git", "3.0.0"..<"5.0.0"),
22+
.package(url: "https://github.com/swift-server/async-http-client.git", from: "1.19.0"),
23+
.package(url: "https://github.com/apple/swift-docc-plugin", from: "1.0.0"),
24+
.package(url: "https://github.com/apple/swift-nio.git", from: "2.42.0"),
25+
.package(url: "https://github.com/apple/swift-nio-ssl.git", from: "2.6.0"),
26+
.package(url: "https://github.com/apple/swift-nio-http2.git", from: "1.9.0"),
27+
],
28+
targets: [
29+
.executableTarget(
30+
name: "APNSExample",
31+
dependencies: [
32+
.target(name: "APNSCore"),
33+
.target(name: "APNS"),
34+
.product(name: "Logging", package: "swift-log"),
35+
]
36+
),
37+
.testTarget(
38+
name: "APNSTests",
39+
dependencies: [
40+
.target(name: "APNSCore"),
41+
.target(name: "APNS"),
42+
]
43+
),
44+
.target(
45+
name: "APNSCore",
46+
dependencies: [
47+
.product(name: "Crypto", package: "swift-crypto")
48+
]
49+
),
50+
.target(
51+
name: "APNS",
52+
dependencies: [
53+
.product(name: "Crypto", package: "swift-crypto"),
54+
.product(name: "AsyncHTTPClient", package: "async-http-client"),
55+
.target(name: "APNSCore"),
56+
]
57+
),
58+
.target(
59+
name: "APNSTestServer",
60+
dependencies: [
61+
.product(name: "Logging", package: "swift-log"),
62+
.product(name: "Crypto", package: "swift-crypto"),
63+
.product(name: "NIOCore", package: "swift-nio"),
64+
.product(name: "NIOPosix", package: "swift-nio"),
65+
.product(name: "NIOSSL", package: "swift-nio-ssl"),
66+
.product(name: "NIOHTTP1", package: "swift-nio"),
67+
.product(name: "NIOHTTP2", package: "swift-nio-http2"),
68+
]
69+
),
70+
.target(
71+
name: "APNSURLSession",
72+
dependencies: [
73+
.target(name: "APNSCore")
74+
]
75+
),
76+
]
77+
)

0 commit comments

Comments
 (0)