diff --git a/.github/workflows/swift.yml b/.github/workflows/swift.yml index bdece950d76d..e0233f5703a9 100644 --- a/.github/workflows/swift.yml +++ b/.github/workflows/swift.yml @@ -18,22 +18,22 @@ jobs: run: working-directory: src/swift/flwr name: Test - runs-on: macos-latest + runs-on: macos-14 steps: - uses: fwal/setup-swift@v2 with: - swift-version: 5 + swift-version: 5.10 - uses: actions/checkout@v4 - name: Run tests - run: arch -x86_64 xcodebuild test -scheme flwr -destination 'platform=iOS Simulator,name=iPhone 14 Pro Max,OS=16.2' + run: arch -x86_64 xcodebuild test -scheme flwr -destination 'platform=iOS Simulator,name=iPhone 15 Pro Max,OS=17.2' build_docs: - runs-on: macos-latest + runs-on: macos-14 name: Build docs steps: - uses: fwal/setup-swift@v2 with: - swift-version: 5 + swift-version: 5.10 - uses: actions/checkout@v4 - name: Build docs run: ./dev/build-swift-api-ref.sh @@ -41,12 +41,12 @@ jobs: deploy_docs: needs: "build_docs" if: ${{ github.ref == 'refs/heads/main' && github.repository == 'adap/flower' && !github.event.pull_request.head.repo.fork }} - runs-on: macos-latest + runs-on: macos-14 name: Deploy docs steps: - uses: fwal/setup-swift@v2 with: - swift-version: 5 + swift-version: 5.10 - uses: actions/checkout@v4 - name: Build and deploy docs env: diff --git a/dev/build-swift-api-ref.sh b/dev/build-swift-api-ref.sh index 4a7943f6828f..5b88f9a68320 100755 --- a/dev/build-swift-api-ref.sh +++ b/dev/build-swift-api-ref.sh @@ -28,7 +28,7 @@ find ~/Library/Developer/Xcode/DerivedData -name "flwr.doccarchive" -exec rm -Rf # In case no XCode, please refer to: https://github.com/nodejs/node-gyp/issues/569. # Generate API reference for the Swift SDK by running `xcodebuild docbuild` in src directory. cd src/swift/flwr && \ -arch -x86_64 xcodebuild docbuild -scheme flwr -destination 'platform=iOS Simulator,name=iPhone 14 Pro Max,OS=16.2' +arch -x86_64 xcodebuild docbuild -scheme flwr -destination 'platform=iOS Simulator,name=iPhone 15 Pro Max,OS=17.2' # Find the generated `doccarchive` file in XCode's derived data folder and copy it to the SwiftDoc directory. cd ../../../ diff --git a/src/swift/flwr/Package.swift b/src/swift/flwr/Package.swift index 9ebef2d89870..8adf85d67117 100644 --- a/src/swift/flwr/Package.swift +++ b/src/swift/flwr/Package.swift @@ -1,4 +1,4 @@ -// swift-tools-version: 5.6 +// swift-tools-version: 5.9 // The swift-tools-version declares the minimum version of Swift required to build this package. import PackageDescription @@ -6,7 +6,7 @@ import PackageDescription let package = Package( name: "flwr", platforms: [ - .iOS(.v13), + .iOS(.v16), ], products: [ // Products define the executables and libraries a package produces, and make them visible to other packages. @@ -19,8 +19,8 @@ let package = Package( // .package(url: /* package url */, from: "1.0.0"), .package(url: "https://github.com/pvieito/PythonKit.git", branch: "master"), .package(url: "https://github.com/kewlbear/NumPy-iOS.git", branch: "main"), - .package(url: "https://github.com/grpc/grpc-swift.git", from: "1.0.0"), - .package(url: "https://github.com/apple/swift-docc-plugin", from: "1.1.0"), + .package(url: "https://github.com/grpc/grpc-swift.git", from: "1.22.0"), + .package(url: "https://github.com/apple/swift-protobuf.git", from: "1.26.0"), ], targets: [ // Targets are the basic building blocks of a package. A target can define a module or a test suite. @@ -30,7 +30,8 @@ let package = Package( dependencies: [ .product(name: "GRPC", package: "grpc-swift"), .product(name: "NumPy-iOS", package: "NumPy-iOS"), - .product(name: "PythonKit", package: "PythonKit")], + .product(name: "PythonKit", package: "PythonKit"), + .product(name: "SwiftProtobuf", package: "swift-protobuf")], path: "Sources/Flower"), .testTarget( name: "FlowerTests",