-
Notifications
You must be signed in to change notification settings - Fork 230
118 lines (118 loc) · 4.08 KB
/
main.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
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
name: CI
on:
push:
branches: [ master, "v0.4.x" ]
pull_request:
branches: [ master, "v0.4.x" ]
env:
CARGO_TERM_COLOR: always
RUST_BACKTRACE: full
jobs:
Test:
name: Test
runs-on: ${{ matrix.os }}
strategy:
fail-fast: false
matrix:
build: [stable, 1.63.0, beta, nightly, macos, windows]
include:
- build: stable
os: ubuntu-latest
rust: stable
- build: 1.63.0
os: ubuntu-latest
rust: 1.63.0
- build: beta
os: ubuntu-latest
rust: beta
- build: nightly
os: ubuntu-latest
rust: nightly
- build: macos
os: macos-latest
rust: stable
- build: windows
os: windows-latest
rust: stable
steps:
- uses: actions/checkout@v3
- uses: dtolnay/rust-toolchain@master
with:
toolchain: ${{ matrix.rust }}
- uses: taiki-e/install-action@cargo-hack
- name: Run tests
run: cargo hack test --feature-powerset && cargo hack test --feature-powerset --release
Rustfmt:
name: Rustfmt
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v3
- uses: dtolnay/rust-toolchain@stable
- name: Check formatting
run: cargo fmt --all -- --check
Check:
name: Check
runs-on: ubuntu-latest
strategy:
fail-fast: false
matrix:
target: ["aarch64-apple-ios", "aarch64-linux-android", "x86_64-apple-darwin", "x86_64-unknown-fuchsia", "x86_64-pc-windows-msvc", "x86_64-pc-solaris", "x86_64-unknown-freebsd", "x86_64-unknown-illumos", "x86_64-unknown-linux-gnu", "x86_64-unknown-linux-musl", "x86_64-unknown-netbsd", "x86_64-unknown-redox", "armv7-linux-androideabi", "i686-linux-android"]
steps:
- uses: actions/checkout@v3
- uses: dtolnay/rust-toolchain@stable
with:
targets: ${{ matrix.target }}
- uses: taiki-e/install-action@cargo-hack
- name: Run check
run: cargo hack check --feature-powerset --all-targets --examples --bins --tests --target ${{ matrix.target }}
CheckTier3:
name: Check
runs-on: ubuntu-latest
strategy:
fail-fast: false
matrix:
target: ["armv7-sony-vita-newlibeabihf"]
steps:
- uses: actions/checkout@v3
- uses: dtolnay/rust-toolchain@nightly
with:
targets: ${{ matrix.target }}
- uses: taiki-e/install-action@cargo-hack
- name: Run check
run: cargo hack check -Z build-std=std,panic_abort --feature-powerset --all-targets --examples --bins --tests --target ${{ matrix.target }}
Clippy:
name: Clippy
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v3
- uses: dtolnay/rust-toolchain@stable
- name: Run Clippy
run: cargo clippy --all-targets --all-features -- -D warnings
Docs:
name: Docs
runs-on: ubuntu-latest
strategy:
fail-fast: false
matrix:
target: ["aarch64-apple-ios", "aarch64-linux-android", "x86_64-apple-darwin", "x86_64-unknown-fuchsia", "x86_64-pc-windows-msvc", "x86_64-pc-solaris", "x86_64-unknown-freebsd", "x86_64-unknown-illumos", "x86_64-unknown-linux-gnu", "x86_64-unknown-linux-musl", "x86_64-unknown-netbsd", "x86_64-unknown-redox", "armv7-linux-androideabi", "i686-linux-android"]
steps:
- uses: actions/checkout@v3
- uses: dtolnay/rust-toolchain@nightly # NOTE: need nightly for `doc_cfg` feature.
with:
targets: ${{ matrix.target }}
- name: Check docs for docs.rs
run: RUSTDOCFLAGS="-D warnings --cfg docsrs" cargo doc --no-deps --all-features --target ${{ matrix.target }}
DocsTier3:
name: Docs
runs-on: ubuntu-latest
strategy:
fail-fast: false
matrix:
target: ["armv7-sony-vita-newlibeabihf"]
steps:
- uses: actions/checkout@v3
- uses: dtolnay/rust-toolchain@nightly # NOTE: need nightly for `doc_cfg` feature.
with:
targets: ${{ matrix.target }}
- name: Check docs for docs.rs
run: RUSTDOCFLAGS="-D warnings --cfg docsrs" cargo doc -Z build-std=std,panic_abort --no-deps --all-features --target ${{ matrix.target }}