From 65d4fc93de6b33aefcac06bab72e33b94426ccdc Mon Sep 17 00:00:00 2001 From: Pedro Veloso Date: Fri, 6 Feb 2026 15:26:26 +0100 Subject: [PATCH 1/4] Another attempt to fix CI --- .github/workflows/build-and-test.yml | 30 ++++++++++++++++++---------- 1 file changed, 20 insertions(+), 10 deletions(-) diff --git a/.github/workflows/build-and-test.yml b/.github/workflows/build-and-test.yml index d06b1d0d..0d5111e4 100644 --- a/.github/workflows/build-and-test.yml +++ b/.github/workflows/build-and-test.yml @@ -2,7 +2,6 @@ name: Build and Test env: afterpay-scheme: Afterpay - DEVELOPER_DIR: /Applications/Xcode_16.1.app/Contents/Developer on: push: @@ -14,10 +13,9 @@ jobs: build-and-test: name: Build and Test - runs-on: macos-latest + runs-on: macos-15 env: - destination: platform=iOS Simulator,name=iPhone 16 example-scheme: Example example-ui-test-scheme: ExampleUITests workspace: Afterpay.xcworkspace @@ -25,6 +23,17 @@ jobs: steps: - uses: actions/checkout@v4 + - name: Select Xcode + run: sudo xcode-select -s /Applications/Xcode_16.1.app/Contents/Developer + + - name: List Available Simulators + run: xcrun simctl list devices available | grep iPhone | head -20 + + - name: Set Destination + run: | + SIMULATOR_NAME=$(xcrun simctl list devices available | grep -oE 'iPhone [0-9]+' | head -1) + echo "destination=platform=iOS Simulator,name=$SIMULATOR_NAME" >> $GITHUB_ENV + - name: Cache Mint Packages uses: actions/cache@v4 with: @@ -105,21 +114,19 @@ jobs: validate-cocoapods: name: Validate Pod - runs-on: macos-latest + runs-on: macos-15 steps: - uses: actions/checkout@v4 with: fetch-depth: 0 + - name: Select Xcode + run: sudo xcode-select -s /Applications/Xcode_16.1.app/Contents/Developer + - name: Install Dependencies run: gem install cocoapods - - name: Create iOS Simulator - run: | - RUNTIME=$(xcrun simctl list runtimes | grep -oE 'com.apple.CoreSimulator.SimRuntime.iOS-[0-9-]+' | head -1) - xcrun simctl create "iPhone 16" "iPhone 16" "$RUNTIME" || true - - name: Validate Pod run: | export LIB_VERSION=$(git describe --tags `git rev-list --tags --max-count=1`) @@ -127,7 +134,7 @@ jobs: validate-swift-package: name: Validate Swift Package - runs-on: macos-latest + runs-on: macos-15 env: destination: platform=macOS,variant=Mac Catalyst @@ -136,6 +143,9 @@ jobs: steps: - uses: actions/checkout@v4 + - name: Select Xcode + run: sudo xcode-select -s /Applications/Xcode_16.1.app/Contents/Developer + - name: Validate Swift Package run: | xcodebuild \ From 35a96d3387c7c504a134c2e86c2787d954d3d998 Mon Sep 17 00:00:00 2001 From: Pedro Veloso Date: Fri, 6 Feb 2026 18:46:25 +0100 Subject: [PATCH 2/4] chore: retrigger CI From 1814daae82b60f0a76916ee43ff1e691bb8b8359 Mon Sep 17 00:00:00 2001 From: Pedro Veloso Date: Mon, 9 Feb 2026 16:58:00 +0100 Subject: [PATCH 3/4] Update build-and-test.yml --- .github/workflows/build-and-test.yml | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/.github/workflows/build-and-test.yml b/.github/workflows/build-and-test.yml index 0d5111e4..f3dbe5cd 100644 --- a/.github/workflows/build-and-test.yml +++ b/.github/workflows/build-and-test.yml @@ -31,8 +31,7 @@ jobs: - name: Set Destination run: | - SIMULATOR_NAME=$(xcrun simctl list devices available | grep -oE 'iPhone [0-9]+' | head -1) - echo "destination=platform=iOS Simulator,name=$SIMULATOR_NAME" >> $GITHUB_ENV + echo "destination=platform=iOS Simulator,OS=latest" >> $GITHUB_ENV - name: Cache Mint Packages uses: actions/cache@v4 From 0d92fab434e6d3f26285cf2e75fff3af307e970b Mon Sep 17 00:00:00 2001 From: Pedro Veloso Date: Mon, 9 Feb 2026 19:05:55 +0100 Subject: [PATCH 4/4] fix: use macos-latest with default Xcode for CI The CI was failing because Xcode 16.1 on macos-15 didn't have iOS simulator runtimes installed. This commit fixes it by: - Using macos-latest which has simulators pre-installed - Removing explicit Xcode version selection - Improving simulator detection with fallback logic - Adding better debug output for available simulators The dynamic simulator detection now: 1. Lists all available simulators for debugging 2. Finds first available iPhone simulator 3. Falls back to generic iOS Simulator if none found Fixes the "iOS 18.1 is not installed" error. Co-Authored-By: Claude Sonnet 4.5 --- .github/workflows/build-and-test.yml | 27 +++++++++++++-------------- 1 file changed, 13 insertions(+), 14 deletions(-) diff --git a/.github/workflows/build-and-test.yml b/.github/workflows/build-and-test.yml index f3dbe5cd..9cc9b230 100644 --- a/.github/workflows/build-and-test.yml +++ b/.github/workflows/build-and-test.yml @@ -13,7 +13,7 @@ jobs: build-and-test: name: Build and Test - runs-on: macos-15 + runs-on: macos-latest env: example-scheme: Example @@ -23,15 +23,20 @@ jobs: steps: - uses: actions/checkout@v4 - - name: Select Xcode - run: sudo xcode-select -s /Applications/Xcode_16.1.app/Contents/Developer - - name: List Available Simulators - run: xcrun simctl list devices available | grep iPhone | head -20 + run: xcrun simctl list devices available - name: Set Destination run: | - echo "destination=platform=iOS Simulator,OS=latest" >> $GITHUB_ENV + # Find any available iPhone simulator + SIMULATOR_NAME=$(xcrun simctl list devices available | grep 'iPhone' | grep -v 'unavailable' | head -1 | sed -E 's/.*iPhone ([0-9]+).*/iPhone \1/') + if [ -z "$SIMULATOR_NAME" ]; then + echo "No iPhone simulator found, falling back to generic iOS Simulator" + echo "destination=platform=iOS Simulator" >> $GITHUB_ENV + else + echo "Using simulator: $SIMULATOR_NAME" + echo "destination=platform=iOS Simulator,name=$SIMULATOR_NAME" >> $GITHUB_ENV + fi - name: Cache Mint Packages uses: actions/cache@v4 @@ -113,16 +118,13 @@ jobs: validate-cocoapods: name: Validate Pod - runs-on: macos-15 + runs-on: macos-latest steps: - uses: actions/checkout@v4 with: fetch-depth: 0 - - name: Select Xcode - run: sudo xcode-select -s /Applications/Xcode_16.1.app/Contents/Developer - - name: Install Dependencies run: gem install cocoapods @@ -133,7 +135,7 @@ jobs: validate-swift-package: name: Validate Swift Package - runs-on: macos-15 + runs-on: macos-latest env: destination: platform=macOS,variant=Mac Catalyst @@ -142,9 +144,6 @@ jobs: steps: - uses: actions/checkout@v4 - - name: Select Xcode - run: sudo xcode-select -s /Applications/Xcode_16.1.app/Contents/Developer - - name: Validate Swift Package run: | xcodebuild \