-
Notifications
You must be signed in to change notification settings - Fork 27
44 lines (41 loc) · 1.14 KB
/
build_test_ios.yml
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
name: iOS
on:
push:
branches: [ main ]
pull_request:
branches: [ main, next ]
env:
RUST_BACKTRACE: full
jobs:
build_test:
runs-on: macos-latest
strategy:
fail-fast: true
matrix:
toolchain: [stable]
steps:
- uses: actions/checkout@b4ffde65f46336ab88eb53be808477a3936bae11 # v4
- name: Setup Rust
uses: actions-rs/toolchain@v1
with:
toolchain: ${{ matrix.toolchain }}
override: true
- name: Add target
run: rustup target add x86_64-apple-ios
- name: Cache cargo install
uses: actions/cache@v3
with:
path: ~/.cargo/bin/
key: ${{ runner.os }}-${{ matrix.toolchain }}-${{ github.ref }}-cargo-install-${{ hashFiles('**/Cargo.lock') }}
- name: Install cargo-dinghy
run: |
if ! command -v cargo-dinghy &> /dev/null
then
cargo install cargo-dinghy
fi
- name: Start iPhone simulator
run: xcrun simctl boot "iPhone 14"
- name: List simulators
run: xcrun simctl list
- name: Build and run tests
run: cargo dinghy -d iphone test