diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml index 36fb562..0c7c5f7 100644 --- a/.github/workflows/ci.yml +++ b/.github/workflows/ci.yml @@ -9,22 +9,19 @@ on: jobs: pod-lint: name: Pod Lint - runs-on: macOS-12 + runs-on: macos-13 steps: - - uses: ruby/setup-ruby@v1 - with: - ruby-version: '2.7.6' - name: Checkout Repo uses: actions/checkout@v3 - name: Bundle Install run: bundle install - name: Select Xcode Version - run: sudo xcode-select --switch /Applications/Xcode_14.1.0.app/Contents/Developer + run: sudo xcode-select --switch /Applications/Xcode_14.3.0.app/Contents/Developer - name: Lint Podspec - run: bundle exec pod lib lint --verbose --fail-fast --swift-version=5.7 + run: bundle exec pod lib lint --verbose --fail-fast --swift-version=5.8 spm-14: name: Build Xcode 14 - runs-on: macOS-12 + runs-on: macos-13 strategy: matrix: platforms: [ @@ -33,15 +30,12 @@ jobs: ] fail-fast: false steps: - - uses: ruby/setup-ruby@v1 - with: - ruby-version: '2.7.6' - name: Checkout Repo uses: actions/checkout@v3 - name: Bundle Install run: bundle install - name: Select Xcode Version - run: sudo xcode-select --switch /Applications/Xcode_14.1.0.app/Contents/Developer + run: sudo xcode-select --switch /Applications/Xcode_14.3.0.app/Contents/Developer - name: Build and Test Framework run: Scripts/build.swift ${{ matrix.platforms }} - name: Prepare Coverage Reports @@ -51,16 +45,13 @@ jobs: uses: codecov/codecov-action@v3 spm-14-swift: name: Swift Build Xcode 14 - runs-on: macOS-12 + runs-on: macos-13 steps: - - uses: ruby/setup-ruby@v1 - with: - ruby-version: '2.7.6' - name: Checkout Repo uses: actions/checkout@v3 - name: Bundle Install run: bundle install - name: Select Xcode Version - run: sudo xcode-select --switch /Applications/Xcode_14.1.0.app/Contents/Developer + run: sudo xcode-select --switch /Applications/Xcode_14.3.0.app/Contents/Developer - name: Build and Test Framework run: xcrun swift test -c release -Xswiftc -enable-testing diff --git a/.ruby-version b/.ruby-version index 49cdd66..818bd47 100644 --- a/.ruby-version +++ b/.ruby-version @@ -1 +1 @@ -2.7.6 +3.0.6 diff --git a/AsyncQueue.podspec b/AsyncQueue.podspec index 91974d5..ee42600 100644 --- a/AsyncQueue.podspec +++ b/AsyncQueue.podspec @@ -1,12 +1,12 @@ Pod::Spec.new do |s| s.name = 'AsyncQueue' - s.version = '0.3.1' + s.version = '0.4.0' s.license = 'MIT' s.summary = 'A queue that enables ordered sending of events from synchronous to asynchronous code.' s.homepage = 'https://github.com/dfed/swift-async-queue' s.authors = 'Dan Federman' s.source = { :git => 'https://github.com/dfed/swift-async-queue.git', :tag => s.version } - s.swift_version = '5.7' + s.swift_version = '5.8' s.source_files = 'Sources/**/*.{swift}' s.ios.deployment_target = '13.0' s.tvos.deployment_target = '13.0' diff --git a/Gemfile b/Gemfile index cda0c02..99cf8e7 100644 --- a/Gemfile +++ b/Gemfile @@ -1,4 +1,4 @@ -ruby '2.7.6' +ruby '3.0.6' source 'https://rubygems.org' diff --git a/Gemfile.lock b/Gemfile.lock index 8d7bca1..abe2ae6 100644 --- a/Gemfile.lock +++ b/Gemfile.lock @@ -92,7 +92,7 @@ DEPENDENCIES cocoapods (~> 1.12.0) RUBY VERSION - ruby 2.7.6p219 + ruby 3.0.6p216 BUNDLED WITH - 2.3.15 + 2.4.12 diff --git a/Package.swift b/Package.swift index 0c689a4..185d71f 100644 --- a/Package.swift +++ b/Package.swift @@ -1,4 +1,4 @@ -// swift-tools-version: 5.7 +// swift-tools-version: 5.8 // The swift-tools-version declares the minimum version of Swift required to build this package. import PackageDescription @@ -24,9 +24,7 @@ let package = Package( name: "AsyncQueueTests", dependencies: ["AsyncQueue"], swiftSettings: [ - // TODO: Adopt `enableUpcomingFeature` once available. - // https://github.com/apple/swift-evolution/blob/main/proposals/0362-piecemeal-future-features.md - .unsafeFlags(["-Xfrontend", "-strict-concurrency=complete"]) + .enableUpcomingFeature("StrictConcurrency") ]), ] ) diff --git a/README.md b/README.md index c8fbdeb..4ffda3a 100644 --- a/README.md +++ b/README.md @@ -171,12 +171,12 @@ func testMainActorQueueOrdering() async { ## Requirements -* Xcode 14.1 or later. +* Xcode 14.3 or later. * iOS 13 or later. * tvOS 13 or later. * watchOS 6 or later. * macOS 10.15 or later. -* Swift 5.7 or later. +* Swift 5.8 or later. ## Installation @@ -186,7 +186,7 @@ To install swift-async-queue in your iOS project with [Swift Package Manager](ht ```swift dependencies: [ - .package(url: "https://github.com/dfed/swift-async-queue", from: "0.3.0"), + .package(url: "https://github.com/dfed/swift-async-queue", from: "0.4.0"), ] ``` diff --git a/Scripts/build.swift b/Scripts/build.swift index b3ee5a8..18d991a 100755 --- a/Scripts/build.swift +++ b/Scripts/build.swift @@ -47,7 +47,7 @@ enum Platform: String, CaseIterable, CustomStringConvertible { case .iOS_15: return "platform=iOS Simulator,OS=15.5,name=iPad Pro (12.9-inch) (5th generation)" case .iOS_16: - return "platform=iOS Simulator,OS=16.1,name=iPad Pro (12.9-inch) (5th generation)" + return "platform=iOS Simulator,OS=16.4,name=iPad Pro (12.9-inch) (6th generation)" case .tvOS_13: return "platform=tvOS Simulator,OS=13.4,name=Apple TV" @@ -56,7 +56,7 @@ enum Platform: String, CaseIterable, CustomStringConvertible { case .tvOS_15: return "platform=tvOS Simulator,OS=15.4,name=Apple TV" case .tvOS_16: - return "platform=tvOS Simulator,OS=16.1,name=Apple TV" + return "platform=tvOS Simulator,OS=16.4,name=Apple TV" case .macOS_10_15, .macOS_11, @@ -71,7 +71,7 @@ enum Platform: String, CaseIterable, CustomStringConvertible { case .watchOS_8: return "OS=8.5,name=Apple Watch Series 6 - 44mm" case .watchOS_9: - return "OS=9.0,name=Apple Watch Series 7 (45mm)" + return "OS=9.4,name=Apple Watch Series 7 (45mm)" } } @@ -96,7 +96,7 @@ enum Platform: String, CaseIterable, CustomStringConvertible { case .macOS_12: return "macosx12.3" case .macOS_13: - return "macosx13.0" + return "macosx13.3" case .watchOS_6, .watchOS_7, diff --git a/Tests/AsyncQueueTests/ActorQueueTests.swift b/Tests/AsyncQueueTests/ActorQueueTests.swift index fec8209..8796678 100644 --- a/Tests/AsyncQueueTests/ActorQueueTests.swift +++ b/Tests/AsyncQueueTests/ActorQueueTests.swift @@ -133,7 +133,7 @@ final class ActorQueueTests: XCTestCase { // Signal the semaphore to unlock the enqueued tasks. await semaphore.signal() - await waitForExpectations(timeout: 1.0) + await fulfillment(of: [expectation], timeout: 1.0) } func test_enqueue_doesNotRetainTaskAfterExecution() async { @@ -177,7 +177,7 @@ final class ActorQueueTests: XCTestCase { // Allow the enqueued task to complete. await asyncSemaphore.signal() // Make sure the task has completed. - await waitForExpectations(timeout: 1.0) + await fulfillment(of: [expectation], timeout: 1.0) XCTAssertNil(referenceHolder.weakReference) } diff --git a/Tests/AsyncQueueTests/FIFOQueueTests.swift b/Tests/AsyncQueueTests/FIFOQueueTests.swift index 8799b9a..08c103d 100644 --- a/Tests/AsyncQueueTests/FIFOQueueTests.swift +++ b/Tests/AsyncQueueTests/FIFOQueueTests.swift @@ -216,7 +216,7 @@ final class FIFOQueueTests: XCTestCase { // Signal the semaphore to unlock the remaining enqueued tasks. await semaphore.signal() - await waitForExpectations(timeout: 1.0) + await fulfillment(of: [expectation], timeout: 1.0) } func test_enqueueOn_executesAfterReceiverIsDeallocated() async { @@ -241,7 +241,7 @@ final class FIFOQueueTests: XCTestCase { // Signal the semaphore to unlock the remaining enqueued tasks. await semaphore.signal() - await waitForExpectations(timeout: 1.0) + await fulfillment(of: [expectation], timeout: 1.0) } func test_enqueue_doesNotRetainTaskAfterExecution() async { diff --git a/Tests/AsyncQueueTests/MainActorQueueTests.swift b/Tests/AsyncQueueTests/MainActorQueueTests.swift index c50750f..f3a7a60 100644 --- a/Tests/AsyncQueueTests/MainActorQueueTests.swift +++ b/Tests/AsyncQueueTests/MainActorQueueTests.swift @@ -128,7 +128,7 @@ final class MainActorQueueTests: XCTestCase { // Allow the enqueued task to complete. await asyncSemaphore.signal() // Make sure the task has completed. - await waitForExpectations(timeout: 1.0) + await fulfillment(of: [expectation], timeout: 1.0) XCTAssertNil(referenceHolder.weakReference) }