From ab6747bb0061ab0bf36ab1efb0a436e8f1fe4893 Mon Sep 17 00:00:00 2001 From: Luis Padron Date: Fri, 19 Jan 2024 14:15:16 -0500 Subject: [PATCH] Update Stagehand for Xcode 15 --- .github/workflows/ci.yml | 18 +++++++++++++----- Example/Podfile | 2 +- Example/Podfile.lock | 30 +++++++++++++++--------------- Package.resolved | 14 ++++++++++++++ Package.swift | 16 +++++++++++++--- Scripts/build.swift | 17 ++--------------- Stagehand.podspec | 6 +++--- StagehandTesting.podspec | 8 ++++---- 8 files changed, 65 insertions(+), 46 deletions(-) create mode 100644 Package.resolved diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml index ad589ac..35b4743 100644 --- a/.github/workflows/ci.yml +++ b/.github/workflows/ci.yml @@ -9,14 +9,16 @@ on: jobs: xcode-build: name: Xcode Build - runs-on: macOS-11 + runs-on: macOS-13 strategy: matrix: - platform: ['iOS_13'] + platform: ['iOS_17'] fail-fast: false steps: - name: Checkout Repo uses: actions/checkout@v2 + - name: Select Xcode + run: xcode-select -s /Applications/Xcode_15.1.app - name: Bundle Install run: bundle install --gemfile=Example/Gemfile - name: Prepare Simulator Runtimes @@ -33,10 +35,12 @@ jobs: path: .build/derivedData/**/Logs/Test/*.xcresult pod-lint: name: Pod Lint - runs-on: macOS-11 + runs-on: macOS-13 steps: - name: Checkout Repo uses: actions/checkout@v2 + - name: Select Xcode + run: xcode-select -s /Applications/Xcode_15.1.app - name: Bundle Install run: bundle install --gemfile=Example/Gemfile - name: Pod Install @@ -47,14 +51,16 @@ jobs: run: bundle exec --gemfile=Example/Gemfile pod lib lint --verbose --fail-fast --include-podspecs=Stagehand.podspec StagehandTesting.podspec spm: name: SPM Build - runs-on: macOS-11 + runs-on: macOS-13 strategy: matrix: - platform: ['iOS_13'] + platform: ['iOS_17'] fail-fast: false steps: - name: Checkout Repo uses: actions/checkout@v2 + - name: Select Xcode + run: xcode-select -s /Applications/Xcode_15.1.app - name: Prepare Simulator Runtimes run: Scripts/github/prepare-simulators.sh ${{ matrix.platform }} - name: Build @@ -63,6 +69,8 @@ jobs: name: Bazel runs-on: macOS-13 steps: + - name: Select Xcode + run: xcode-select -s /Applications/Xcode_15.1.app - name: Checkout Repo uses: actions/checkout@v2 - name: Build diff --git a/Example/Podfile b/Example/Podfile index 05eab3d..310b1e2 100644 --- a/Example/Podfile +++ b/Example/Podfile @@ -1,6 +1,6 @@ use_frameworks! -platform :ios, '12.0' +platform :ios, '14.0' target 'Stagehand_Example' do pod 'Stagehand', :path => '../' diff --git a/Example/Podfile.lock b/Example/Podfile.lock index 1df14d7..9ebbfb7 100644 --- a/Example/Podfile.lock +++ b/Example/Podfile.lock @@ -1,17 +1,17 @@ PODS: - - iOSSnapshotTestCase (6.2.0): - - iOSSnapshotTestCase/SwiftSupport (= 6.2.0) - - iOSSnapshotTestCase/Core (6.2.0) - - iOSSnapshotTestCase/SwiftSupport (6.2.0): + - iOSSnapshotTestCase (8.0.0): + - iOSSnapshotTestCase/SwiftSupport (= 8.0.0) + - iOSSnapshotTestCase/Core (8.0.0) + - iOSSnapshotTestCase/SwiftSupport (8.0.0): - iOSSnapshotTestCase/Core - SnapshotTesting (1.7.0) - - Stagehand (4.0.0) - - StagehandTesting/iOSSnapshotTestCase (4.0.0): - - iOSSnapshotTestCase (~> 6.1) - - Stagehand (= 4.0.0) - - StagehandTesting/SnapshotTesting (4.0.0): + - Stagehand (5.0.0) + - StagehandTesting/iOSSnapshotTestCase (5.0.0): + - iOSSnapshotTestCase (~> 8.0) + - Stagehand (= 5.0.0) + - StagehandTesting/SnapshotTesting (5.0.0): - SnapshotTesting (~> 1.7) - - Stagehand (= 4.0.0) + - Stagehand (= 5.0.0) DEPENDENCIES: - SnapshotTesting (= 1.7.0) @@ -31,11 +31,11 @@ EXTERNAL SOURCES: :path: "../" SPEC CHECKSUMS: - iOSSnapshotTestCase: 9ab44cb5aa62b84d31847f40680112e15ec579a6 + iOSSnapshotTestCase: a670511f9ee3829c2b9c23e6e68f315fd7b6790f SnapshotTesting: 273b614fcc60fac7d9f613f6648afa91a7da36be - Stagehand: 29ee26a0690ebf90a5ea45e86fd88b865baf5403 - StagehandTesting: 3354a5300e7fc6d1ba9ab182762feff9e80cb6de + Stagehand: fc3f93447b852db22e34c08f5383f3544ef7b8ee + StagehandTesting: ef37187c43390a3f3dd2371ebad07133eb1399e5 -PODFILE CHECKSUM: b4841bd82e57283ff97d83f4bb89137cc01f6102 +PODFILE CHECKSUM: 2d1b0e07675666ae7518e07f18a32914dd33978a -COCOAPODS: 1.11.3 +COCOAPODS: 1.14.3 diff --git a/Package.resolved b/Package.resolved new file mode 100644 index 0000000..2131fa0 --- /dev/null +++ b/Package.resolved @@ -0,0 +1,14 @@ +{ + "pins" : [ + { + "identity" : "ios-snapshot-test-case", + "kind" : "remoteSourceControl", + "location" : "https://github.com/uber/ios-snapshot-test-case.git", + "state" : { + "revision" : "7b10770333a961be6e5a41c9ce04b8c6d3990126", + "version" : "8.0.0" + } + } + ], + "version" : 2 +} diff --git a/Package.swift b/Package.swift index 6a975f7..cd29474 100644 --- a/Package.swift +++ b/Package.swift @@ -1,4 +1,4 @@ -// swift-tools-version:5.0.1 +// swift-tools-version:5.8 // // Copyright 2020 Square Inc. @@ -28,6 +28,13 @@ let package = Package( name: "Stagehand", targets: ["Stagehand"] ), + .library( + name: "StagehandTesting", + targets: ["StagehandTesting"] + ) + ], + dependencies: [ + .package(url: "https://github.com/uber/ios-snapshot-test-case.git", .upToNextMajor(from: "8.0.0")), ], targets: [ .target( @@ -35,8 +42,11 @@ let package = Package( dependencies: [], path: "Sources/Stagehand" ), + .target( + name: "StagehandTesting", + dependencies: ["Stagehand"], + path: "Sources/StagehandTesting" + ) ], swiftLanguageVersions: [.v5] ) - -let version = Version(4, 0, 0) diff --git a/Scripts/build.swift b/Scripts/build.swift index 6d3e767..0e428c3 100755 --- a/Scripts/build.swift +++ b/Scripts/build.swift @@ -51,7 +51,7 @@ enum Platform: String, CustomStringConvertible { var destination: String { switch self { case .iOS_13: - return "platform=iOS Simulator,OS=13.7,name=iPhone 11 Pro" + return "platform=iOS Simulator,OS=17.0,name=iPhone 14 Pro" } } @@ -80,7 +80,7 @@ enum Task: String, CustomStringConvertible { var project: String? { switch self { case .spm: - return "generated/Stagehand.xcodeproj" + return nil case .xcode: return nil } @@ -95,15 +95,6 @@ enum Task: String, CustomStringConvertible { } } - var shouldGenerateXcodeProject: Bool { - switch self { - case .spm: - return true - case .xcode: - return false - } - } - var shouldRunTests: Bool { switch self { case .spm: @@ -131,10 +122,6 @@ guard let task = Task(rawValue: rawTask) else { throw TaskError.code(1) } -if task.shouldGenerateXcodeProject { - try execute(commandPath: "/usr/bin/swift", arguments: ["package", "generate-xcodeproj", "--output=generated/"]) -} - guard let platform = Platform(rawValue: rawPlatform) else { print("Received unknown platform \"\(rawPlatform)\"") throw TaskError.code(1) diff --git a/Stagehand.podspec b/Stagehand.podspec index 19cc212..5611f1b 100644 --- a/Stagehand.podspec +++ b/Stagehand.podspec @@ -1,15 +1,15 @@ Pod::Spec.new do |s| s.name = 'Stagehand' - s.version = '4.0.0' + s.version = '5.0.0' s.summary = 'Modern, type-safe API for building animations on iOS' s.homepage = 'https://github.com/CashApp/Stagehand' s.license = { :type => 'Apache License, Version 2.0', :file => 'LICENSE' } s.author = 'Square' s.source = { :git => 'https://github.com/CashApp/Stagehand.git', :tag => s.version.to_s } - s.ios.deployment_target = '12.0' + s.ios.deployment_target = '14.0' - s.swift_version = '5.0.1' + s.swift_version = '5.8' s.source_files = 'Sources/Stagehand/**/*' diff --git a/StagehandTesting.podspec b/StagehandTesting.podspec index 1d01015..acdb17e 100644 --- a/StagehandTesting.podspec +++ b/StagehandTesting.podspec @@ -1,15 +1,15 @@ Pod::Spec.new do |s| s.name = 'StagehandTesting' - s.version = '4.0.0' + s.version = '5.0.0' s.summary = 'Utilities for snapshot testing animations created using the Stagehand framework' s.homepage = 'https://github.com/CashApp/Stagehand' s.license = { :type => 'Apache License, Version 2.0', :file => 'LICENSE' } s.author = 'Square' s.source = { :git => 'https://github.com/CashApp/Stagehand.git', :tag => s.version.to_s } - s.ios.deployment_target = '12.0' + s.ios.deployment_target = '14.0' - s.swift_version = '5.0.1' + s.swift_version = '5.8' # The dependency on Stagehand is pinned to the same version as StagehandTesting. This is because # StagehandTesting depends on internal methods inside Stagehand, so the normal rules of semantic @@ -24,7 +24,7 @@ Pod::Spec.new do |s| 'Sources/StagehandTesting/iOSSnapshotTestCase/**/*.swift', ] - ss.dependency 'iOSSnapshotTestCase', '~> 6.1' + ss.dependency 'iOSSnapshotTestCase', '~> 8.0' end s.subspec 'SnapshotTesting' do |ss|