Skip to content

Commit

Permalink
Update Stagehand for Xcode 15
Browse files Browse the repository at this point in the history
  • Loading branch information
luispadron committed Jan 21, 2024
1 parent d4cc5b5 commit ab6747b
Show file tree
Hide file tree
Showing 8 changed files with 65 additions and 46 deletions.
18 changes: 13 additions & 5 deletions .github/workflows/ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand All @@ -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
Expand All @@ -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
Expand All @@ -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
Expand Down
2 changes: 1 addition & 1 deletion Example/Podfile
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
use_frameworks!

platform :ios, '12.0'
platform :ios, '14.0'

target 'Stagehand_Example' do
pod 'Stagehand', :path => '../'
Expand Down
30 changes: 15 additions & 15 deletions Example/Podfile.lock
Original file line number Diff line number Diff line change
@@ -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)
Expand All @@ -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
14 changes: 14 additions & 0 deletions Package.resolved
Original file line number Diff line number Diff line change
@@ -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
}
16 changes: 13 additions & 3 deletions Package.swift
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
// swift-tools-version:5.0.1
// swift-tools-version:5.8

//
// Copyright 2020 Square Inc.
Expand Down Expand Up @@ -28,15 +28,25 @@ 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(
name: "Stagehand",
dependencies: [],
path: "Sources/Stagehand"
),
.target(
name: "StagehandTesting",
dependencies: ["Stagehand"],
path: "Sources/StagehandTesting"
)
],
swiftLanguageVersions: [.v5]
)

let version = Version(4, 0, 0)
17 changes: 2 additions & 15 deletions Scripts/build.swift
Original file line number Diff line number Diff line change
Expand Up @@ -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"
}
}

Expand Down Expand Up @@ -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
}
Expand All @@ -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:
Expand Down Expand Up @@ -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)
Expand Down
6 changes: 3 additions & 3 deletions Stagehand.podspec
Original file line number Diff line number Diff line change
@@ -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/**/*'

Expand Down
8 changes: 4 additions & 4 deletions StagehandTesting.podspec
Original file line number Diff line number Diff line change
@@ -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
Expand All @@ -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|
Expand Down

0 comments on commit ab6747b

Please sign in to comment.