-
Notifications
You must be signed in to change notification settings - Fork 7
88 lines (81 loc) · 2.63 KB
/
ci.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
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
name: CI
on:
pull_request:
push:
branches:
- main
env:
RUST_BACKTRACE: 1
jobs:
test:
name: Test Rust ${{ matrix.rust }} on ${{ matrix.os }}
runs-on: ${{ matrix.os }}
strategy:
fail-fast: false
matrix:
include:
- { rust: 1.60.0, os: ubuntu-latest }
- { rust: stable, os: ubuntu-latest }
- { rust: stable, os: macos-latest }
- { rust: stable, os: windows-latest }
- { rust: stable-i686-msvc, os: windows-latest }
- { rust: beta, os: ubuntu-latest }
- { rust: nightly, os: ubuntu-latest }
steps:
- uses: actions/checkout@v3
- uses: hecrj/setup-rust-action@v2
with:
rust-version: ${{ matrix.rust }}
- run: cargo test --verbose --workspace --all-features
- run: cargo test --verbose --workspace --no-default-features
- run: cargo test --verbose --workspace --all-features
env:
RUSTFLAGS: "--cfg force_disable_atomic64"
RUSTDOCFLAGS: "--cfg force_disable_atomic64"
cross-test:
name: Test on ${{ matrix.target }} (using cross)
runs-on: ubuntu-latest
strategy:
fail-fast: false
matrix:
target:
- i686-unknown-linux-gnu
- armv7-linux-androideabi
- aarch64-unknown-linux-gnu
- powerpc-unknown-linux-gnu
- powerpc64-unknown-linux-gnu
steps:
- uses: actions/checkout@v3
- uses: hecrj/setup-rust-action@v2
- run: cargo install cross
- run: cross test --verbose --target=${{ matrix.target }} --no-default-features
- run: cross test --verbose --target=${{ matrix.target }} --all-features
check:
name: Check warnings
runs-on: ubuntu-latest
env:
RUSTFLAGS: -Dwarnings
steps:
- uses: actions/checkout@v3
- uses: hecrj/setup-rust-action@v2
- run: cargo check --workspace --all-targets --verbose
- run: cargo check --workspace --all-targets --verbose --no-default-features
rustfmt:
name: Verify code formatting
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v3
- uses: hecrj/setup-rust-action@v2
with:
components: rustfmt
- run: cargo fmt --all -- --check
codecov-tarpaulin:
name: coverage
runs-on: ubuntu-latest
container:
image: xd009642/tarpaulin:develop-nightly
options: --security-opt seccomp=unconfined
steps:
- uses: actions/checkout@v3
- run: cargo tarpaulin --verbose --doc --all-features --all-targets --engine llvm --out xml
- uses: codecov/codecov-action@v3