Skip to content
Draft
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
63 changes: 63 additions & 0 deletions .github/workflows/itay-test.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,63 @@
name: Test Wait for Runtimes

on:
pull_request:

jobs:
runtimes:
name: Wait for Runtimes
runs-on: ["ghcr.io/cirruslabs/macos-runner:tahoe", "runner_group_id:10"]
timeout-minutes: 10
steps:
- uses: actions/checkout@v5

- name: List xcode runtimes and devices
run: |
xcrun simctl list runtimes -v
xcrun simctl list devices -v

- name: List mounted simulators
run: |
mount | grep CoreSimulator

- name: Select Xcode version
env:
XCODE_VERSION: "26.1.1"
run: ./scripts/ci-select-xcode.sh "$XCODE_VERSION"

- name: List xcode runtimes and devices
run: |
xcrun simctl list runtimes -v
xcrun simctl list devices -v

- name: Wait until all devices are available
run: |
# Unmount simulator volumes once before checking
for dir in /Library/Developer/CoreSimulator/Volumes/*; do
echo "Ejecting $dir"
sudo diskutil unmount force "$dir" || true
done
sudo launchctl kill -9 system/com.apple.CoreSimulator.simdiskimaged || true
sudo pkill -9 com.apple.CoreSimulator.CoreSimulatorService || true

count=0
while true; do
unavailable_count=$(xcrun simctl list devices -v | grep -c "unavailable" || true)
if [ "$unavailable_count" -eq 0 ]; then
echo "All devices are available after $count attempts"
break
fi
echo "Waiting for devices to be available... attempt $count"
echo "Number of unavailable devices: $unavailable_count"
# echo "--------------------------------"
# xcrun simctl list devices -v | grep unavailable
# echo "--------------------------------"

sleep 20
count=$((count + 1))
done

echo "Listing devices after waiting"
echo "--------------------------------"
xcrun simctl list devices -v
echo "--------------------------------"
Loading