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 Apr 24, 2024
1 parent e7a426d commit d5e1c18
Show file tree
Hide file tree
Showing 2 changed files with 44 additions and 33 deletions.
58 changes: 44 additions & 14 deletions .github/workflows/ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -107,11 +107,38 @@ jobs:

- run: cargo check --target=${{ matrix.target }}

# test-android:
# name: Test Android

test-android:
name: Test Android
# # Using macos runner for hardware acceleration
# runs-on: macos-latest

# steps:
# - uses: actions/checkout@v4

# - name: Install Rust Toolchain
# uses: dtolnay/rust-toolchain@stable
# with:
# toolchain: ${{ env.RUST_VERSION }}
# targets: x86_64-linux-android

# - name: Install Cargo APK
# run: cargo install cargo-apk

# - name: Build Android Application
# run: cargo apk build --manifest-path ./examples/android/Cargo.toml --target=x86_64-linux-android

# - name: Run Tests
# uses: reactivecircus/android-emulator-runner@v2
# with:
# api-level: 31
# 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

# Using macos runner for hardware acceleration
runs-on: macos-latest

steps:
Expand All @@ -121,18 +148,21 @@ jobs:
uses: dtolnay/rust-toolchain@stable
with:
toolchain: ${{ env.RUST_VERSION }}
targets: x86_64-linux-android
targets: aarch64-apple-ios-sim, aarch64-apple-ios, x86_64-apple-ios

- name: Install Cargo APK
run: cargo install cargo-apk
- name: Install xcodegen
run: brew install xcodegen

- name: Build Android Application
run: cargo apk build --manifest-path ./examples/android/Cargo.toml --target=x86_64-linux-android
- name: Install Cargo Xcodebuild
run: cargo install cargo-xcodebuild

- name: Run Tests
uses: reactivecircus/android-emulator-runner@v2
- uses: futureware-tech/simulator-action@v3
with:
api-level: 31
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
model: "iPhone 15"
- run: cargo xcodebuild run --manifest-path examples/ios/Cargo.toml

test-output:
runs-on: macos-latest

steps:
- run: xcrun simctl list --json devices available
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 d5e1c18

Please sign in to comment.