-
Notifications
You must be signed in to change notification settings - Fork 0
86 lines (84 loc) · 3.7 KB
/
test_iphone.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
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
on: [push, pull_request]
jobs:
dinghy:
strategy:
matrix:
os: [macos-latest]
version: [1.68.0, stable, beta, nightly]
prefix: [test_iphone]
runs-on: macos-latest
steps:
- uses: actions/checkout@v3
- name: Install stable rust toolchain
uses: actions-rs/toolchain@v1
with:
profile: minimal
toolchain: stable
target: x86_64-apple-ios
override: true
# - name: install target
# run: rustup target add aarch64-apple-ios x86_64-apple-ios aarch64-apple-ios-sim
- uses: cargo-bins/cargo-binstall@main
- name: install dinghy
run: |
if [ ${{matrix.version}} == "1.68.0" ]; then
if [ ${{matrix.os}} == "macos-latest" ]; then
cargo binstall -q --no-confirm --force --pkg-url="https://github.com/sonos/dinghy/releases/download/0.6.5/cargo-dinghy-macos-0.6.5.tgz" [email protected]
else
cargo binstall -q --no-confirm --force --pkg-url="https://github.com/sonos/dinghy/releases/download/0.6.5/cargo-dinghy-linux-0.6.5.tgz" [email protected]
fi
else
cargo binstall -q --no-confirm --force cargo-dinghy
fi
- name: start simulator
uses: futureware-tech/simulator-action@v3
with:
model: "iPhone 8"
- name: Dinghy test
run: cargo dinghy --platform auto-ios-x86_64 test
working-directory: ./examples/iphone/
bundle:
strategy:
matrix:
os: [macos-latest]
version: [1.68.0, stable, beta, nightly]
prefix: [test_iphone]
runs-on: macos-latest
steps:
- uses: actions/checkout@v3
- name: Install stable rust toolchain
uses: actions-rs/toolchain@v1
with:
profile: minimal
toolchain: stable
target: x86_64-apple-ios
override: true
- run: rustup target add x86_64-apple-ios
- uses: cargo-bins/cargo-binstall@main
- name: install rust iphone
run: cargo binstall -q --no-confirm --force cargo-bundle
- name: move target dir
run: |
cp -r ./examples/iphone /tmp/
cp -r ../. /tmp/
ls -al /tmp/
cd /tmp/iphone/
sed -i.bak 's|path = "../../"|path = "../nickname"|' Cargo.toml
- name: build
run: cargo bundle --format ios --target x86_64-apple-ios --release
working-directory: /tmp/iphone/
- name: start simulator
uses: futureware-tech/simulator-action@v3
# https://github.com/futureware-tech/simulator-action/wiki/Devices-macos-latest
with:
model: "iPhone 8"
shutdown_after_job: false
- name: pre drive
run: |
ls -al target/x86_64-apple-ios/release/bundle/ios/nickname-ios-test-app.app
cat target/x86_64-apple-ios/release/bundle/ios/nickname-ios-test-app.app/Info.plist
xcrun simctl install booted target/x86_64-apple-ios/release/bundle/ios/nickname-ios-test-app.app &
working-directory: /tmp/iphone/
- name: drive
run: bash /tmp/nickname/workflow/iphone/run.sh
# https://github.com/simlay/uikit-sys/blob/master/.github/workflows/rust.yml