Skip to content

Run tests in CI on Xcode 15 #20

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

Merged
merged 1 commit into from
Sep 26, 2023
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
36 changes: 36 additions & 0 deletions .github/workflows/ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -55,3 +55,39 @@ jobs:
run: sudo xcode-select --switch /Applications/Xcode_14.3.1.app/Contents/Developer
- name: Build and Test Framework
run: xcrun swift test -c release -Xswiftc -enable-testing
spm-15:
name: Build Xcode 15
runs-on: macos-13
strategy:
matrix:
platforms: [
'iOS_17,watchOS_10',
'macOS_14,tvOS_17',
]
fail-fast: false
steps:
- name: Checkout Repo
uses: actions/checkout@v3
- name: Bundle Install
run: bundle install
- name: Select Xcode Version
run: sudo xcode-select --switch /Applications/Xcode_15.0.app/Contents/Developer
- name: Build and Test Framework
run: Scripts/build.swift ${{ matrix.platforms }}
- name: Prepare Coverage Reports
run: ./Scripts/prepare-coverage-reports.sh
- name: Upload Coverage Reports
if: success()
uses: codecov/codecov-action@v3
spm-15-swift:
name: Swift Build Xcode 15
runs-on: macos-13
steps:
- name: Checkout Repo
uses: actions/checkout@v3
- name: Bundle Install
run: bundle install
- name: Select Xcode Version
run: sudo xcode-select --switch /Applications/Xcode_15.0.app/Contents/Developer
- name: Build and Test Framework
run: xcrun swift test -c release -Xswiftc -enable-testing
32 changes: 26 additions & 6 deletions Scripts/build.swift
Original file line number Diff line number Diff line change
Expand Up @@ -25,18 +25,22 @@ enum Platform: String, CaseIterable, CustomStringConvertible {
case iOS_14
case iOS_15
case iOS_16
case iOS_17
case tvOS_13
case tvOS_14
case tvOS_15
case tvOS_16
case tvOS_17
case macOS_10_15
case macOS_11
case macOS_12
case macOS_13
case macOS_14
case watchOS_6
case watchOS_7
case watchOS_8
case watchOS_9
case watchOS_10

var destination: String {
switch self {
Expand All @@ -48,6 +52,8 @@ enum Platform: String, CaseIterable, CustomStringConvertible {
return "platform=iOS Simulator,OS=15.5,name=iPad Pro (12.9-inch) (5th generation)"
case .iOS_16:
return "platform=iOS Simulator,OS=16.4,name=iPad Pro (12.9-inch) (6th generation)"
case .iOS_17:
return "platform=iOS Simulator,OS=17.0,name=iPad Pro (12.9-inch) (6th generation)"

case .tvOS_13:
return "platform=tvOS Simulator,OS=13.4,name=Apple TV"
Expand All @@ -57,11 +63,14 @@ enum Platform: String, CaseIterable, CustomStringConvertible {
return "platform=tvOS Simulator,OS=15.4,name=Apple TV"
case .tvOS_16:
return "platform=tvOS Simulator,OS=16.4,name=Apple TV"
case .tvOS_17:
return "platform=tvOS Simulator,OS=17.0,name=Apple TV"

case .macOS_10_15,
.macOS_11,
.macOS_12,
.macOS_13:
.macOS_13,
.macOS_14:
return "platform=OS X"

case .watchOS_6:
Expand All @@ -72,6 +81,8 @@ enum Platform: String, CaseIterable, CustomStringConvertible {
return "OS=8.5,name=Apple Watch Series 6 - 44mm"
case .watchOS_9:
return "OS=9.4,name=Apple Watch Series 7 (45mm)"
case .watchOS_10:
return "OS=10.0,name=Apple Watch Series 7 (45mm)"
}
}

Expand All @@ -80,13 +91,15 @@ enum Platform: String, CaseIterable, CustomStringConvertible {
case .iOS_13,
.iOS_14,
.iOS_15,
.iOS_16:
.iOS_16,
.iOS_17:
return "iphonesimulator"

case .tvOS_13,
.tvOS_14,
.tvOS_15,
.tvOS_16:
.tvOS_16,
.tvOS_17:
return "appletvsimulator"

case .macOS_10_15:
Expand All @@ -97,11 +110,14 @@ enum Platform: String, CaseIterable, CustomStringConvertible {
return "macosx12.3"
case .macOS_13:
return "macosx13.3"
case .macOS_14:
return "macosx14.0"

case .watchOS_6,
.watchOS_7,
.watchOS_8,
.watchOS_9:
.watchOS_9,
.watchOS_10:
return "watchsimulator"
}
}
Expand All @@ -112,20 +128,24 @@ enum Platform: String, CaseIterable, CustomStringConvertible {
.iOS_14,
.iOS_15,
.iOS_16,
.iOS_17,
.tvOS_13,
.tvOS_14,
.tvOS_15,
.tvOS_16,
.tvOS_17,
.macOS_10_15,
.macOS_11,
.macOS_12,
.macOS_13:
.macOS_13,
.macOS_14:
return true

case .watchOS_6,
.watchOS_7,
.watchOS_8,
.watchOS_9:
.watchOS_9,
.watchOS_10:
// watchOS does not support unit testing (yet?).
return false
}
Expand Down