Skip to content

Commit

Permalink
build(ci): test iOS
Browse files Browse the repository at this point in the history
Signed-off-by: Berend Sliedrecht <[email protected]>
  • Loading branch information
berendsliedrecht committed Feb 28, 2024
1 parent e7a426d commit 91e394c
Show file tree
Hide file tree
Showing 2 changed files with 43 additions and 19 deletions.
43 changes: 43 additions & 0 deletions .github/workflows/ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -136,3 +136,46 @@ jobs:
arch: x86_64
emulator-options: -no-window -gpu swiftshader_indirect -noaudio -no-boot-anim -camera-back none -no-snapshot-save
script: ./.github/workflows/android_test.sh examples/android/target/debug/apk/android.apk

test-ios:
name: Test iOS

runs-on: macos-latest

steps:
- uses: actions/checkout@v4

- name: Install Rust Toolchain
uses: dtolnay/rust-toolchain@stable
with:
toolchain: ${{ env.RUST_VERSION }}
targets: aarch64-apple-ios-sim, aarch64-apple-ios, x86_64-apple-ios

- name: Install xcodegen
run: brew install xcodegen

- name: Install Cargo Xcodebuild
run: cargo install cargo-xcodebuild

- name: Create iOS Simulator
id: create-simulator
run: |
UDID=$(xcrun simctl create "iPhone 14" "com.apple.CoreSimulator.SimDeviceType.iPhone-14" "com.apple.CoreSimulator.SimRuntime.iOS-16-2")
echo "UDID=$UDID" >> "$GITHUB_OUTPUT"
- name: Boot the simulator
env:
UDID: ${{ steps.create-simulator.outputs.UDID }}
run: |
xcrun simctl boot $UDID
(open -a Simulator --args -CurrentDeviceUDID $UDID &); sleep 5
- name: Run Tests
run: cargo xcodebuild run --manifest-path examples/ios/Cargo.toml


test-output:
runs-on: macos-latest

steps:
- run: xcrun simctl list --json devices available | grep CoreSimulator
19 changes: 0 additions & 19 deletions examples/ios/Cargo.lock

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

0 comments on commit 91e394c

Please sign in to comment.