From 9edf07148792b3b4540ddcab7fa618552dd068ee Mon Sep 17 00:00:00 2001 From: Cal Stephens Date: Mon, 26 Feb 2024 11:23:42 -0800 Subject: [PATCH] Update CI jobs to run on Apple Silicon macOS 14 runner (#19) --- .github/workflows/main.yml | 8 ++++---- Rakefile | 14 ++++---------- 2 files changed, 8 insertions(+), 14 deletions(-) diff --git a/.github/workflows/main.yml b/.github/workflows/main.yml index 2d91ab2..fecc5c2 100644 --- a/.github/workflows/main.yml +++ b/.github/workflows/main.yml @@ -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: @@ -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" @@ -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: diff --git a/Rakefile b/Rakefile index 383c130..7c57bb5 100644 --- a/Rakefile +++ b/Rakefile @@ -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)"') @@ -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