Skip to content

Commit a232ddb

Browse files
authored
Bump Xcode (#16)
* Adopt enableUpcomingFeature with StrictConcurrency * Adopt fulfillment(of:timeout:) as waitForExpectations(timeout:) is deprecated in an async context * Bump minimum supported version to Xcode 14.3.0 * Update macOS version * Use cached ruby version – no need to install the latest * Bump simulator versions to match newer Xcode * Bump macOS version in build.swift
1 parent 63c36d7 commit a232ddb

File tree

11 files changed

+27
-38
lines changed

11 files changed

+27
-38
lines changed

.github/workflows/ci.yml

Lines changed: 7 additions & 16 deletions
Original file line numberDiff line numberDiff line change
@@ -9,22 +9,19 @@ on:
99
jobs:
1010
pod-lint:
1111
name: Pod Lint
12-
runs-on: macOS-12
12+
runs-on: macos-13
1313
steps:
14-
- uses: ruby/setup-ruby@v1
15-
with:
16-
ruby-version: '2.7.6'
1714
- name: Checkout Repo
1815
uses: actions/checkout@v3
1916
- name: Bundle Install
2017
run: bundle install
2118
- name: Select Xcode Version
22-
run: sudo xcode-select --switch /Applications/Xcode_14.1.0.app/Contents/Developer
19+
run: sudo xcode-select --switch /Applications/Xcode_14.3.0.app/Contents/Developer
2320
- name: Lint Podspec
24-
run: bundle exec pod lib lint --verbose --fail-fast --swift-version=5.7
21+
run: bundle exec pod lib lint --verbose --fail-fast --swift-version=5.8
2522
spm-14:
2623
name: Build Xcode 14
27-
runs-on: macOS-12
24+
runs-on: macos-13
2825
strategy:
2926
matrix:
3027
platforms: [
@@ -33,15 +30,12 @@ jobs:
3330
]
3431
fail-fast: false
3532
steps:
36-
- uses: ruby/setup-ruby@v1
37-
with:
38-
ruby-version: '2.7.6'
3933
- name: Checkout Repo
4034
uses: actions/checkout@v3
4135
- name: Bundle Install
4236
run: bundle install
4337
- name: Select Xcode Version
44-
run: sudo xcode-select --switch /Applications/Xcode_14.1.0.app/Contents/Developer
38+
run: sudo xcode-select --switch /Applications/Xcode_14.3.0.app/Contents/Developer
4539
- name: Build and Test Framework
4640
run: Scripts/build.swift ${{ matrix.platforms }}
4741
- name: Prepare Coverage Reports
@@ -51,16 +45,13 @@ jobs:
5145
uses: codecov/codecov-action@v3
5246
spm-14-swift:
5347
name: Swift Build Xcode 14
54-
runs-on: macOS-12
48+
runs-on: macos-13
5549
steps:
56-
- uses: ruby/setup-ruby@v1
57-
with:
58-
ruby-version: '2.7.6'
5950
- name: Checkout Repo
6051
uses: actions/checkout@v3
6152
- name: Bundle Install
6253
run: bundle install
6354
- name: Select Xcode Version
64-
run: sudo xcode-select --switch /Applications/Xcode_14.1.0.app/Contents/Developer
55+
run: sudo xcode-select --switch /Applications/Xcode_14.3.0.app/Contents/Developer
6556
- name: Build and Test Framework
6657
run: xcrun swift test -c release -Xswiftc -enable-testing

.ruby-version

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1 +1 @@
1-
2.7.6
1+
3.0.6

AsyncQueue.podspec

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,12 +1,12 @@
11
Pod::Spec.new do |s|
22
s.name = 'AsyncQueue'
3-
s.version = '0.3.1'
3+
s.version = '0.4.0'
44
s.license = 'MIT'
55
s.summary = 'A queue that enables ordered sending of events from synchronous to asynchronous code.'
66
s.homepage = 'https://github.com/dfed/swift-async-queue'
77
s.authors = 'Dan Federman'
88
s.source = { :git => 'https://github.com/dfed/swift-async-queue.git', :tag => s.version }
9-
s.swift_version = '5.7'
9+
s.swift_version = '5.8'
1010
s.source_files = 'Sources/**/*.{swift}'
1111
s.ios.deployment_target = '13.0'
1212
s.tvos.deployment_target = '13.0'

Gemfile

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
ruby '2.7.6'
1+
ruby '3.0.6'
22

33
source 'https://rubygems.org'
44

Gemfile.lock

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -92,7 +92,7 @@ DEPENDENCIES
9292
cocoapods (~> 1.12.0)
9393

9494
RUBY VERSION
95-
ruby 2.7.6p219
95+
ruby 3.0.6p216
9696

9797
BUNDLED WITH
98-
2.3.15
98+
2.4.12

Package.swift

Lines changed: 2 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
// swift-tools-version: 5.7
1+
// swift-tools-version: 5.8
22
// The swift-tools-version declares the minimum version of Swift required to build this package.
33

44
import PackageDescription
@@ -24,9 +24,7 @@ let package = Package(
2424
name: "AsyncQueueTests",
2525
dependencies: ["AsyncQueue"],
2626
swiftSettings: [
27-
// TODO: Adopt `enableUpcomingFeature` once available.
28-
// https://github.com/apple/swift-evolution/blob/main/proposals/0362-piecemeal-future-features.md
29-
.unsafeFlags(["-Xfrontend", "-strict-concurrency=complete"])
27+
.enableUpcomingFeature("StrictConcurrency")
3028
]),
3129
]
3230
)

README.md

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -171,12 +171,12 @@ func testMainActorQueueOrdering() async {
171171

172172
## Requirements
173173

174-
* Xcode 14.1 or later.
174+
* Xcode 14.3 or later.
175175
* iOS 13 or later.
176176
* tvOS 13 or later.
177177
* watchOS 6 or later.
178178
* macOS 10.15 or later.
179-
* Swift 5.7 or later.
179+
* Swift 5.8 or later.
180180

181181
## Installation
182182

@@ -186,7 +186,7 @@ To install swift-async-queue in your iOS project with [Swift Package Manager](ht
186186

187187
```swift
188188
dependencies: [
189-
.package(url: "https://github.com/dfed/swift-async-queue", from: "0.3.0"),
189+
.package(url: "https://github.com/dfed/swift-async-queue", from: "0.4.0"),
190190
]
191191
```
192192

Scripts/build.swift

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -47,7 +47,7 @@ enum Platform: String, CaseIterable, CustomStringConvertible {
4747
case .iOS_15:
4848
return "platform=iOS Simulator,OS=15.5,name=iPad Pro (12.9-inch) (5th generation)"
4949
case .iOS_16:
50-
return "platform=iOS Simulator,OS=16.1,name=iPad Pro (12.9-inch) (5th generation)"
50+
return "platform=iOS Simulator,OS=16.4,name=iPad Pro (12.9-inch) (6th generation)"
5151

5252
case .tvOS_13:
5353
return "platform=tvOS Simulator,OS=13.4,name=Apple TV"
@@ -56,7 +56,7 @@ enum Platform: String, CaseIterable, CustomStringConvertible {
5656
case .tvOS_15:
5757
return "platform=tvOS Simulator,OS=15.4,name=Apple TV"
5858
case .tvOS_16:
59-
return "platform=tvOS Simulator,OS=16.1,name=Apple TV"
59+
return "platform=tvOS Simulator,OS=16.4,name=Apple TV"
6060

6161
case .macOS_10_15,
6262
.macOS_11,
@@ -71,7 +71,7 @@ enum Platform: String, CaseIterable, CustomStringConvertible {
7171
case .watchOS_8:
7272
return "OS=8.5,name=Apple Watch Series 6 - 44mm"
7373
case .watchOS_9:
74-
return "OS=9.0,name=Apple Watch Series 7 (45mm)"
74+
return "OS=9.4,name=Apple Watch Series 7 (45mm)"
7575
}
7676
}
7777

@@ -96,7 +96,7 @@ enum Platform: String, CaseIterable, CustomStringConvertible {
9696
case .macOS_12:
9797
return "macosx12.3"
9898
case .macOS_13:
99-
return "macosx13.0"
99+
return "macosx13.3"
100100

101101
case .watchOS_6,
102102
.watchOS_7,

Tests/AsyncQueueTests/ActorQueueTests.swift

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -133,7 +133,7 @@ final class ActorQueueTests: XCTestCase {
133133
// Signal the semaphore to unlock the enqueued tasks.
134134
await semaphore.signal()
135135

136-
await waitForExpectations(timeout: 1.0)
136+
await fulfillment(of: [expectation], timeout: 1.0)
137137
}
138138

139139
func test_enqueue_doesNotRetainTaskAfterExecution() async {
@@ -177,7 +177,7 @@ final class ActorQueueTests: XCTestCase {
177177
// Allow the enqueued task to complete.
178178
await asyncSemaphore.signal()
179179
// Make sure the task has completed.
180-
await waitForExpectations(timeout: 1.0)
180+
await fulfillment(of: [expectation], timeout: 1.0)
181181

182182
XCTAssertNil(referenceHolder.weakReference)
183183
}

Tests/AsyncQueueTests/FIFOQueueTests.swift

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -216,7 +216,7 @@ final class FIFOQueueTests: XCTestCase {
216216
// Signal the semaphore to unlock the remaining enqueued tasks.
217217
await semaphore.signal()
218218

219-
await waitForExpectations(timeout: 1.0)
219+
await fulfillment(of: [expectation], timeout: 1.0)
220220
}
221221

222222
func test_enqueueOn_executesAfterReceiverIsDeallocated() async {
@@ -241,7 +241,7 @@ final class FIFOQueueTests: XCTestCase {
241241
// Signal the semaphore to unlock the remaining enqueued tasks.
242242
await semaphore.signal()
243243

244-
await waitForExpectations(timeout: 1.0)
244+
await fulfillment(of: [expectation], timeout: 1.0)
245245
}
246246

247247
func test_enqueue_doesNotRetainTaskAfterExecution() async {

Tests/AsyncQueueTests/MainActorQueueTests.swift

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -128,7 +128,7 @@ final class MainActorQueueTests: XCTestCase {
128128
// Allow the enqueued task to complete.
129129
await asyncSemaphore.signal()
130130
// Make sure the task has completed.
131-
await waitForExpectations(timeout: 1.0)
131+
await fulfillment(of: [expectation], timeout: 1.0)
132132

133133
XCTAssertNil(referenceHolder.weakReference)
134134
}

0 commit comments

Comments
 (0)