Skip to content

Commit

Permalink
CI: replace Carthage build jobs with xcodebuild (#3338)
Browse files Browse the repository at this point in the history
### Why
- Remove further dependencies from the no-longer-maintained `Carthage`
- Avoid building multiple architectures (`ONLY_ACTIVE_ARCH`)
- Disable unnecessary code-signing

The main benefit of this is that it will drastically speed up the
`build-tv-watch-and-macos` CI job.
  • Loading branch information
NachoSoto authored Oct 24, 2023
1 parent 52e4c54 commit a58b750
Showing 1 changed file with 23 additions and 14 deletions.
37 changes: 23 additions & 14 deletions fastlane/Fastfile
Original file line number Diff line number Diff line change
Expand Up @@ -226,31 +226,27 @@ platform :ios do
lane :build_tv_watch_mac do |options|
check_pods
load_spm_dependencies
carthage(command: "build", no_skip_current: true, platform: "watchOS,tvOS,Mac", use_xcframeworks: true)
build_release(platform: 'watchOS')
build_release(platform: 'tvOS')
build_release(platform: 'macOS')
end

desc "macOS build"
lane :build_mac do |options|
check_pods
load_spm_dependencies
carthage(command: "build", no_skip_current: true, platform: "Mac", use_xcframeworks: true)
build_release(platform: 'macOS')
end

desc "visionOS build"
lane :build_visionos do |options|
xcodebuild(
workspace: 'RevenueCat.xcworkspace',
scheme: 'RevenueCat',
destination: 'generic/platform=visionOS',
configuration: 'release',
xcargs: "CODE_SIGN_IDENTITY='' CODE_SIGNING_REQUIRED=NO"
build_release(
platform: 'visionOS',
scheme: 'RevenueCat'
)
xcodebuild(
workspace: 'RevenueCat.xcworkspace',
scheme: 'RevenueCatUI',
destination: 'generic/platform=visionOS',
configuration: 'release',
xcargs: "CODE_SIGN_IDENTITY='' CODE_SIGNING_REQUIRED=NO"
build_release(
platform: 'visionOS',
scheme: 'RevenueCatUI'
)
end

Expand Down Expand Up @@ -419,6 +415,19 @@ platform :ios do
)
end

private_lane :build_release do |options|
platform = options[:platform]
scheme = options[:scheme] || 'RevenueCat'

xcodebuild(
workspace: 'RevenueCat.xcworkspace',
scheme: scheme,
destination: "generic/platform=#{platform}",
configuration: 'release',
xcargs: "CODE_SIGN_IDENTITY='' CODE_SIGNING_REQUIRED=NO ONLY_ACTIVE_ARCH=YES"
)
end

private_lane :generate_snapshots do |options|
require 'rest-client'

Expand Down

0 comments on commit a58b750

Please sign in to comment.