Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add watchOS and tvOS to CI #71

Closed
wants to merge 3 commits into from
Closed
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
23 changes: 23 additions & 0 deletions .cargo/config.toml
Original file line number Diff line number Diff line change
@@ -0,0 +1,23 @@
[target.aarch64-apple-ios-sim]
runner = "cargo dinghy -p auto-ios-aarch64-sim runner"

[target.x86_64-apple-ios]
runner = "cargo dinghy -p auto-ios-x86_64 runner"

# Running on device requires doing the steps in
# https://github.com/sonos/dinghy/blob/main/docs/ios.md#additional-requirements
[target.aarch64-apple-ios]
runner = "cargo dinghy -p auto-ios-aarch64 runner"

# These target runners are added in https://github.com/sonos/dinghy/pull/203
[target.aarch64-apple-tvos-sim]
runner = "cargo dinghy -p auto-tvos-aarch64-sim runner"

[target.x86_64-apple-tvos]
runner = "cargo dinghy -p auto-tvos-x86_64 runner"

[target.x86_64-apple-watchos-sim]
runner = "cargo dinghy -p auto-watchos-x86_64-sim runner"

[target.aarch64-apple-watchos-sim]
runner = "cargo dinghy -p auto-watchos-aarch64-sim runner"
61 changes: 61 additions & 0 deletions .github/workflows/apple-devices.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,61 @@
# based on https://gist.github.com/learnopengles/60c945b92fbe60a0fecaa0143c35c4a for testing in simulator
name: x86_64-apple-ios

on: pull_request

env:
TOOLCHAIN: nightly
CARGO_TERM_COLOR: always
CARGO_DINGHY_REV: "a8ec5b0"

jobs:
integration_tests:
# rust cross-compilation
runs-on: macos-latest
strategy:
matrix:
rust-target: ["x86_64-apple-ios" ]
apple-sim: [ "iOS" ]
include:
- rust-target: "x86_64-apple-tvos"
apple-sim: "tvOS"
- rust-target: "x86_64-apple-watchos-sim"
apple-sim: "watchOS"
steps:
- uses: actions/checkout@v4
- uses: dtolnay/rust-toolchain@master
with:
toolchain: ${{ env.TOOLCHAIN }}
components: rust-src
- name: Cache
uses: actions/cache@v3
with:
path: |
~/.cargo/bin
~/.cargo/git
~/.cargo/registry
target
key: ${{ github.workflow }}-${{ github.job }}-toolchain-${{ env.TOOLCHAIN }}-cargo-${{ env.CARGO_DINGHY_REV }}-${{ hashFiles('**/Cargo.lock') }}
- name: Install cargo-dinghy
run: |
if ! command -v cargo-dinghy &> /dev/null; then
cargo install --git https://github.com/liveview-native/dinghy.git --force --rev ${CARGO_DINGHY_REV} cargo-dinghy
fi
- name: Build
uses: actions-rs/cargo@v1
with:
command: build
args: --package liveview-native-core

- name: Start Simulator
uses: futureware-tech/simulator-action@v3
with:
os: ${{ matrix.apple-sim }}

- name: Run Rust tests on simulator for ${{ matrix.rust-target }}
env:
DINGHY_LOG: debug
run: |
cargo dinghy all-platforms
cargo dinghy all-devices
cargo -Zbuild-std test --target ${{ matrix.rust-target }}
86 changes: 0 additions & 86 deletions .github/workflows/x86_64-apple-ios.yml

This file was deleted.

4 changes: 2 additions & 2 deletions Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -29,5 +29,5 @@ opt-level = 1
split-debuginfo = "packed"
debug = 1

[patch.crates-io]
uniffi = { git = "https://github.com/mozilla/uniffi-rs/", branch = "main" }
#[patch.crates-io]
#uniffi = { git = "https://github.com/mozilla/uniffi-rs/", branch = "main" }
4 changes: 2 additions & 2 deletions crates/core/Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -37,11 +37,11 @@ serde_json = { version = "1.0" }
smallstr = { version = "0.3", features = ["union"] }
smallvec = { version = "1.10", features = ["union", "const_generics", "specialization"] }
thiserror = "1.0"
uniffi = { version = "0.25", features = ["cli"] }
uniffi = { version = "0.26", features = ["cli"] }

[build-dependencies]
Inflector = "0.11"
uniffi = { version = "0.25", features = [ "build" ] }
uniffi = { version = "0.26", features = [ "build" ] }

[dev-dependencies]
paste = { version = "1.0" }
Expand Down
1 change: 0 additions & 1 deletion crates/core/tests/support/app/.gitignore

This file was deleted.

18 changes: 0 additions & 18 deletions crates/core/tests/support/app/Info.plist

This file was deleted.

2 changes: 0 additions & 2 deletions crates/core/tests/support/linker_shim.sh

This file was deleted.

Loading