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

Modernize CI #300

Merged
merged 19 commits into from
Jun 9, 2023
Merged
Show file tree
Hide file tree
Changes from 1 commit
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
33 changes: 27 additions & 6 deletions .github/workflows/ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,7 @@ jobs:
fail-fast: false
steps:
- name: Checkout Repo
uses: actions/checkout@v2
uses: actions/checkout@v3
- name: Bundle Install
run: bundle install
- name: Select Xcode Version
Expand All @@ -42,7 +42,7 @@ jobs:
fail-fast: false
steps:
- name: Checkout Repo
uses: actions/checkout@v2
uses: actions/checkout@v3
- name: Bundle Install
run: bundle install
- name: Select Xcode Version
Expand All @@ -52,12 +52,33 @@ jobs:
- name: Upload Coverage Reports
if: success()
run: Scripts/upload-coverage-reports.sh ${{ matrix.platforms }}
xcode-build-14:
name: Xcode 14 Build
runs-on: macOS-13
strategy:
matrix:
platforms: [
'iOS_16,tvOS_16,watchOS_9',
]
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_14.3.1.app/Contents/Developer
- name: Build and Test Framework
run: Scripts/build.swift ${{ matrix.platforms }} xcode
- name: Upload Coverage Reports
if: success()
run: Scripts/upload-coverage-reports.sh ${{ matrix.platforms }}
pod-lint:
name: Pod Lint
runs-on: macOS-11
steps:
- name: Checkout Repo
uses: actions/checkout@v2
uses: actions/checkout@v3
- name: Bundle Install
run: bundle install
- name: Select Xcode Version
Expand All @@ -69,7 +90,7 @@ jobs:
runs-on: macOS-11
steps:
- name: Checkout Repo
uses: actions/checkout@v2
uses: actions/checkout@v3
- name: Bundle Install
run: bundle install
- name: Select Xcode Version
Expand All @@ -92,7 +113,7 @@ jobs:
fail-fast: false
steps:
- name: Checkout Repo
uses: actions/checkout@v2
uses: actions/checkout@v3
- name: Bundle Install
run: bundle install
- name: Select Xcode Version
Expand Down Expand Up @@ -123,7 +144,7 @@ jobs:
fail-fast: false
steps:
- name: Checkout Repo
uses: actions/checkout@v2
uses: actions/checkout@v3
jshier marked this conversation as resolved.
Show resolved Hide resolved
- name: Bundle Install
run: bundle install
- name: Select Xcode Version
Expand Down
46 changes: 35 additions & 11 deletions Scripts/build.swift
Original file line number Diff line number Diff line change
Expand Up @@ -24,15 +24,19 @@ enum Platform: String, CustomStringConvertible {
case iOS_13
case iOS_14
case iOS_15
case iOS_16
case tvOS_13
case tvOS_14
case tvOS_15
case tvOS_16
case macOS_10_15
case macOS_11
case macOS_12
case macOS_13
case watchOS_6
case watchOS_7
case watchOS_8
case watchOS_9

var destination: String {
switch self {
Expand All @@ -42,17 +46,22 @@ enum Platform: String, CustomStringConvertible {
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 .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 .macOS_10_15,
.macOS_11,
.macOS_12:
.macOS_12,
.macOS_13:
return "platform=OS X"

case .watchOS_6:
Expand All @@ -61,19 +70,23 @@ enum Platform: String, CustomStringConvertible {
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:
return "OS=9.4,name=Apple Watch Series 6 - 44mm"
}
}

var sdk: String {
switch self {
case .iOS_13,
.iOS_14,
.iOS_15:
.iOS_15,
.iOS_16:
return "iphonesimulator"

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

case .macOS_10_15:
Expand All @@ -82,10 +95,13 @@ enum Platform: String, CustomStringConvertible {
return "macosx11.1"
case .macOS_12:
return "macosx12.3"
case .macOS_13:
return "macosx13.3"

case .watchOS_6,
.watchOS_7,
.watchOS_8:
.watchOS_8,
.watchOS_9:
return "watchsimulator"
}
}
Expand All @@ -95,17 +111,21 @@ enum Platform: String, CustomStringConvertible {
case .iOS_13,
.iOS_14,
.iOS_15,
.iOS_16,
.tvOS_13,
.tvOS_14,
.tvOS_15,
.tvOS_16,
.macOS_10_15,
.macOS_11,
.macOS_12:
.macOS_12,
.macOS_13:
return true

case .watchOS_6,
.watchOS_7,
.watchOS_8:
.watchOS_8,
.watchOS_9:
// watchOS does not support unit testing (yet?).
return false
}
Expand All @@ -119,22 +139,26 @@ enum Platform: String, CustomStringConvertible {
switch self {
case .iOS_13,
.iOS_14,
.iOS_15:
.iOS_15,
.iOS_16:
return "Valet iOS"

case .tvOS_13,
.tvOS_14,
.tvOS_15:
.tvOS_15,
.tvOS_16:
return "Valet tvOS"

case .macOS_10_15,
.macOS_11,
.macOS_12:
.macOS_12,
.macOS_13:
return "Valet Mac"

case .watchOS_6,
.watchOS_7,
.watchOS_8:
.watchOS_8,
.watchOS_9:
return "Valet watchOS"
}
}
Expand Down Expand Up @@ -203,7 +227,7 @@ enum Task: String, CustomStringConvertible {
func shouldTest(on platform: Platform) -> Bool {
switch self {
case .spm:
// Our Package isn't set up with unit test targets, becuase SPM can't run unit tests in a codesigned environment.
// Our Package isn't set up with unit test targets, because SPM can't run unit tests in a codesigned environment.
dfed marked this conversation as resolved.
Show resolved Hide resolved
return false
case .xcode:
return platform.shouldTest
Expand Down
3 changes: 3 additions & 0 deletions Sources/LegacyValet/VALLegacySecureEnclaveValet.m
Original file line number Diff line number Diff line change
Expand Up @@ -264,6 +264,8 @@ - (BOOL)containsObjectForKey:(nonnull NSString *)key;
return keyAlreadyInKeychain;
}

#pragma clang diagnostic push
#pragma clang diagnostic ignored "-Wreturn-type"
- (nonnull NSSet *)allKeys;
{
VALCheckCondition(NO, [NSSet new], @"%s is not supported on %@", __PRETTY_FUNCTION__, NSStringFromClass([self class]));
Expand All @@ -273,6 +275,7 @@ - (BOOL)removeAllObjects;
{
VALCheckCondition(NO, NO, @"%s is not supported on %@", __PRETTY_FUNCTION__, NSStringFromClass([self class]));
}
#pragma clang diagnostic pop
dfed marked this conversation as resolved.
Show resolved Hide resolved

- (nullable NSError *)migrateObjectsMatchingQuery:(nonnull NSDictionary *)secItemQuery removeOnCompletion:(BOOL)remove;
{
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -77,46 +77,33 @@
debugDocumentVersioning = "YES"
debugServiceExtension = "internal"
allowLocationSimulation = "YES">
<RemoteRunnable
runnableDebuggingMode = "2"
BundleIdentifier = "com.apple.Carousel"
RemotePath = "/Valet watchOS Test Host App Extension">
<BuildableProductRunnable
runnableDebuggingMode = "0">
<BuildableReference
BuildableIdentifier = "primary"
BlueprintIdentifier = "16DF6AFE204B496800F8E0A4"
BuildableName = "Valet watchOS Test Host App Extension.appex"
BlueprintName = "Valet watchOS Test Host App Extension"
ReferencedContainer = "container:Valet.xcodeproj">
</BuildableReference>
</RemoteRunnable>
</BuildableProductRunnable>
</LaunchAction>
<ProfileAction
buildConfiguration = "Release"
shouldUseLaunchSchemeArgsEnv = "YES"
savedToolIdentifier = ""
useCustomWorkingDirectory = "NO"
debugDocumentVersioning = "YES">
<RemoteRunnable
runnableDebuggingMode = "2"
BundleIdentifier = "com.apple.Carousel"
RemotePath = "/Valet watchOS Test Host App Extension">
<BuildableProductRunnable
runnableDebuggingMode = "0">
<BuildableReference
BuildableIdentifier = "primary"
BlueprintIdentifier = "16DF6AFE204B496800F8E0A4"
BuildableName = "Valet watchOS Test Host App Extension.appex"
BlueprintName = "Valet watchOS Test Host App Extension"
ReferencedContainer = "container:Valet.xcodeproj">
</BuildableReference>
</RemoteRunnable>
<MacroExpansion>
<BuildableReference
BuildableIdentifier = "primary"
BlueprintIdentifier = "16DF6AFE204B496800F8E0A4"
BuildableName = "Valet watchOS Test Host App Extension.appex"
BlueprintName = "Valet watchOS Test Host App Extension"
ReferencedContainer = "container:Valet.xcodeproj">
</BuildableReference>
</MacroExpansion>
</BuildableProductRunnable>
</ProfileAction>
<AnalyzeAction
buildConfiguration = "Debug">
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -63,46 +63,33 @@
debugDocumentVersioning = "YES"
debugServiceExtension = "internal"
allowLocationSimulation = "YES">
<RemoteRunnable
runnableDebuggingMode = "2"
BundleIdentifier = "com.apple.Carousel"
RemotePath = "/ValetTouchIDTest">
<BuildableProductRunnable
runnableDebuggingMode = "0">
<BuildableReference
BuildableIdentifier = "primary"
BlueprintIdentifier = "16DF6AF2204B496800F8E0A4"
BuildableName = "Valet watchOS Test Host App.app"
BlueprintName = "Valet watchOS Test Host App"
ReferencedContainer = "container:Valet.xcodeproj">
</BuildableReference>
</RemoteRunnable>
</BuildableProductRunnable>
</LaunchAction>
<ProfileAction
buildConfiguration = "Release"
shouldUseLaunchSchemeArgsEnv = "YES"
savedToolIdentifier = ""
useCustomWorkingDirectory = "NO"
debugDocumentVersioning = "YES">
<RemoteRunnable
runnableDebuggingMode = "2"
BundleIdentifier = "com.apple.Carousel"
RemotePath = "/ValetTouchIDTest">
<BuildableProductRunnable
runnableDebuggingMode = "0">
<BuildableReference
BuildableIdentifier = "primary"
BlueprintIdentifier = "16DF6AF2204B496800F8E0A4"
BuildableName = "Valet watchOS Test Host App.app"
BlueprintName = "Valet watchOS Test Host App"
ReferencedContainer = "container:Valet.xcodeproj">
</BuildableReference>
</RemoteRunnable>
<MacroExpansion>
<BuildableReference
BuildableIdentifier = "primary"
BlueprintIdentifier = "16DF6AF2204B496800F8E0A4"
BuildableName = "Valet watchOS Test Host App.app"
BlueprintName = "Valet watchOS Test Host App"
ReferencedContainer = "container:Valet.xcodeproj">
</BuildableReference>
</MacroExpansion>
</BuildableProductRunnable>
</ProfileAction>
<AnalyzeAction
buildConfiguration = "Debug">
Expand Down