Skip to content

Commit 3c70f95

Browse files
authored
chore: Ensure runtime is loaded for SwiftUI Crash (#6946)
* chore: Ensure runtime is loaded for SwiftUI Crash * Match script timeout to github's step timeout
1 parent 98f1703 commit 3c70f95

File tree

2 files changed

+8
-1
lines changed

2 files changed

+8
-1
lines changed

.github/workflows/ui-tests-critical.yml

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -102,6 +102,13 @@ jobs:
102102
shell: bash
103103
run: ./scripts/ci-enable-permissions.sh
104104

105+
- name: Ensure required runtime is loaded
106+
# Ideally we will not need this, but CI sometimes is failing to load some runtimes, this will ensure they are loaded
107+
timeout-minutes: 5 # 5 minutes timeout
108+
env:
109+
OS_VERSION: "18.4"
110+
run: ./scripts/ci-ensure-runtime-loaded.sh --os-version "$OS_VERSION"
111+
105112
- name: Boot simulator
106113
run: ./scripts/ci-boot-simulator.sh
107114

scripts/ci-ensure-runtime-loaded.sh

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -56,7 +56,7 @@ sudo pkill -9 com.apple.CoreSimulator.CoreSimulatorService || true
5656

5757
# Wait for a runtime to be loaded
5858
count=0
59-
MAX_ATTEMPTS=100 # 500 seconds timeout
59+
MAX_ATTEMPTS=60 # 300 seconds (5 minutes) timeout
6060
while [ $count -lt $MAX_ATTEMPTS ]; do
6161
if xcrun simctl list runtimes -v | grep -qE "iOS $OS_VERSION" && ! xcrun simctl list runtimes -v | grep -qE "iOS $OS_VERSION.*unavailable"; then
6262
echo "Runtime $OS_VERSION is loaded after $count attempts"

0 commit comments

Comments
 (0)