File tree Expand file tree Collapse file tree 2 files changed +25
-2
lines changed
Sources/MCP/Base/Transports Expand file tree Collapse file tree 2 files changed +25
-2
lines changed Original file line number Diff line number Diff line change 42
42
43
43
- name : Run tests
44
44
run : swift test -v
45
+
46
+ static-linux-sdk-build :
47
+ name : Linux Static SDK Build (${{ matrix.swift-version }} - ${{ matrix.os }})
48
+ strategy :
49
+ matrix :
50
+ os : [ubuntu-latest]
51
+ swift-version :
52
+ - 6.1.2
53
+ runs-on : ${{ matrix.os }}
54
+ container : swift:${{ matrix.swift-version }}-noble
55
+ timeout-minutes : 30
56
+ steps :
57
+ - name : Check out code
58
+ uses : actions/checkout@v4
59
+ - name : Install static SDK and build
60
+ env :
61
+ BUILD_FLAGS : " "
62
+ run : |
63
+ which curl || (apt -q update && apt -yq install curl)
64
+ curl -s --retry 3 https://raw.githubusercontent.com/swiftlang/github-workflows/refs/heads/main/.github/workflows/scripts/install-and-build-with-sdk.sh | \
65
+ bash -s -- --static --flags="$BUILD_FLAGS" ${{ matrix.swift-version }}
Original file line number Diff line number Diff line change @@ -13,9 +13,11 @@ import struct Foundation.Data
13
13
import Darwin. POSIX
14
14
#elseif canImport(Glibc)
15
15
import Glibc
16
+ #elseif canImport(Musl)
17
+ import Musl
16
18
#endif
17
19
18
- #if canImport(Darwin) || canImport(Glibc)
20
+ #if canImport(Darwin) || canImport(Glibc) || canImport(Musl)
19
21
/// An implementation of the MCP stdio transport protocol.
20
22
///
21
23
/// This transport implements the [stdio transport](https://modelcontextprotocol.io/specification/2025-03-26/basic/transports#stdio)
@@ -107,7 +109,7 @@ import struct Foundation.Data
107
109
/// - Parameter fileDescriptor: The file descriptor to configure
108
110
/// - Throws: Error if the operation fails
109
111
private func setNonBlocking( fileDescriptor: FileDescriptor ) throws {
110
- #if canImport(Darwin) || canImport(Glibc)
112
+ #if canImport(Darwin) || canImport(Glibc) || canImport(Musl)
111
113
// Get current flags
112
114
let flags = fcntl ( fileDescriptor. rawValue, F_GETFL)
113
115
guard flags >= 0 else {
You can’t perform that action at this time.
0 commit comments