diff --git a/.github/workflows/ios-actions.yml b/.github/workflows/ios-actions.yml index 1d3367bb5..840dd015a 100644 --- a/.github/workflows/ios-actions.yml +++ b/.github/workflows/ios-actions.yml @@ -67,6 +67,14 @@ jobs: - name: Checkout uses: actions/checkout@v4 + # A new simulator renders posters and widgets for over 10 minutes after its first boot, starving + # the app under test, so boot the one Detox uses now and let that overlap with the build + - name: Boot simulator + run: | + UDID=$("$GITHUB_WORKSPACE/scripts/ci/pick-ios-simulator.sh") + echo "DETOX_DEVICE_UDID=$UDID" >> "$GITHUB_ENV" + xcrun simctl boot "$UDID" + # Fork PRs get no secrets; fall back to the public rotated CI token (see rnmapbox/ci-config) - name: Access Token run: | @@ -145,12 +153,10 @@ jobs: xcodebuild -version set -o pipefail && NSUnbufferedIO=YES yarn detox build --configuration "$DETOX_CONFIGURATION" 2>&1 - - name: Boot simulator + - name: Wait for the simulator run: | - UDID=$("$GITHUB_WORKSPACE/scripts/ci/pick-ios-simulator.sh") - echo "DETOX_DEVICE_UDID=$UDID" >> "$GITHUB_ENV" - xcrun simctl boot "$UDID" - time xcrun simctl bootstatus "$UDID" + time xcrun simctl bootstatus "$DETOX_DEVICE_UDID" + echo "load: $(sysctl -n vm.loadavg), free: $(vm_stat | awk '/Pages free/ {print int($3 * 16384 / 1048576)}') MB" - name: Test with detox if: inputs.E2E_MODE == 'test'