-
Notifications
You must be signed in to change notification settings - Fork 999
44 lines (35 loc) · 1.17 KB
/
apple.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
name: Apple platform
on:
pull_request:
push:
branches:
- master
concurrency:
group: ${{ github.workflow }}-${{ github.ref }}
cancel-in-progress: true
jobs:
test-ios:
name: Test iOS
runs-on: macos-latest
steps:
- uses: actions/checkout@v4
with:
fetch-depth: 0
- uses: dtolnay/rust-toolchain@stable
with:
targets: aarch64-apple-ios-sim
- name: Install cargo dinghy
uses: taiki-e/cache-cargo-install-action@v2
with:
tool: cargo-dinghy
- name: Start simulator
id: boot-simulator
run: |
RUNTIME_ID=$(xcrun simctl list runtimes | grep iOS | cut -d ' ' -f 7 | tail -1)
export SIM_ID=$(xcrun simctl create My-iphone-se com.apple.CoreSimulator.SimDeviceType.iPhone-SE-3rd-generation $RUNTIME_ID)
xcrun simctl boot $SIM_ID
echo "sim-id=$SIM_ID" >> $GITHUB_OUTPUT
- name: Run test
env:
SIM_ID: ${{ steps.boot-simulator.outputs.sim-id }}
run: cargo dinghy -p auto-ios-aarch64-sim -d $SIM_ID test -p libp2p-core --all-features