Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Increase the Swift version to 6.0 #13

Merged
merged 3 commits into from
Dec 23, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
100 changes: 69 additions & 31 deletions .github/workflows/ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -34,6 +34,12 @@ jobs:
fail-fast: false
matrix:
include:
- xcode: "Xcode_16.0"
runsOn: macOS-14
name: "macOS 14, Xcode 16.0, Swift 6.0"
- xcode: "Xcode_15.4"
runsOn: macOS-14
name: "macOS 14, Xcode 15.4, Swift 5.10"
- xcode: "Xcode_15.0"
runsOn: macos-13
name: "macOS 13, Xcode 15.0, Swift 5.9.0"
Expand All @@ -44,16 +50,12 @@ jobs:
- uses: actions/checkout@v3
- name: ${{ matrix.name }}
run: xcodebuild test -scheme "Atomic" -destination "platform=macOS" clean -enableCodeCoverage YES -resultBundlePath "test_output/${{ matrix.name }}.xcresult" || exit 1
- name: Upload coverage reports to Codecov
uses: codecov/[email protected]
- name: Upload test coverage reports to Codecov
uses: space-code/oss-common-actions/.github/actions/upload_test_coverage_report@main
with:
scheme_name: Atomic
filename: ${{ matrix.name }}
token: ${{ secrets.CODECOV_TOKEN }}
xcode: true
xcode_archive_path: test_output/${{ matrix.name }}.xcresult
- uses: actions/upload-artifact@v4
with:
name: ${{ matrix.name }}
path: test_output

iOS:
name: ${{ matrix.name }}
Expand All @@ -65,6 +67,18 @@ jobs:
fail-fast: false
matrix:
include:
- destination: "OS=18.1,name=iPhone 16 Pro"
name: "iOS 18.1"
xcode: "Xcode_16.1"
runsOn: macOS-14
- destination: "OS=18.0,name=iPhone 16 Pro"
name: "iOS 18.0"
xcode: "Xcode_16.0"
runsOn: macOS-14
- destination: "OS=17.5,name=iPhone 15 Pro"
name: "iOS 17.5"
xcode: "Xcode_15.4"
runsOn: macOS-14
- destination: "OS=17.0.1,name=iPhone 14 Pro"
name: "iOS 17.0.1"
xcode: "Xcode_15.0"
Expand All @@ -77,10 +91,12 @@ jobs:
- uses: actions/checkout@v3
- name: ${{ matrix.name }}
run: xcodebuild test -scheme "Atomic" -destination "${{ matrix.destination }}" clean -enableCodeCoverage YES -resultBundlePath "test_output/${{ matrix.name }}.xcresult" || exit 1
- uses: actions/upload-artifact@v4
- name: Upload test coverage reports to Codecov
uses: space-code/oss-common-actions/.github/actions/upload_test_coverage_report@main
with:
name: ${{ matrix.name }}
path: test_output
scheme_name: Atomic
filename: ${{ matrix.name }}
token: ${{ secrets.CODECOV_TOKEN }}

tvOS:
name: ${{ matrix.name }}
Expand All @@ -92,6 +108,18 @@ jobs:
fail-fast: false
matrix:
include:
- destination: "OS=18.1,name=Apple TV"
name: "tvOS 18.1"
xcode: "Xcode_16.1"
runsOn: macOS-14
- destination: "OS=18.0,name=Apple TV"
name: "tvOS 18.0"
xcode: "Xcode_16.0"
runsOn: macOS-14
- destination: "OS=17.5,name=Apple TV"
name: "tvOS 17.5"
xcode: "Xcode_15.4"
runsOn: macOS-14
- destination: "OS=17.0,name=Apple TV"
name: "tvOS 17.0"
xcode: "Xcode_15.0"
Expand All @@ -104,16 +132,12 @@ jobs:
- uses: actions/checkout@v3
- name: ${{ matrix.name }}
run: xcodebuild test -scheme "Atomic" -destination "${{ matrix.destination }}" clean -enableCodeCoverage YES -resultBundlePath "test_output/${{ matrix.name }}.xcresult" || exit 1
- name: Upload coverage reports to Codecov
uses: codecov/[email protected]
- name: Upload test coverage reports to Codecov
uses: space-code/oss-common-actions/.github/actions/upload_test_coverage_report@main
with:
scheme_name: Atomic
filename: ${{ matrix.name }}
token: ${{ secrets.CODECOV_TOKEN }}
xcode: true
xcode_archive_path: test_output/${{ matrix.name }}.xcresult
- uses: actions/upload-artifact@v4
with:
name: ${{ matrix.name }}
path: test_output

watchOS:
name: ${{ matrix.name }}
Expand All @@ -125,6 +149,18 @@ jobs:
fail-fast: false
matrix:
include:
- destination: "OS=11.1,name=Apple Watch Series 10 (46mm)"
name: "watchOS 11.1"
xcode: "Xcode_16.1"
runsOn: macOS-14
- destination: "OS=11.0,name=Apple Watch Series 10 (46mm)"
name: "watchOS 11.0"
xcode: "Xcode_16.0"
runsOn: macOS-14
- destination: "OS=10.5,name=Apple Watch Series 9 (45mm)"
name: "watchOS 10.5"
xcode: "Xcode_15.4"
runsOn: macOS-14
- destination: "OS=10.0,name=Apple Watch Series 9 (45mm)"
name: "watchOS 10.0"
xcode: "Xcode_15.0"
Expand All @@ -137,16 +173,12 @@ jobs:
- uses: actions/checkout@v3
- name: ${{ matrix.name }}
run: xcodebuild test -scheme "Atomic" -destination "${{ matrix.destination }}" clean -enableCodeCoverage YES -resultBundlePath "test_output/${{ matrix.name }}.xcresult" || exit 1
- name: Upload coverage reports to Codecov
uses: codecov/[email protected]
- name: Upload test coverage reports to Codecov
uses: space-code/oss-common-actions/.github/actions/upload_test_coverage_report@main
with:
scheme_name: Atomic
filename: ${{ matrix.name }}
token: ${{ secrets.CODECOV_TOKEN }}
xcode: true
xcode_archive_path: test_output/${{ matrix.name }}.xcresult
- uses: actions/upload-artifact@v4
with:
name: ${{ matrix.name }}
path: test_output

spm:
name: ${{ matrix.name }}
Expand All @@ -158,10 +190,16 @@ jobs:
fail-fast: false
matrix:
include:
- name: "Xcode 15"
- name: "macOS 14, SPM 6.0.2 Test"
xcode: "Xcode_16.1"
runsOn: macOS-14
- name: "macOS 14, SPM 6.0.0 Test"
xcode: "Xcode_16.0"
runsOn: macOS-14
- name: "macOS 14, SPM 5.9.0 Test"
xcode: "Xcode_15.0"
runsOn: macos-13
- name: "Xcode 14"
runsOn: macos-14
- name: "macOS 13, SPM 5.8.1 Test"
xcode: "Xcode_14.3.1"
runsOn: macos-13
steps:
Expand All @@ -186,7 +224,7 @@ jobs:

discover-typos:
name: Discover Typos
runs-on: macOS-12
runs-on: macOS-13
env:
DEVELOPER_DIR: /Applications/Xcode_14.1.app/Contents/Developer
steps:
Expand Down
5 changes: 3 additions & 2 deletions .swiftlint.yml
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,8 @@ excluded:
- .build
- [email protected]
- [email protected]

- [email protected]
- [email protected]
# Rules

disabled_rules:
Expand Down Expand Up @@ -134,4 +135,4 @@ nesting:
type_name:
max_length:
warning: 40
error: 50
error: 50
5 changes: 5 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -1,6 +1,11 @@
# Change Log
All notable changes to this project will be documented in this file.

#### [Unreleased]

## Added
- Increase the Swift version to 6.0.
- Added in Pull Request [#11](https://github.com/space-code/atomic/pull/13).

#### 1.x Releases
- `1.0.1` Releases - [1.0.0](#100) | [1.0.1](#101)
Expand Down
2 changes: 1 addition & 1 deletion Package.swift
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
// swift-tools-version: 5.9
// swift-tools-version: 6.0
// The swift-tools-version declares the minimum version of Swift required to build this package.

import PackageDescription
Expand Down
29 changes: 29 additions & 0 deletions [email protected]
Original file line number Diff line number Diff line change
@@ -0,0 +1,29 @@
// swift-tools-version: 5.10
// The swift-tools-version declares the minimum version of Swift required to build this package.

import PackageDescription

let package = Package(
name: "Atomic",
platforms: [
.macOS(.v10_15),
.iOS(.v13),
.watchOS(.v6),
.tvOS(.v11),
.visionOS(.v1),
],
products: [
.library(name: "Atomic", targets: ["Atomic"]),
],
dependencies: [],
targets: [
.target(
name: "Atomic",
dependencies: []
),
.testTarget(
name: "AtomicTests",
dependencies: ["Atomic"]
),
]
)
29 changes: 29 additions & 0 deletions [email protected]
Original file line number Diff line number Diff line change
@@ -0,0 +1,29 @@
// swift-tools-version: 5.9
// The swift-tools-version declares the minimum version of Swift required to build this package.

import PackageDescription

let package = Package(
name: "Atomic",
platforms: [
.macOS(.v10_15),
.iOS(.v13),
.watchOS(.v6),
.tvOS(.v11),
.visionOS(.v1),
],
products: [
.library(name: "Atomic", targets: ["Atomic"]),
],
dependencies: [],
targets: [
.target(
name: "Atomic",
dependencies: []
),
.testTarget(
name: "AtomicTests",
dependencies: ["Atomic"]
),
]
)
2 changes: 1 addition & 1 deletion Sources/Atomic/Classes/Core/Atomic/Atomic.swift
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@ import Foundation
/// An `Atomic` property wrapper.
@propertyWrapper
@dynamicMemberLookup
public final class Atomic<Value> {
public final class Atomic<Value>: @unchecked Sendable {
// MARK: Properties

private let lock = UnfairLock()
Expand Down
2 changes: 1 addition & 1 deletion Tests/AtomicTests/AtomicTests.swift
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@ import XCTest

// MARK: - AtomicTests

final class AtomicTests: XCTestCase {
final class AtomicTests: XCTestCase, @unchecked Sendable {
// MARK: Properties

@Atomic private var dict = [Int: String]()
Expand Down
Loading