From c4dee440d039d6e562f0a6d2743a58ed650efe4a Mon Sep 17 00:00:00 2001 From: Gwynne Raskind Date: Fri, 27 Sep 2024 20:07:45 -0500 Subject: [PATCH] Update base Swift version to 5.9, update CI --- .github/workflows/test.yml | 11 ++----- Package.swift | 7 ++++- Package@swift-5.9.swift | 63 -------------------------------------- 3 files changed, 9 insertions(+), 72 deletions(-) delete mode 100644 Package@swift-5.9.swift diff --git a/.github/workflows/test.yml b/.github/workflows/test.yml index 2c9c6f4..61049e6 100644 --- a/.github/workflows/test.yml +++ b/.github/workflows/test.yml @@ -27,15 +27,10 @@ jobs: fail-fast: false matrix: swift-image: - - swift:5.8-jammy - swift:5.9-jammy - swift:5.10-noble - - swiftlang/swift:nightly-6.0-jammy + - swift:6.0-noble - swiftlang/swift:nightly-main-jammy - include: - - sanitize: '--sanitize=thread' - - swift-image: swift:5.8-jammy - sanitize: '' runs-on: ubuntu-latest container: ${{ matrix.swift-image }} services: @@ -50,7 +45,7 @@ jobs: SANITIZE: ${{ matrix.sanitize }} POSTGRES_HOST: psql MYSQL_HOST: mysql - run: SWIFT_DETERMINISTIC_HASHING=1 swift test ${SANITIZE} --enable-code-coverage + run: SWIFT_DETERMINISTIC_HASHING=1 swift test --sanitize=thread --enable-code-coverage - name: Upload coverage data uses: vapor/swift-codecov-action@v0.3 with: @@ -63,7 +58,7 @@ jobs: matrix: include: - macos-version: macos-13 - xcode-version: '~15.2' + xcode-version: '~15.4' - macos-version: macos-14 xcode-version: latest-stable runs-on: ${{ matrix.macos-version }} diff --git a/Package.swift b/Package.swift index d0017c2..4588aed 100644 --- a/Package.swift +++ b/Package.swift @@ -1,4 +1,4 @@ -// swift-tools-version:5.8 +// swift-tools-version:5.9 import PackageDescription import class Foundation.ProcessInfo @@ -6,6 +6,9 @@ let package = Package( name: "QueuesFluentDriver", platforms: [ .macOS(.v10_15), + .iOS(.v13), + .watchOS(.v6), + .tvOS(.v13), ], products: [ .library(name: "QueuesFluentDriver", targets: ["QueuesFluentDriver"]), @@ -53,6 +56,8 @@ let package = Package( var swiftSettings: [SwiftSetting] { [ .enableUpcomingFeature("ForwardTrailingClosures"), + .enableUpcomingFeature("ExistentialAny"), .enableUpcomingFeature("ConciseMagicFile"), .enableUpcomingFeature("DisableOutwardActorInference"), + .enableExperimentalFeature("StrictConcurrency=complete"), ] } diff --git a/Package@swift-5.9.swift b/Package@swift-5.9.swift deleted file mode 100644 index 4588aed..0000000 --- a/Package@swift-5.9.swift +++ /dev/null @@ -1,63 +0,0 @@ -// swift-tools-version:5.9 -import PackageDescription -import class Foundation.ProcessInfo - -let package = Package( - name: "QueuesFluentDriver", - platforms: [ - .macOS(.v10_15), - .iOS(.v13), - .watchOS(.v6), - .tvOS(.v13), - ], - products: [ - .library(name: "QueuesFluentDriver", targets: ["QueuesFluentDriver"]), - ], - dependencies: [ - .package(url: "https://github.com/vapor/vapor.git", from: "4.100.0"), - .package(url: "https://github.com/vapor/fluent.git", from: "4.10.0"), - .package(url: "https://github.com/vapor/fluent-kit.git", from: "1.48.4"), - .package(url: "https://github.com/vapor/sql-kit.git", from: "3.30.0"), - .package(url: "https://github.com/vapor/queues.git", from: "1.15.0"), - .package(url: "https://github.com/vapor/console-kit.git", from: "4.14.3"), - ] + (ProcessInfo.processInfo.environment["CI"] != nil ? [ - .package(url: "https://github.com/vapor/fluent-sqlite-driver.git", from: "4.7.1"), - .package(url: "https://github.com/vapor/fluent-postgres-driver.git", from: "2.9.1"), - .package(url: "https://github.com/vapor/fluent-mysql-driver.git", from: "4.5.0"), - ] : []), - targets: [ - .target( - name: "QueuesFluentDriver", - dependencies: [ - .product(name: "Vapor", package: "vapor"), - .product(name: "Fluent", package: "fluent"), - .product(name: "FluentKit", package: "fluent-kit"), - .product(name: "FluentSQL", package: "fluent-kit"), - .product(name: "SQLKit", package: "sql-kit"), - .product(name: "Queues", package: "queues") - ], - swiftSettings: swiftSettings - ), - .testTarget( - name: "QueuesFluentDriverTests", - dependencies: [ - .product(name: "XCTVapor", package: "vapor"), - .product(name: "ConsoleKitTerminal", package: "console-kit"), - .target(name: "QueuesFluentDriver"), - ] + (ProcessInfo.processInfo.environment["CI"] != nil ? [ - .product(name: "FluentSQLiteDriver", package: "fluent-sqlite-driver"), - .product(name: "FluentPostgresDriver", package: "fluent-postgres-driver"), - .product(name: "FluentMySQLDriver", package: "fluent-mysql-driver"), - ] : []), - swiftSettings: swiftSettings - ), - ] -) - -var swiftSettings: [SwiftSetting] { [ - .enableUpcomingFeature("ForwardTrailingClosures"), - .enableUpcomingFeature("ExistentialAny"), - .enableUpcomingFeature("ConciseMagicFile"), - .enableUpcomingFeature("DisableOutwardActorInference"), - .enableExperimentalFeature("StrictConcurrency=complete"), -] }