Skip to content

Commit 9ff3746

Browse files
committed
Patch NIO for missing Android import on the CI
1 parent 01d2197 commit 9ff3746

File tree

2 files changed

+31
-1
lines changed

2 files changed

+31
-1
lines changed

.github/workflows/sdks.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -354,7 +354,7 @@ jobs:
354354
- name: Build Swift NIO package
355355
run: |
356356
cd swift-nio
357-
git apply ../sdk-config/swift-nio-disable-ecn-tests.patch ../sdk-config/swift-nio-filesystem.patch
357+
git apply ../sdk-config/swift-nio-disable-ecn-tests.patch ../sdk-config/swift-nio-filesystem.patch ../sdk-config/swift-nio-ip.patch
358358
${TOOLCHAIN}/bin/swift build --build-tests ${SWIFTPM_AARCH_FLAGS}
359359
${TOOLCHAIN}/bin/swift build --build-tests ${SWIFTPM_X_FLAGS}
360360
${TOOLCHAIN}/bin/swift build --build-tests ${SWIFTPM_ARM_FLAGS}

swift-nio-ip.patch

Lines changed: 30 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,30 @@
1+
diff --git a/Tests/NIOEmbeddedTests/AsyncTestingChannelTests.swift b/Tests/NIOEmbeddedTests/AsyncTestingChannelTests.swift
2+
index e0ad6060..1cc6eb27 100644
3+
--- a/Tests/NIOEmbeddedTests/AsyncTestingChannelTests.swift
4+
+++ b/Tests/NIOEmbeddedTests/AsyncTestingChannelTests.swift
5+
@@ -18,6 +18,10 @@ import XCTest
6+
7+
@testable import NIOEmbedded
8+
9+
+#if canImport(Android)
10+
+import Android
11+
+#endif
12+
+
13+
@available(macOS 10.15, iOS 13, tvOS 13, watchOS 6, *)
14+
class AsyncTestingChannelTests: XCTestCase {
15+
func testSingleHandlerInit() async throws {
16+
diff --git a/Tests/NIOEmbeddedTests/EmbeddedChannelTest.swift b/Tests/NIOEmbeddedTests/EmbeddedChannelTest.swift
17+
index d3919356..abf089fb 100644
18+
--- a/Tests/NIOEmbeddedTests/EmbeddedChannelTest.swift
19+
+++ b/Tests/NIOEmbeddedTests/EmbeddedChannelTest.swift
20+
@@ -19,6 +19,10 @@ import XCTest
21+
22+
@testable import NIOEmbedded
23+
24+
+#if canImport(Android)
25+
+import Android
26+
+#endif
27+
+
28+
final class ChannelLifecycleHandler: ChannelInboundHandler, Sendable {
29+
public typealias InboundIn = Any
30+

0 commit comments

Comments
 (0)