-
Notifications
You must be signed in to change notification settings - Fork 1
57 lines (55 loc) · 1.72 KB
/
ci.yml
File metadata and controls
57 lines (55 loc) · 1.72 KB
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
name: CI
on: [push, pull_request]
jobs:
test-ios:
name: Tests (iOS)
runs-on: macos-latest
continue-on-error: ${{ matrix.toolchain == 'nightly' }}
strategy:
fail-fast: false
matrix:
toolchain: [stable, beta, nightly]
steps:
- name: Checkout sources
uses: actions/checkout@v2
- name: Create simulator
run: xcrun simctl create rust-test 'iPhone X'
- name: Install toolchain
uses: actions-rs/toolchain@v1
with:
profile: minimal
toolchain: ${{ matrix.toolchain }}
target: x86_64-apple-ios
override: true
- name: Build cargo test
id: build
run: |
cargo test --target x86_64-apple-ios --no-run
test_exe=`cargo test --target x86_64-apple-ios --no-run --message-format=json | jq 'select (.executable != null) .executable'`
echo "::set-output name=TEST_EXE::$test_exe"
- name: Boot simulator
run: xcrun simctl boot rust-test
- name: Run test in simulator
run: xcrun simctl spawn rust-test ${{ steps.build.outputs.TEST_EXE }}
test:
name: Test Suite
runs-on: ${{ matrix.os }}
continue-on-error: ${{ matrix.toolchain == 'nightly' }}
strategy:
fail-fast: false
matrix:
os: [ubuntu-latest, macos-latest, windows-latest]
toolchain: [stable, beta, nightly]
steps:
- name: Checkout sources
uses: actions/checkout@v2
- name: Install toolchain
uses: actions-rs/toolchain@v1
with:
profile: minimal
toolchain: ${{ matrix.toolchain }}
override: true
- name: Run cargo test
uses: actions-rs/cargo@v1
with:
command: test