diff --git a/.github/workflows/swift-test.yml b/.github/workflows/swift-test.yml index ef74eb3..e935fef 100644 --- a/.github/workflows/swift-test.yml +++ b/.github/workflows/swift-test.yml @@ -12,7 +12,7 @@ permissions: jobs: variables: outputs: - max-supported-swift-version: '5.9' + max-supported-swift-version: '5.10' xcode-scheme: apple-device-information xcode-platform-version: latest fail-if-codecov-fails: true @@ -25,7 +25,7 @@ jobs: strategy: matrix: os: [ macOS ] - swift-version-offset: [ 0 ] + swift-version-offset: [ 0, 1 ] uses: sersoft-gmbh/oss-common-actions/.github/workflows/swift-test-spm.yml@main with: os: ${{ matrix.os }} @@ -45,7 +45,8 @@ jobs: - iPadOS - tvOS - watchOS - swift-version-offset: [ 0 ] + - visionOS + swift-version-offset: [ 0, 1 ] uses: sersoft-gmbh/oss-common-actions/.github/workflows/swift-test-xcode.yml@main with: xcode-scheme: ${{ needs.variables.outputs.xcode-scheme }} diff --git a/Package.resolved b/Package.resolved index 759d183..0062fd8 100644 --- a/Package.resolved +++ b/Package.resolved @@ -23,8 +23,8 @@ "kind" : "remoteSourceControl", "location" : "https://github.com/sersoft-gmbh/swift-sysctl", "state" : { - "revision" : "e90ae8a93246d30624bb692d175dbb5ab0cce3ad", - "version" : "1.7.0" + "revision" : "a91be36de6803ebe48f678699dfd0694c2200d2f", + "version" : "1.8.0" } } ], diff --git a/Package.swift b/Package.swift index c309664..db14ffb 100644 --- a/Package.swift +++ b/Package.swift @@ -1,4 +1,4 @@ -// swift-tools-version:5.9 +// swift-tools-version:5.10 // The swift-tools-version declares the minimum version of Swift required to build this package. import PackageDescription @@ -8,9 +8,12 @@ let swiftSettings: Array = [ .enableUpcomingFeature("ExistentialAny"), .enableUpcomingFeature("BareSlashRegexLiterals"), .enableUpcomingFeature("DisableOutwardActorInference"), + .enableUpcomingFeature("IsolatedDefaultValues"), + .enableUpcomingFeature("DeprecateApplicationMain"), + .enableExperimentalFeature("StrictConcurrency"), + .enableExperimentalFeature("GlobalConcurrency"), // .enableExperimentalFeature("AccessLevelOnImport"), // .enableExperimentalFeature("VariadicGenerics"), -// .unsafeFlags(["-warn-concurrency"], .when(configuration: .debug)), ] let package = Package( diff --git a/Package@swift-5.9.swift b/Package@swift-5.9.swift new file mode 100644 index 0000000..a9891db --- /dev/null +++ b/Package@swift-5.9.swift @@ -0,0 +1,45 @@ +// swift-tools-version:5.9 +// The swift-tools-version declares the minimum version of Swift required to build this package. + +import PackageDescription + +let swiftSettings: Array = [ + .enableUpcomingFeature("ConciseMagicFile"), + .enableUpcomingFeature("ExistentialAny"), + .enableUpcomingFeature("BareSlashRegexLiterals"), + .enableUpcomingFeature("DisableOutwardActorInference"), + .enableExperimentalFeature("StrictConcurrency"), +// .enableExperimentalFeature("AccessLevelOnImport"), +// .enableExperimentalFeature("VariadicGenerics"), +] + +let package = Package( + name: "apple-device-information", + products: [ + // Products define the executables and libraries a package produces, and make them visible to other packages. + .library( + name: "DeviceInformation", + targets: ["DeviceInformation"]), + ], + dependencies: [ + .package(url: "https://github.com/apple/swift-docc-plugin", from: "1.0.0"), + .package(url: "https://github.com/sersoft-gmbh/swift-sysctl", from: "1.0.0"), + ], + targets: [ + // Targets are the basic building blocks of a package. A target can define a module or a test suite. + // Targets can depend on other targets in this package, and on products in packages this package depends on. + .target( + name: "DeviceInformation", + dependencies: [ + .product(name: "Sysctl", package: "swift-sysctl"), + ], + swiftSettings: swiftSettings), + .testTarget( + name: "DeviceInformationTests", + dependencies: [ + .product(name: "Sysctl", package: "swift-sysctl"), + "DeviceInformation", + ], + swiftSettings: swiftSettings), + ] +)