-
Notifications
You must be signed in to change notification settings - Fork 44
72 lines (69 loc) · 2.21 KB
/
test.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
name: Test
on:
push:
branches: master
pull_request:
schedule:
- cron: '21 3 ? * 6'
jobs:
check:
runs-on: ubuntu-latest
strategy:
matrix:
rust:
- stable
- 1.59.0
- beta
- nightly
steps:
- uses: actions/checkout@v2
- if: matrix.rust == 'stable'
uses: actions-rs/toolchain@v1
with:
profile: minimal
toolchain: ${{ matrix.rust }}
# Only install the components on stable (might not be available on nightly).
components: rustfmt, clippy
- if: matrix.rust != 'stable'
uses: actions-rs/toolchain@v1
with:
profile: minimal
toolchain: ${{ matrix.rust }}
# Just check compilations on platforms other than stable.
# Note that we have to explicitly exclude stable, because `cargo clippy`
# after `cargo check` does not work properly: https://github.com/rust-lang/rust-clippy/issues/4612
- if: matrix.rust == 'stable'
run: |
cargo check --all --manifest-path ./Cargo.toml
# Only run the stable versions of Clippy and rustfmt.
- if: matrix.rust == 'stable'
run: |
(cd . && cargo fmt --all -- --check)
(cd ./testdata/simple && cargo fmt --all -- --check)
(cd ./testdata/workspace && cargo fmt --all -- --check)
cargo clippy --all --manifest-path ./Cargo.toml -- --deny warnings
cargo clippy --all --manifest-path ./testdata/simple/Cargo.toml -- --deny warnings
cargo clippy --all --manifest-path ./testdata/workspace/Cargo.toml -- --deny warnings
test:
needs: check
runs-on: macos-latest
strategy:
max-parallel: 1
matrix:
# Only run integration tests on stable and MSRV.
rust:
- stable
- 1.59.0
steps:
- uses: actions/checkout@v2
- uses: actions-rs/toolchain@v1
with:
profile: minimal
toolchain: ${{ matrix.rust }}
- run: |
brew install bats-core
rustup target add aarch64-apple-ios x86_64-apple-ios
cargo build
export PATH="$PWD/target/debug:$PATH"
cargo lipo --version
./integration.bats.sh