Skip to content
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
181 changes: 69 additions & 112 deletions .github/workflows/ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,12 @@ on:
branches:
- main
- dev
paths:
- '.swiftlint.yml'
- ".github/workflows/**"
- "Package*.swift"
- "Sources/**"
- "Tests/**"
pull_request:
paths:
- '.swiftlint.yml'
Expand All @@ -13,98 +19,31 @@ on:
- "Sources/**"
- "Tests/**"

permissions:
contents: read

concurrency:
group: blade-${{ github.head_ref || github.ref }}
cancel-in-progress: true

env:
SCHEME_NAME: "Blade-Package"

jobs:
SwiftLint:
swiftlint:
name: SwiftLint
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
- name: Checkout code
uses: actions/checkout@v7
- name: GitHub Action for SwiftLint
uses: norio-nomura/action-swiftlint@3.2.1
with:
args: --strict
env:
DIFF_BASE: ${{ github.base_ref }}
macOS:
name: ${{ matrix.name }}
runs-on: ${{ matrix.runsOn }}
env:
DEVELOPER_DIR: "/Applications/${{ matrix.xcode }}.app/Contents/Developer"
timeout-minutes: 20
strategy:
fail-fast: false
matrix:
include:
- xcode: "Xcode_16.4"
runsOn: macos-15
name: "macOS 15, Xcode 16.4, Swift 6.1"
params: "-skipMacroValidation"
steps:
- uses: actions/checkout@v4
- name: ${{ matrix.name }}
run: xcodebuild test -scheme "Blade-Package" -destination "platform=macOS" clean -enableCodeCoverage YES ${{ matrix.params }} -resultBundlePath "test_output/${{ matrix.name }}.xcresult" || exit 1
- name: Upload coverage reports to Codecov
uses: codecov/codecov-action@v4.5.0
with:
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 }}
runs-on: ${{ matrix.runsOn }}
env:
DEVELOPER_DIR: "/Applications/${{ matrix.xcode }}.app/Contents/Developer"
timeout-minutes: 20
strategy:
fail-fast: false
matrix:
include:
- destination: "platform=iOS Simulator,name=iPhone 16 Pro"
name: "iOS 18"
xcode: "Xcode_16.4"
runsOn: macos-15
params: "-skipMacroValidation"
steps:
- uses: actions/checkout@v4
- name: ${{ matrix.name }}
run: xcodebuild test -scheme "Blade-Package" -destination "${{ matrix.destination }}" clean -enableCodeCoverage YES ${{ matrix.params }} -resultBundlePath "test_output/${{ matrix.name }}.xcresult" || exit 1
- uses: actions/upload-artifact@v4
with:
name: ${{ matrix.name }}
path: test_output
tvOS:
name: ${{ matrix.name }}
runs-on: ${{ matrix.runsOn }}
env:
DEVELOPER_DIR: "/Applications/${{ matrix.xcode }}.app/Contents/Developer"
timeout-minutes: 20
strategy:
fail-fast: false
matrix:
include:
- destination: "platform=tvOS Simulator,name=Apple TV"
name: "tvOS 18"
xcode: "Xcode_16.4"
runsOn: macos-15
params: "-skipMacroValidation"
steps:
- uses: actions/checkout@v4
- name: ${{ matrix.name }}
run: xcodebuild test -scheme "Blade-Package" -destination "${{ matrix.destination }}" clean -enableCodeCoverage YES ${{ matrix.params }} -resultBundlePath "test_output/${{ matrix.name }}.xcresult" || exit 1
- name: Upload coverage reports to Codecov
uses: codecov/codecov-action@v4.5.0
with:
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:

test-apple-platforms:
name: ${{ matrix.name }}
runs-on: ${{ matrix.runsOn }}
env:
Expand All @@ -114,26 +53,41 @@ jobs:
fail-fast: false
matrix:
include:
- destination: "platform=watchOS Simulator,name=Apple Watch Series 10 (46mm)"
name: "watchOS 11"
xcode: "Xcode_16.4"
runsOn: macos-15
params: "-skipMacroValidation"
# macOS
- { platform: macOS, name: "macOS 26, Xcode 26.5, Swift 6.2", xcode: "Xcode_26.5", runsOn: macOS-26, destination: "platform=macOS" }
- { platform: macOS, name: "macOS 15, Xcode 16.4, Swift 6.1", xcode: "Xcode_16.4", runsOn: macOS-15, destination: "platform=macOS" }

# iOS
- { platform: iOS, name: "iOS 26.5", xcode: "Xcode_26.5", runsOn: macOS-26, destination: "OS=26.5,name=iPhone 17 Pro" }
- { platform: iOS, name: "iOS 18.5", xcode: "Xcode_16.4", runsOn: macOS-15, destination: "OS=18.5,name=iPhone 16 Pro" }

# tvOS
- { platform: tvOS, name: "tvOS 26.5", xcode: "Xcode_26.5", runsOn: macOS-26, destination: "OS=26.5,name=Apple TV" }
- { platform: tvOS, name: "tvOS 18.5", xcode: "Xcode_16.4", runsOn: macOS-15, destination: "OS=18.5,name=Apple TV" }

# watchOS
- { platform: watchOS, name: "watchOS 26.5", xcode: "Xcode_26.5", runsOn: macOS-26, destination: "OS=26.5,name=Apple Watch Ultra 3 (49mm)" }
- { platform: watchOS, name: "watchOS 11.5", xcode: "Xcode_16.4", runsOn: macOS-15, destination: "OS=11.5,name=Apple Watch Series 10 (46mm)" }
steps:
- uses: actions/checkout@v4
- name: ${{ matrix.name }}
run: xcodebuild test -scheme "Blade-Package" -destination "${{ matrix.destination }}" clean -enableCodeCoverage YES ${{ matrix.params }} -resultBundlePath "test_output/${{ matrix.name }}.xcresult" || exit 1
- name: Upload coverage reports to Codecov
uses: codecov/codecov-action@v4.5.0
- name: Checkout code
uses: actions/checkout@v7
- name: Run tests - ${{ matrix.name }}
run: |
xcodebuild test \
-scheme "${{ env.SCHEME_NAME }}" \
-destination "${{ matrix.destination }}" \
-enableCodeCoverage YES \
-skipMacroValidation \
-resultBundlePath "test_output/${{ matrix.name }}.xcresult" \
clean || exit 1
- name: Upload test coverage to Codecov
uses: space-code/oss-common-actions/.github/actions/upload_test_coverage_report@main
with:
scheme_name: ${{ env.SCHEME_NAME }}
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:

spm-build:
name: ${{ matrix.name }}
runs-on: ${{ matrix.runsOn }}
env:
Expand All @@ -143,40 +97,43 @@ jobs:
fail-fast: false
matrix:
include:
- name: "Xcode 16"
xcode: "Xcode_16.4"
runsOn: macos-15
- { name: "macOS 26, SPM 6.2", xcode: "Xcode_26.5", runsOn: macOS-26 }
- { name: "macOS 15, SPM 6.1", xcode: "Xcode_16.4", runsOn: macOS-15 }
steps:
- uses: actions/checkout@v4
- name: Checkout code
uses: actions/checkout@v7
- name: Toolchain versions
run: |
swift --version
xcodebuild -version
- name: ${{ matrix.name }}
# Debug build: release builds crash the Swift 6.x optimizer on some dependency versions.
- name: Build with Swift Package Manager - ${{ matrix.name }}
run: |
swift build --target "Blade"
swift build --target "BladeTCA"

merge-test-reports:
needs: [iOS, macOS, watchOS, tvOS]
runs-on: macos-15
needs: test-apple-platforms
runs-on: macos-26
steps:
- name: Download artifacts
uses: actions/download-artifact@v4
uses: actions/download-artifact@v8
with:
path: test_output
- run: xcrun xcresulttool merge test_output/**/*.xcresult --output-path test_output/final/final.xcresult
- name: Upload Merged Artifact
uses: actions/upload-artifact@v4
- name: Upload merged test results
uses: actions/upload-artifact@v7
with:
name: MergedResult
name: MergedTestResults
path: test_output/final
retention-days: 30

discover-typos:
name: Discover Typos
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
- name: Checkout code
uses: actions/checkout@v7
- name: Discover typos
run: |
python3 -m pip install --upgrade pip
Expand Down
3 changes: 1 addition & 2 deletions .swiftlint.yml
Original file line number Diff line number Diff line change
@@ -1,8 +1,7 @@
excluded:
- Tests
- Package.swift
- Package@swift-5.7.swift
- Package@swift-5.8.swift
- Package@swift-6.1.swift
- .build

# Rules
Expand Down
10 changes: 10 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,16 @@ All notable changes to this project will be documented in this file.
#### 1.x Releases
- `1.0.x` Releases - [1.0.0](#100) | [1.1.0](#110)

## Unreleased

#### Changed
- Adopt Swift 6 language mode with strict concurrency (Swift 6.2 toolchain; Swift 6.1 uses `Package@swift-6.1.swift`).
- **Breaking:** minimum Swift toolchain is now 6.1 (Xcode 16.3+). `Package@swift-5.7.swift` and `Package@swift-5.8.swift` removed.
- **Breaking:** update `swift-composable-architecture` to 1.26.2 (minimum version is now 1.26.2).
- **Breaking:** public generics and loader/strategy protocols now require `Sendable` (`Element`, `State`, `Action`, `Request`, `ICursorPageLoader`, `IOffsetPageLoader`, `IPaginator`).
- **Breaking:** `Reducer.paginator(...)` is only available when the parent reducer's `State` is `Sendable`.
- `CursorPaginatorState`, `PaginatorState` and `PaginatorAction` are `Sendable` when their identifiers are `Sendable`.

## [1.1.0](https://github.com/space-code/blade/releases/tag/1.1.0)
Released on 2024-08-26.

Expand Down
Loading
Loading