Skip to content

ci: Experimental CI tests on Apple Platforms #4

ci: Experimental CI tests on Apple Platforms

ci: Experimental CI tests on Apple Platforms #4

Workflow file for this run

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