Skip to content

Commit 620b816

Browse files
committed
ci: Update CI to compile more targets to wasm.
1 parent 5f34304 commit 620b816

4 files changed

Lines changed: 34 additions & 2 deletions

File tree

.github/workflows/main.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -69,7 +69,7 @@ jobs:
6969
# Workaround https://github.com/nektos/act/issues/1875
7070
uses: apple/swift-nio/.github/workflows/wasm_swift_sdk.yml@main
7171
with:
72-
additional_command_arguments: "--target NIOCore"
72+
additional_command_arguments: "--target _NIOWASIPlatformCompilationChecks"
7373

7474
android-sdk:
7575
name: Android Swift SDK

.github/workflows/pull_request.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -103,7 +103,7 @@ jobs:
103103
# Workaround https://github.com/nektos/act/issues/1875
104104
uses: apple/swift-nio/.github/workflows/wasm_swift_sdk.yml@main
105105
with:
106-
additional_command_arguments: "--target NIOCore"
106+
additional_command_arguments: "--target _NIOWASIPlatformCompilationChecks"
107107

108108
android-sdk:
109109
name: Android Swift SDK

Package.swift

Lines changed: 13 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -138,6 +138,19 @@ let package = Package(
138138
],
139139
swiftSettings: swiftSettings
140140
),
141+
// Sole purpose of this target is to check all modules
142+
// currently expected to pass compilation for WASI platforms
143+
.target(
144+
name: "_NIOWASIPlatformCompilationChecks",
145+
dependencies: [
146+
.target(name: "NIOAsyncRuntime", condition: .when(platforms: [.wasi])),
147+
"NIOCore",
148+
"NIOEmbedded", // This should be properly elided in source files for WASI platforms
149+
"NIOPosix", // This should be properly elided in source files for WASI platforms
150+
swiftAtomics,
151+
],
152+
swiftSettings: swiftSettings
153+
),
141154
.target(
142155
name: "NIOFoundationCompat",
143156
dependencies: [
Lines changed: 19 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,19 @@
1+
//===----------------------------------------------------------------------===//
2+
//
3+
// This source file is part of the SwiftNIO open source project
4+
//
5+
// Copyright (c) 2026 Apple Inc. and the SwiftNIO project authors
6+
// Licensed under Apache License v2.0
7+
//
8+
// See LICENSE.txt for license information
9+
// See CONTRIBUTORS.txt for the list of SwiftNIO project authors
10+
//
11+
// SPDX-License-Identifier: Apache-2.0
12+
//
13+
//===----------------------------------------------------------------------===//
14+
15+
// NOTE: This file is intentionally empty. The purpose of _NIOWASIPlatformCompilationChecks is
16+
// to consume all modules expected to pass compilation for WASI platforms.
17+
//
18+
// The target is not exposed as a public target in the swift-nio package, and is not
19+
// intended for public consumption as a dependency.

0 commit comments

Comments
 (0)