Skip to content

Commit 78da46d

Browse files
authored
Raise minimum Swift version to 5.9 (grpc#2064)
Motivation: We support the last three released versions of Swift. Now that Swift 6.0 has been released that's 6.0, 5.10, and 5.9. We no longer need to support Swift 5.8. Modifications: - Update CI - Update docs - Remove swift-testing package dependency for Swift 6 as it's now included in the toolchain Result: Swift 5.8 is no longer supported
1 parent 07123ed commit 78da46d

File tree

4 files changed

+7
-35
lines changed

4 files changed

+7
-35
lines changed

.github/workflows/ci.yaml

Lines changed: 4 additions & 21 deletions
Original file line numberDiff line numberDiff line change
@@ -9,7 +9,7 @@ jobs:
99
name: License Header and Formatting Checks
1010
runs-on: ubuntu-latest
1111
container:
12-
image: swiftlang/swift:nightly-6.0-jammy
12+
image: swift:6.0-jammy
1313
steps:
1414
- name: "Checkout repository"
1515
uses: actions/checkout@v4
@@ -28,7 +28,7 @@ jobs:
2828
- image: swiftlang/swift:nightly-jammy
2929
# No TSAN because of: https://github.com/apple/swift/issues/59068
3030
# swift-test-flags: "--sanitize=thread"
31-
- image: swiftlang/swift:nightly-6.0-jammy
31+
- image: swift:6.0-jammy
3232
# No TSAN because of: https://github.com/apple/swift/issues/59068
3333
# swift-test-flags: "--sanitize=thread"
3434
- image: swift:5.10.1-noble
@@ -37,9 +37,6 @@ jobs:
3737
- image: swift:5.9-jammy
3838
# No TSAN because of: https://github.com/apple/swift/issues/59068
3939
# swift-test-flags: "--sanitize=thread"
40-
- image: swift:5.8-focal
41-
# No TSAN because of: https://github.com/apple/swift/issues/59068
42-
# swift-test-flags: "--sanitize=thread"
4340
name: Build and Test on ${{ matrix.image }}
4441
runs-on: ubuntu-latest
4542
container:
@@ -68,7 +65,7 @@ jobs:
6865
MAX_ALLOCS_ALLOWED_unary_1k_ping_pong: 163000
6966
MAX_ALLOCS_ALLOWED_unary_1k_ping_pong_interceptors_client: 170000
7067
MAX_ALLOCS_ALLOWED_unary_1k_ping_pong_interceptors_server: 170000
71-
- image: swiftlang/swift:nightly-6.0-jammy
68+
- image: swift:6.0-jammy
7269
swift-version: '6.0'
7370
env:
7471
MAX_ALLOCS_ALLOWED_bidi_1k_rpcs_10_requests: 323000
@@ -101,17 +98,6 @@ jobs:
10198
MAX_ALLOCS_ALLOWED_unary_1k_ping_pong: 163000
10299
MAX_ALLOCS_ALLOWED_unary_1k_ping_pong_interceptors_client: 170000
103100
MAX_ALLOCS_ALLOWED_unary_1k_ping_pong_interceptors_server: 170000
104-
- image: swift:5.8-focal
105-
swift-version: 5.8
106-
env:
107-
MAX_ALLOCS_ALLOWED_bidi_1k_rpcs_10_requests: 323000
108-
MAX_ALLOCS_ALLOWED_bidi_1k_rpcs_1_request: 161000
109-
MAX_ALLOCS_ALLOWED_embedded_server_bidi_1k_rpcs_10_small_requests: 110000
110-
MAX_ALLOCS_ALLOWED_embedded_server_bidi_1k_rpcs_1_small_request: 65000
111-
MAX_ALLOCS_ALLOWED_embedded_server_unary_1k_rpcs_1_small_request: 61000
112-
MAX_ALLOCS_ALLOWED_unary_1k_ping_pong: 163000
113-
MAX_ALLOCS_ALLOWED_unary_1k_ping_pong_interceptors_client: 170000
114-
MAX_ALLOCS_ALLOWED_unary_1k_ping_pong_interceptors_server: 170000
115101
name: Performance Tests on ${{ matrix.image }}
116102
runs-on: ubuntu-latest
117103
container:
@@ -139,7 +125,7 @@ jobs:
139125
- image: swiftlang/swift:nightly-jammy
140126
swift-tools-version: '6.0'
141127
supports-v2: true
142-
- image: swiftlang/swift:nightly-6.0-jammy
128+
- image: swift:6.0-jammy
143129
swift-tools-version: '6.0'
144130
supports-v2: true
145131
- image: swift:5.10.1-noble
@@ -148,9 +134,6 @@ jobs:
148134
- image: swift:5.9-jammy
149135
swift-tools-version: '5.9'
150136
supports-v2: false
151-
- image: swift:5.8-focal
152-
swift-tools-version: '5.8'
153-
supports-v2: false
154137
name: Integration Tests on ${{ matrix.image }}
155138
runs-on: ubuntu-latest
156139
container:

Package.swift

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
// swift-tools-version:5.8
1+
// swift-tools-version:5.9
22
/*
33
* Copyright 2017, gRPC Authors All rights reserved.
44
*

[email protected]

Lines changed: 0 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -72,10 +72,6 @@ let packageDependencies: [Package.Dependency] = [
7272
url: "https://github.com/apple/swift-distributed-tracing.git",
7373
from: "1.0.0"
7474
),
75-
.package(
76-
url: "https://github.com/swiftlang/swift-testing.git",
77-
branch: "release/6.0"
78-
),
7975
].appending(
8076
.package(
8177
url: "https://github.com/apple/swift-nio-ssl.git",
@@ -151,13 +147,6 @@ extension Target.Dependency {
151147
static var dequeModule: Self { .product(name: "DequeModule", package: "swift-collections") }
152148
static var atomics: Self { .product(name: "Atomics", package: "swift-atomics") }
153149
static var tracing: Self { .product(name: "Tracing", package: "swift-distributed-tracing") }
154-
static var testing: Self {
155-
.product(
156-
name: "Testing",
157-
package: "swift-testing",
158-
condition: .when(platforms: [.linux]) // Already included in the toolchain on Darwin
159-
)
160-
}
161150

162151
static var grpcCore: Self { .target(name: "GRPCCore") }
163152
static var grpcInProcessTransport: Self { .target(name: "GRPCInProcessTransport") }
@@ -413,7 +402,6 @@ extension Target {
413402
.grpcInProcessTransport,
414403
.dequeModule,
415404
.protobuf,
416-
.testing,
417405
],
418406
resources: [
419407
.copy("Configuration/Inputs")

Sources/GRPC/Docs.docc/index.md

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -29,7 +29,8 @@ gRPC Swift Version | Earliest Swift Version
2929
`1.11.0..< 1.16.0`.| 5.5
3030
`1.16.0..< 1.20.0` | 5.6
3131
`1.20.0..< 1.22.0` | 5.7
32-
`1.22.0...` | 5.8
32+
`1.22.0..< 1.24.0` | 5.8
33+
`1.24.0...` | 5.9
3334

3435
Versions of clients and services which are use Swift's Concurrency support
3536
are available from gRPC Swift 1.8.0 and require Swift 5.6 and newer.

0 commit comments

Comments
 (0)