Skip to content

Commit 4f27a3b

Browse files
committed
Readd Swift 5.8
1 parent 4e6d72d commit 4f27a3b

File tree

2 files changed

+74
-1
lines changed

2 files changed

+74
-1
lines changed

.github/workflows/pull_request.yml

+1-1
Original file line numberDiff line numberDiff line change
@@ -16,7 +16,7 @@ jobs:
1616
name: Unit tests
1717
uses: apple/swift-nio/.github/workflows/unit_tests.yml@main
1818
with:
19-
linux_5_8_enabled: false
19+
linux_5_8_arguments_override: "-Xswiftc -warnings-as-errors --explicit-target-dependency-import-check error"
2020
linux_5_9_arguments_override: "-Xswiftc -warnings-as-errors --explicit-target-dependency-import-check error"
2121
linux_5_10_arguments_override: "-Xswiftc -warnings-as-errors --explicit-target-dependency-import-check error"
2222
linux_nightly_6_0_arguments_override: "-Xswiftc -warnings-as-errors --explicit-target-dependency-import-check error"

[email protected]

+73
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,73 @@
1+
// swift-tools-version:5.7
2+
3+
import PackageDescription
4+
5+
let package = Package(
6+
name: "swift-aws-lambda-runtime",
7+
platforms: [
8+
.macOS(.v12),
9+
.iOS(.v15),
10+
.tvOS(.v15),
11+
.watchOS(.v8),
12+
],
13+
products: [
14+
// this library exports `AWSLambdaRuntimeCore` and adds Foundation convenience methods
15+
.library(name: "AWSLambdaRuntime", targets: ["AWSLambdaRuntime"]),
16+
// this has all the main functionality for lambda and it does not link Foundation
17+
.library(name: "AWSLambdaRuntimeCore", targets: ["AWSLambdaRuntimeCore"]),
18+
// plugin to package the lambda, creating an archive that can be uploaded to AWS
19+
.plugin(name: "AWSLambdaPackager", targets: ["AWSLambdaPackager"]),
20+
// for testing only
21+
.library(name: "AWSLambdaTesting", targets: ["AWSLambdaTesting"]),
22+
],
23+
dependencies: [
24+
.package(url: "https://github.com/apple/swift-nio.git", .upToNextMajor(from: "2.43.1")),
25+
.package(url: "https://github.com/apple/swift-log.git", .upToNextMajor(from: "1.4.2")),
26+
.package(url: "https://github.com/swift-server/swift-backtrace.git", .upToNextMajor(from: "1.2.3")),
27+
.package(url: "https://github.com/apple/swift-docc-plugin", exact: "1.3.0"),
28+
],
29+
targets: [
30+
.target(name: "AWSLambdaRuntime", dependencies: [
31+
.byName(name: "AWSLambdaRuntimeCore"),
32+
.product(name: "NIOCore", package: "swift-nio"),
33+
.product(name: "NIOFoundationCompat", package: "swift-nio"),
34+
]),
35+
.target(name: "AWSLambdaRuntimeCore", dependencies: [
36+
.product(name: "Logging", package: "swift-log"),
37+
.product(name: "Backtrace", package: "swift-backtrace"),
38+
.product(name: "NIOHTTP1", package: "swift-nio"),
39+
.product(name: "NIOCore", package: "swift-nio"),
40+
.product(name: "NIOConcurrencyHelpers", package: "swift-nio"),
41+
.product(name: "NIOPosix", package: "swift-nio"),
42+
]),
43+
.plugin(
44+
name: "AWSLambdaPackager",
45+
capability: .command(
46+
intent: .custom(
47+
verb: "archive",
48+
description: "Archive the Lambda binary and prepare it for uploading to AWS. Requires docker on macOS or non Amazonlinux 2 distributions."
49+
)
50+
)
51+
),
52+
.testTarget(name: "AWSLambdaRuntimeCoreTests", dependencies: [
53+
.byName(name: "AWSLambdaRuntimeCore"),
54+
.product(name: "NIOTestUtils", package: "swift-nio"),
55+
.product(name: "NIOFoundationCompat", package: "swift-nio"),
56+
]),
57+
.testTarget(name: "AWSLambdaRuntimeTests", dependencies: [
58+
.byName(name: "AWSLambdaRuntimeCore"),
59+
.byName(name: "AWSLambdaRuntime"),
60+
]),
61+
// testing helper
62+
.target(name: "AWSLambdaTesting", dependencies: [
63+
.byName(name: "AWSLambdaRuntime"),
64+
.product(name: "NIO", package: "swift-nio"),
65+
]),
66+
.testTarget(name: "AWSLambdaTestingTests", dependencies: ["AWSLambdaTesting"]),
67+
// for perf testing
68+
.executableTarget(name: "MockServer", dependencies: [
69+
.product(name: "NIOHTTP1", package: "swift-nio"),
70+
.product(name: "NIO", package: "swift-nio"),
71+
]),
72+
]
73+
)

0 commit comments

Comments
 (0)