Skip to content

Commit

Permalink
Update CI jobs to run on Apple Silicon macOS 14 runner (#19)
Browse files Browse the repository at this point in the history
  • Loading branch information
calda authored Feb 26, 2024
1 parent c989e87 commit 9edf071
Show file tree
Hide file tree
Showing 2 changed files with 8 additions and 14 deletions.
8 changes: 4 additions & 4 deletions .github/workflows/main.yml
Original file line number Diff line number Diff line change
Expand Up @@ -24,11 +24,11 @@ jobs:
with:
xcode: ${{ matrix.xcode }}
- name: Build Package
run: SKIP_VISION_OS=true bundle exec rake test:package:all
run: SKIP_VISION_OS=true bundle exec rake test:package:github_actions

test-package-macos-13:
name: "Test Package"
runs-on: macos-13
runs-on: macos-14
strategy:
fail-fast: false
matrix:
Expand All @@ -40,7 +40,7 @@ jobs:
with:
xcode: ${{ matrix.xcode }}
- name: Build Package
run: bundle exec rake test:package:all
run: bundle exec rake test:package:github_actions

build-example-excluding-visionOS:
name: "Build Example App"
Expand All @@ -63,7 +63,7 @@ jobs:

build-example-macos-13:
name: "Build Example App"
runs-on: macos-13
runs-on: macos-14
strategy:
fail-fast: false
matrix:
Expand Down
14 changes: 4 additions & 10 deletions Rakefile
Original file line number Diff line number Diff line change
Expand Up @@ -56,6 +56,10 @@ namespace :test do
desc 'Tests the Lottie package for all supported platforms'
task all: ['iOS', 'macOS', 'tvOS', 'visionOS']

# The visionOS tests time out in GitHub actions as of Feb 2024, so we exclude them for now.
desc 'Tests the Lottie package for all platforms supported by GitHub Actions'
task github_actions: ['iOS', 'macOS', 'tvOS']

desc 'Tests the Lottie package for iOS'
task :iOS do
xcodebuild('test -scheme Lottie -destination "platform=iOS Simulator,name=iPhone SE (3rd generation)"')
Expand Down Expand Up @@ -97,16 +101,6 @@ def ifVisionOSEnabled
if ENV["SKIP_VISION_OS"] == "true"
puts "Skipping visionOS build"
else
installVisionOSIfNecessary()
yield
end
end

def installVisionOSIfNecessary
# visionOS is unsupported by default on Intel, but we can override this
# https://github.com/actions/runner-images/issues/8144#issuecomment-1902072070
sh 'defaults write com.apple.dt.Xcode AllowUnsupportedVisionOSHost -bool YES'
sh 'defaults write com.apple.CoreSimulator AllowUnsupportedVisionOSHost -bool YES'

xcodebuild("-downloadPlatform visionOS")
end

0 comments on commit 9edf071

Please sign in to comment.