From 384b467815d113c3f873cd3e8bb9b9a8b7931b30 Mon Sep 17 00:00:00 2001 From: Yakov Manshin Date: Wed, 18 Sep 2024 18:39:07 +0200 Subject: [PATCH] [#113] Enabled Concurrency Checking (#155) * Enabled complete concurrency checking in `Package.swift` * Added Swift 6 and Xcode 16 to GitHub Actions workflows --- .github/workflows/Common.yml | 7 +++++-- .github/workflows/Release.yml | 2 +- Package.swift | 13 ++++++++++--- 3 files changed, 16 insertions(+), 6 deletions(-) diff --git a/.github/workflows/Common.yml b/.github/workflows/Common.yml index 11b69d8..3950ddf 100644 --- a/.github/workflows/Common.yml +++ b/.github/workflows/Common.yml @@ -16,15 +16,18 @@ on: type: boolean required: true env: - XCODE_PATH: "/Applications/Xcode_15.3.app" + XCODE_PATH: "/Applications/Xcode_16.0.app" jobs: spm_tests_macos: name: SPM Tests (Swift ${{ matrix.SWIFT_VERSION }} on macOS) runs-on: ${{ matrix.OS }} strategy: matrix: - SWIFT_VERSION: ["5.10", "5.9"] + SWIFT_VERSION: ["6.0", "5.10", "5.9"] include: + - SWIFT_VERSION: "6.0" + OS: macos-14 + XCODE_APP_NAME: "Xcode_16.0" - SWIFT_VERSION: "5.10" OS: macos-14 XCODE_APP_NAME: "Xcode_15.3" diff --git a/.github/workflows/Release.yml b/.github/workflows/Release.yml index 791cde1..1802b44 100644 --- a/.github/workflows/Release.yml +++ b/.github/workflows/Release.yml @@ -3,7 +3,7 @@ on: release: types: [published] env: - XCODE_PATH: "/Applications/Xcode_15.3.app" + XCODE_PATH: "/Applications/Xcode_16.0.app" jobs: run_common_checks: uses: ./.github/workflows/Common.yml diff --git a/Package.swift b/Package.swift index 572bc96..99dc923 100644 --- a/Package.swift +++ b/Package.swift @@ -17,12 +17,19 @@ let package = Package( targets: [ .target( name: "YMFF", - dependencies: ["YMFFProtocols"] + dependencies: ["YMFFProtocols"], + swiftSettings: swiftSettings ), - .target(name: "YMFFProtocols"), + .target(name: "YMFFProtocols", swiftSettings: swiftSettings), .testTarget( name: "YMFFTests", - dependencies: ["YMFF"] + dependencies: ["YMFF"], + swiftSettings: swiftSettings ), ] ) + +fileprivate let swiftSettings: [SwiftSetting] = [ + .enableExperimentalFeature("StrictConcurrency"), + .enableUpcomingFeature("StrictConcurrency"), +]