Skip to content

feat!: adopt Swift 6.2 strict concurrency and update TCA to 1.26.2 #37

feat!: adopt Swift 6.2 strict concurrency and update TCA to 1.26.2

feat!: adopt Swift 6.2 strict concurrency and update TCA to 1.26.2 #37

Workflow file for this run

name: "blade"
on:
push:
branches:
- main
- dev
paths:
- '.swiftlint.yml'
- ".github/workflows/**"
- "Package*.swift"
- "Sources/**"
- "Tests/**"
pull_request:
paths:
- '.swiftlint.yml'
- ".github/workflows/**"
- "Package*.swift"
- "Sources/**"
- "Tests/**"
permissions:
contents: read
concurrency:
group: blade-${{ github.head_ref || github.ref }}
cancel-in-progress: true
env:
SCHEME_NAME: "Blade-Package"
jobs:
swiftlint:
name: SwiftLint
runs-on: ubuntu-latest
steps:
- 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 }}
test-apple-platforms:
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:
# 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:
- 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 }}
spm-build:
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:
- { 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:
- name: Checkout code
uses: actions/checkout@v7
- name: Toolchain versions
run: |
swift --version
xcodebuild -version
# 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: test-apple-platforms
runs-on: macos-26
steps:
- name: Download artifacts
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 test results
uses: actions/upload-artifact@v7
with:
name: MergedTestResults
path: test_output/final
retention-days: 30
discover-typos:
name: Discover Typos
runs-on: ubuntu-latest
steps:
- name: Checkout code
uses: actions/checkout@v7
- name: Discover typos
run: |
python3 -m pip install --upgrade pip
python3 -m pip install codespell
codespell --ignore-words-list="hart,inout,msdos,sur" --skip="./.build/*,./.git/*"