ci: Experimental CI tests on Apple Platforms #4
Workflow file for this run
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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 | |