Skip to content

Commit fd4d941

Browse files
committed
Move CI XCode Simulator startup section
1 parent f9590db commit fd4d941

File tree

1 file changed

+11
-11
lines changed

1 file changed

+11
-11
lines changed

.github/workflows/ci.yml

Lines changed: 11 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -314,6 +314,17 @@ jobs:
314314
# cargo install cargo-dinghy --version=^0.4 --root=$HOME/extern --target=x86_64-apple-darwin
315315
run: cargo install --git https://github.com/madsmtm/dinghy.git --branch update-cargo --bin cargo-dinghy --root=$HOME/extern --target=x86_64-apple-darwin
316316

317+
- name: Launch XCode Simulator and prepare Dinghy
318+
if: matrix.dinghy
319+
run: |
320+
# Get system info
321+
xcrun simctl list runtimes
322+
323+
# Launch the simulator
324+
RUNTIME_ID=$(xcrun simctl list runtimes | grep iOS | cut -d ' ' -f 7 | tail -1)
325+
export SIM_ID=$(xcrun simctl create My-iphone7 com.apple.CoreSimulator.SimDeviceType.iPhone-7 $RUNTIME_ID)
326+
xcrun simctl boot $SIM_ID
327+
317328
- name: Lint
318329
# Temporarily allow `clippy::let_unit_value`
319330
run: cargo clippy ${{ env.ARGS }} --all-targets -- --deny warnings --allow clippy::let_unit_value
@@ -376,17 +387,6 @@ jobs:
376387

377388
cargo run --target=$HOST_TARGET --features=run --bin test-assembly -- ${{ env.ARGS }}
378389

379-
- name: Launch XCode Simulator
380-
if: matrix.dinghy
381-
run: |
382-
# Get system info
383-
xcrun simctl list runtimes
384-
385-
# Launch the simulator
386-
RUNTIME_ID=$(xcrun simctl list runtimes | grep iOS | cut -d ' ' -f 7 | tail -1)
387-
export SIM_ID=$(xcrun simctl create My-iphone7 com.apple.CoreSimulator.SimDeviceType.iPhone-7 $RUNTIME_ID)
388-
xcrun simctl boot $SIM_ID
389-
390390
- name: Build w. Cargo Dinghy
391391
if: matrix.dinghy
392392
run: cargo dinghy --device=$SIM_ID build ${{ matrix.args }}

0 commit comments

Comments
 (0)