Fix sample project, cleanup tests and add github action

This commit is contained in:
Stefan Ceriu
2022-05-17 12:23:23 +03:00
parent ba2cef62b0
commit 45cb162e5a
7 changed files with 101 additions and 186 deletions

57
.github/workflows/ffi.yml vendored Normal file
View File

@@ -0,0 +1,57 @@
name: FFI
on:
workflow_dispatch:
push:
branches: [main]
pull_request:
# branches: [main]
# types:
# - opened
# - reopened
# - synchronize
# - ready_for_review
env:
CARGO_TERM_COLOR: always
jobs:
test:
name: Run Apple platform tests
runs-on: macos-12
steps:
- name: Checkout
uses: actions/checkout@v1
- name: Install Rust
uses: actions-rs/toolchain@v1
with:
toolchain: stable
profile: minimal
override: true
- name: Install targets
run: |
rustup target add aarch64-apple-ios-sim
rustup target add x86_64-apple-ios
- name: Install Uniffi
uses: actions-rs/cargo@v1
with:
command: install
args: uniffi_bindgen
- name: Load cache
uses: Swatinem/rust-cache@v1
- name: Generate .xcframework
run: sh apple/debug_build_xcframework.sh ci
- name: Run XCTests
run: |
xcodebuild test \
-project apple/MatrixRustSDK/MatrixRustSDK.xcodeproj \
-scheme MatrixRustSDK \
-sdk iphonesimulator \
-destination 'platform=iOS Simulator,name=iPhone 13,OS=15.4'