From c09fc3f71c9631e324078969195514f07866d556 Mon Sep 17 00:00:00 2001 From: Worthing ~ <115107835+w-goog@users.noreply.github.com> Date: Thu, 12 Nov 2026 15:41:04 -0800 Subject: [PATCH 1/4] g-orchestrated: boot the Xcode 27 simulators before testing --- .github/workflows/tests.yml | 75 +++++++++++++++++++++++++++++++------ 1 file changed, 63 insertions(+), 12 deletions(-) diff --git a/.github/workflows/tests.yml b/.github/workflows/tests.yml index 72353b449..35e662b32 100644 --- a/.github/workflows/tests.yml +++ b/.github/workflows/tests.yml @@ -71,7 +71,7 @@ jobs: xcode-27-preview-test: # Xcode 27 is currently only available on the preview `xcode-27` image, # on which Xcode 27 beta is the only (thus, default) Xcode and the simulator - # runtimes are the 27.0 generation. The image is preview, so this job is does + # runtimes are the 27.0 generation. The image is preview, so this job does # not block merges. # https://github.com/actions/runner-images/issues/14404 runs-on: xcode-27 @@ -79,20 +79,71 @@ jobs: strategy: fail-fast: false matrix: - flags: [ - "-scheme AppAuth-iOS -destination 'platform=iOS Simulator,name=iPhone 17,OS=27.0' -sdk 'iphonesimulator'", - "-scheme AppAuth-macOS -destination 'platform=macOS' -sdk 'macosx'", - "-scheme AppAuth_macOS -destination 'platform=macOS' -sdk 'macosx'", - "-scheme AppAuth-tvOS -destination 'platform=tvOS Simulator,name=Apple TV 4K (3rd generation),OS=27.0' -sdk 'appletvsimulator'", - "-scheme AppAuth_tvOS -destination 'platform=tvOS Simulator,name=Apple TV 4K (3rd generation),OS=27.0' -sdk 'appletvsimulator'", - "-scheme AppAuthTV -destination 'platform=tvOS Simulator,name=Apple TV 4K (3rd generation),OS=27.0' -sdk 'appletvsimulator'" - ] + include: + - scheme: AppAuth-iOS + sdk: iphonesimulator + runtime: iOS-27-0 + device: iPhone 17 + - scheme: AppAuth-macOS + sdk: macosx + - scheme: AppAuth_macOS + sdk: macosx + - scheme: AppAuth-tvOS + sdk: appletvsimulator + runtime: tvOS-27-0 + device: Apple TV 4K (3rd generation) + - scheme: AppAuth_tvOS + sdk: appletvsimulator + runtime: tvOS-27-0 + device: Apple TV 4K (3rd generation) + - scheme: AppAuthTV + sdk: appletvsimulator + runtime: tvOS-27-0 + device: Apple TV 4K (3rd generation) steps: - uses: actions/checkout@v5 - name: Warm up simulator runtimes run: xcrun simctl list devices available + # Boot the simulator before xcodebuild does. On this image the tvOS 27 + # simulator can take longer than xcodebuild's 120s boot timeout. + - name: Boot the simulator + if: matrix.device != '' + timeout-minutes: 10 + env: + RUNTIME: com.apple.CoreSimulator.SimRuntime.${{ matrix.runtime }} + DEVICE: ${{ matrix.device }} + run: | + udid=$(xcrun simctl list -j devices available \ + | jq -r --arg rt "$RUNTIME" --arg name "$DEVICE" \ + '.devices[$rt] // [] | map(select(.name == $name)) | .[0].udid // empty') + if [ -z "$udid" ]; then + echo "::error::No available '$DEVICE' simulator for $RUNTIME" + xcrun simctl list devices available + exit 1 + fi + xcrun simctl boot "$udid" || true + xcrun simctl bootstatus "$udid" -b + echo "SIM_UDID=$udid" >> "$GITHUB_ENV" + # One retry: the preview image's simulators still drop the test runner + # now and then. - name: Run unit test targets + env: + SCHEME: ${{ matrix.scheme }} + SDK: ${{ matrix.sdk }} run: | - xcodebuild test \ - -project AppAuth.xcodeproj \ - ${{ matrix.flags }} + if [ -n "$SIM_UDID" ]; then + destination="id=$SIM_UDID" + else + destination="platform=macOS" + fi + run_tests() { + xcodebuild test \ + -project AppAuth.xcodeproj \ + -scheme "$SCHEME" \ + -sdk "$SDK" \ + -destination "$destination" + } + run_tests || { + echo "::warning::$SCHEME failed on the first try; retrying once" + run_tests + } From c910c2941887d6bb602d59a2e07514304d25059e Mon Sep 17 00:00:00 2001 From: Worthing ~ <115107835+w-goog@users.noreply.github.com> Date: Thu, 12 Nov 2026 16:01:42 -0800 Subject: [PATCH 2/4] g-orchestrated: run the Xcode 27 tvOS tests on the tvOS 27.2 simulator --- .github/workflows/tests.yml | 18 +++++++++--------- 1 file changed, 9 insertions(+), 9 deletions(-) diff --git a/.github/workflows/tests.yml b/.github/workflows/tests.yml index 35e662b32..3a8e6e969 100644 --- a/.github/workflows/tests.yml +++ b/.github/workflows/tests.yml @@ -71,7 +71,7 @@ jobs: xcode-27-preview-test: # Xcode 27 is currently only available on the preview `xcode-27` image, # on which Xcode 27 beta is the only (thus, default) Xcode and the simulator - # runtimes are the 27.0 generation. The image is preview, so this job does + # runtimes are the 27 generation. The image is preview, so this job does # not block merges. # https://github.com/actions/runner-images/issues/14404 runs-on: xcode-27 @@ -90,22 +90,22 @@ jobs: sdk: macosx - scheme: AppAuth-tvOS sdk: appletvsimulator - runtime: tvOS-27-0 - device: Apple TV 4K (3rd generation) + runtime: tvOS-27-2 + device: Apple TV 4K (4th generation) - scheme: AppAuth_tvOS sdk: appletvsimulator - runtime: tvOS-27-0 - device: Apple TV 4K (3rd generation) + runtime: tvOS-27-2 + device: Apple TV 4K (4th generation) - scheme: AppAuthTV sdk: appletvsimulator - runtime: tvOS-27-0 - device: Apple TV 4K (3rd generation) + runtime: tvOS-27-2 + device: Apple TV 4K (4th generation) steps: - uses: actions/checkout@v5 - name: Warm up simulator runtimes run: xcrun simctl list devices available - # Boot the simulator before xcodebuild does. On this image the tvOS 27 - # simulator can take longer than xcodebuild's 120s boot timeout. + # Boot the simulator before xcodebuild does. A missing runtime or a slow + # boot then fails here, with its own error. - name: Boot the simulator if: matrix.device != '' timeout-minutes: 10 From 113c43c18c3539fae3f6620e4e518601d35e17b7 Mon Sep 17 00:00:00 2001 From: Worthing ~ <115107835+w-goog@users.noreply.github.com> Date: Thu, 12 Nov 2026 16:04:23 -0800 Subject: [PATCH 3/4] g-orchestrated: select Xcode 27.2 and test on its iOS 27.2 simulator --- .github/workflows/tests.yml | 12 +++++++----- 1 file changed, 7 insertions(+), 5 deletions(-) diff --git a/.github/workflows/tests.yml b/.github/workflows/tests.yml index 3a8e6e969..d14da9d20 100644 --- a/.github/workflows/tests.yml +++ b/.github/workflows/tests.yml @@ -69,10 +69,10 @@ jobs: version: v0.7.3 xcode-27-preview-test: - # Xcode 27 is currently only available on the preview `xcode-27` image, - # on which Xcode 27 beta is the only (thus, default) Xcode and the simulator - # runtimes are the 27 generation. The image is preview, so this job does - # not block merges. + # Xcode 27 is currently only available on the preview `xcode-27` image. + # It has Xcode 27.0, 27.1 (the default) and 27.2; the job selects 27.2 and + # tests on its 27.2 simulators. The image is preview, so this job does not + # block merges. # https://github.com/actions/runner-images/issues/14404 runs-on: xcode-27 continue-on-error: true @@ -82,7 +82,7 @@ jobs: include: - scheme: AppAuth-iOS sdk: iphonesimulator - runtime: iOS-27-0 + runtime: iOS-27-2 device: iPhone 17 - scheme: AppAuth-macOS sdk: macosx @@ -102,6 +102,8 @@ jobs: device: Apple TV 4K (4th generation) steps: - uses: actions/checkout@v5 + - name: Select Xcode + run: sudo xcode-select -s /Applications/Xcode_27.2.app/Contents/Developer - name: Warm up simulator runtimes run: xcrun simctl list devices available # Boot the simulator before xcodebuild does. A missing runtime or a slow From 02af9fb9e850af9c59fd67aaf52be0ee83ec7e56 Mon Sep 17 00:00:00 2001 From: Worthing ~ <115107835+w-goog@users.noreply.github.com> Date: Thu, 12 Nov 2026 17:27:15 -0800 Subject: [PATCH 4/4] g-orchestrated: drop the simulator boot step and retry --- .github/workflows/tests.yml | 73 ++++++------------------------------- 1 file changed, 11 insertions(+), 62 deletions(-) diff --git a/.github/workflows/tests.yml b/.github/workflows/tests.yml index d14da9d20..93ca53d95 100644 --- a/.github/workflows/tests.yml +++ b/.github/workflows/tests.yml @@ -79,73 +79,22 @@ jobs: strategy: fail-fast: false matrix: - include: - - scheme: AppAuth-iOS - sdk: iphonesimulator - runtime: iOS-27-2 - device: iPhone 17 - - scheme: AppAuth-macOS - sdk: macosx - - scheme: AppAuth_macOS - sdk: macosx - - scheme: AppAuth-tvOS - sdk: appletvsimulator - runtime: tvOS-27-2 - device: Apple TV 4K (4th generation) - - scheme: AppAuth_tvOS - sdk: appletvsimulator - runtime: tvOS-27-2 - device: Apple TV 4K (4th generation) - - scheme: AppAuthTV - sdk: appletvsimulator - runtime: tvOS-27-2 - device: Apple TV 4K (4th generation) + flags: [ + "-scheme AppAuth-iOS -destination 'platform=iOS Simulator,name=iPhone 17,OS=27.2' -sdk 'iphonesimulator'", + "-scheme AppAuth-macOS -destination 'platform=macOS' -sdk 'macosx'", + "-scheme AppAuth_macOS -destination 'platform=macOS' -sdk 'macosx'", + "-scheme AppAuth-tvOS -destination 'platform=tvOS Simulator,name=Apple TV 4K (4th generation),OS=27.2' -sdk 'appletvsimulator'", + "-scheme AppAuth_tvOS -destination 'platform=tvOS Simulator,name=Apple TV 4K (4th generation),OS=27.2' -sdk 'appletvsimulator'", + "-scheme AppAuthTV -destination 'platform=tvOS Simulator,name=Apple TV 4K (4th generation),OS=27.2' -sdk 'appletvsimulator'" + ] steps: - uses: actions/checkout@v5 - name: Select Xcode run: sudo xcode-select -s /Applications/Xcode_27.2.app/Contents/Developer - name: Warm up simulator runtimes run: xcrun simctl list devices available - # Boot the simulator before xcodebuild does. A missing runtime or a slow - # boot then fails here, with its own error. - - name: Boot the simulator - if: matrix.device != '' - timeout-minutes: 10 - env: - RUNTIME: com.apple.CoreSimulator.SimRuntime.${{ matrix.runtime }} - DEVICE: ${{ matrix.device }} - run: | - udid=$(xcrun simctl list -j devices available \ - | jq -r --arg rt "$RUNTIME" --arg name "$DEVICE" \ - '.devices[$rt] // [] | map(select(.name == $name)) | .[0].udid // empty') - if [ -z "$udid" ]; then - echo "::error::No available '$DEVICE' simulator for $RUNTIME" - xcrun simctl list devices available - exit 1 - fi - xcrun simctl boot "$udid" || true - xcrun simctl bootstatus "$udid" -b - echo "SIM_UDID=$udid" >> "$GITHUB_ENV" - # One retry: the preview image's simulators still drop the test runner - # now and then. - name: Run unit test targets - env: - SCHEME: ${{ matrix.scheme }} - SDK: ${{ matrix.sdk }} run: | - if [ -n "$SIM_UDID" ]; then - destination="id=$SIM_UDID" - else - destination="platform=macOS" - fi - run_tests() { - xcodebuild test \ - -project AppAuth.xcodeproj \ - -scheme "$SCHEME" \ - -sdk "$SDK" \ - -destination "$destination" - } - run_tests || { - echo "::warning::$SCHEME failed on the first try; retrying once" - run_tests - } + xcodebuild test \ + -project AppAuth.xcodeproj \ + ${{ matrix.flags }}