@@ -13,38 +13,13 @@ jobs:
13
13
with :
14
14
xcode-version : latest-stable
15
15
16
- - name : Cleanup Simulators
17
- run : |
18
- xcrun simctl shutdown all || true
19
- xcrun simctl erase all || true
20
- xcrun simctl delete unavailable
21
-
22
- - name : Create and Boot Simulator
23
- run : |
24
- RUNTIME=$(xcrun simctl list runtimes | grep "iOS-17-0" | awk '{print $NF}')
25
- if [ -z "$RUNTIME" ]; then
26
- echo "Error: Required iOS runtime not found!" >&2
27
- exit 1
28
- fi
29
- xcrun simctl create "iPhone-14-Pro-Max-CI" "iPhone 14 Pro Max" "$RUNTIME"
30
- xcrun simctl boot "iPhone-14-Pro-Max-CI"
31
-
32
- - name : Verify Simulators
33
- run : xcrun simctl list devices
34
-
35
- - name : Get Simulator ID Dynamically
36
- id : get-simulator-id
37
- run : |
38
- SIMULATOR_ID=$(xcrun simctl list devices | grep "iPhone-14-Pro-Max-CI" | grep -oE '[A-F0-9-]{36}')
39
- echo "SIMULATOR_ID=$SIMULATOR_ID" >> $GITHUB_ENV
40
-
41
16
- name : Build and test with parallel testing
42
17
run : |
43
18
xcodebuild test \
44
19
-project swift-sdk.xcodeproj \
45
20
-scheme swift-sdk \
46
21
-sdk iphonesimulator \
47
- -destination " platform=iOS Simulator,id=${SIMULATOR_ID}" \
22
+ -destination ' platform=iOS Simulator,name=iPhone 14 Pro Max' \
48
23
-enableCodeCoverage YES \
49
24
-resultBundlePath TestResults.xcresult \
50
25
CODE_SIGNING_REQUIRED=NO | xcpretty && exit ${PIPESTATUS[0]}
0 commit comments