-
Notifications
You must be signed in to change notification settings - Fork 218
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
Actually fail CI when tests fail #313
Merged
Merged
Changes from 1 commit
Commits
Show all changes
14 commits
Select commit
Hold shift + click to select a range
2c9e006
Actually fail CI when tests fail
dfed ad1eb3b
Throw when we encounter errors
dfed b581789
Remove builds with Xcode that do not support Swift Concurrency
dfed e8ddf17
Use appropriate Xcode for the job
dfed 0a38a23
More tests require signed environments now
dfed f6a4def
Fix macOS 14 test sdk
dfed 59883b2
Use correct simulator name
dfed d2651be
Do not embed watchOS
dfed aa31459
Massage compiler
dfed 30c4016
Remove unnecessary Valet watchOS Test Host App.app
dfed f69a5fe
New watch host target
dfed 058c73e
simpler
dfed 49f3470
stop testing watchOS_8
dfed a0bb5e7
Xcode 13 or later
dfed File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Remove builds with Xcode that do not support Swift Concurrency
- Loading branch information
commit b581789e6d1a5ddea47bd6567d4e5d73535113ed
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -21,60 +21,40 @@ enum TaskError: Error { | |
} | ||
|
||
enum Platform: String, CustomStringConvertible { | ||
case iOS_13 | ||
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_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 { | ||
case .iOS_13: | ||
return "platform=iOS Simulator,OS=13.7,name=iPad Pro (12.9-inch) (4th generation)" | ||
case .iOS_14: | ||
return "platform=iOS Simulator,OS=14.4,name=iPad Pro (12.9-inch) (4th generation)" | ||
case .iOS_15: | ||
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.4,name=iPad Pro (12.9-inch) (6th generation)" | ||
|
||
case .tvOS_13: | ||
return "platform=tvOS Simulator,OS=13.4,name=Apple TV" | ||
case .tvOS_14: | ||
return "platform=tvOS Simulator,OS=14.3,name=Apple TV" | ||
case .tvOS_15: | ||
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.4,name=Apple TV" | ||
|
||
case .macOS_11, | ||
.macOS_12, | ||
case .macOS_12, | ||
.macOS_13, | ||
.macOS_14: | ||
return "platform=OS X" | ||
|
||
case .watchOS_6: | ||
return "OS=6.2.1,name=Apple Watch Series 4 - 44mm" | ||
case .watchOS_7: | ||
return "OS=7.2,name=Apple Watch Series 6 - 44mm" | ||
case .watchOS_8: | ||
return "OS=8.5,name=Apple Watch Series 6 - 44mm" | ||
case .watchOS_9: | ||
|
@@ -86,66 +66,30 @@ enum Platform: String, CustomStringConvertible { | |
|
||
var sdk: String { | ||
switch self { | ||
case .iOS_13, | ||
.iOS_14, | ||
.iOS_15, | ||
case .iOS_15, | ||
.iOS_16, | ||
.iOS_17: | ||
return "iphonesimulator" | ||
|
||
case .tvOS_13, | ||
.tvOS_14, | ||
.tvOS_15, | ||
case .tvOS_15, | ||
.tvOS_16, | ||
.tvOS_17: | ||
return "appletvsimulator" | ||
|
||
case .macOS_11: | ||
return "macosx11.1" | ||
case .macOS_12: | ||
return "macosx12.3" | ||
case .macOS_13: | ||
return "macosx13.3" | ||
case .macOS_14: | ||
return "macosx14.0" | ||
|
||
case .watchOS_6, | ||
.watchOS_7, | ||
.watchOS_8, | ||
case .watchOS_8, | ||
.watchOS_9, | ||
.watchOS_10: | ||
return "watchsimulator" | ||
} | ||
} | ||
|
||
var shouldTest: Bool { | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. well this is nice at least! always |
||
switch self { | ||
case .iOS_13, | ||
.iOS_14, | ||
.iOS_15, | ||
.iOS_16, | ||
.iOS_17, | ||
.tvOS_13, | ||
.tvOS_14, | ||
.tvOS_15, | ||
.tvOS_16, | ||
.tvOS_17, | ||
.macOS_11, | ||
.macOS_12, | ||
.macOS_13, | ||
.macOS_14, | ||
.watchOS_8, | ||
.watchOS_9, | ||
.watchOS_10: | ||
return true | ||
|
||
case .watchOS_6, | ||
.watchOS_7: | ||
// watchOS did not support unit testing prior to Xcode 12.5. | ||
return false | ||
} | ||
} | ||
|
||
/// Whether the platform's Xcode version requires modern SPM integration in xcodebuild, given the removal of generate-xcodeproj. | ||
var requiresModernSPMIntegration: Bool { | ||
switch self { | ||
|
@@ -163,29 +107,22 @@ enum Platform: String, CustomStringConvertible { | |
|
||
var scheme: String { | ||
switch self { | ||
case .iOS_13, | ||
.iOS_14, | ||
.iOS_15, | ||
case .iOS_15, | ||
.iOS_16, | ||
.iOS_17: | ||
return "Valet iOS" | ||
|
||
case .tvOS_13, | ||
.tvOS_14, | ||
.tvOS_15, | ||
case .tvOS_15, | ||
.tvOS_16, | ||
.tvOS_17: | ||
return "Valet tvOS" | ||
|
||
case .macOS_11, | ||
.macOS_12, | ||
case .macOS_12, | ||
.macOS_13, | ||
.macOS_14: | ||
return "Valet Mac" | ||
|
||
case .watchOS_6, | ||
.watchOS_7, | ||
.watchOS_8, | ||
case .watchOS_8, | ||
.watchOS_9, | ||
.watchOS_10: | ||
return "Valet watchOS" | ||
|
@@ -271,7 +208,7 @@ enum Task: String, CustomStringConvertible { | |
// Our Package isn't set up with unit test targets, because SPM can't run unit tests in a codesigned environment. | ||
return false | ||
case .xcode: | ||
return platform.shouldTest | ||
return true | ||
} | ||
} | ||
} | ||
|
@@ -288,7 +225,7 @@ guard let task = Task(rawValue: rawTask) else { | |
throw TaskError.code(1) | ||
} | ||
|
||
let platforms = rawPlatforms.map { rawPlatform -> Platform in | ||
let platforms = try rawPlatforms.map { rawPlatform -> Platform in | ||
guard let platform = Platform(rawValue: rawPlatform) else { | ||
print("Received unknown platform type \(rawPlatform)") | ||
throw TaskError.code(1) | ||
|
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
well I broke Xcode 12 in addition to Xcode 11 builds in #308. Not ideal, but for the same reason we let #308 through, we're okay letting this change through.
Latest supported Xcode is 14. It'll be 15 on Friday.