-
Notifications
You must be signed in to change notification settings - Fork 45
96 lines (90 loc) · 2.4 KB
/
check.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
on:
push:
branches:
- main
pull_request:
branches:
- main
name: CI
jobs:
all-succeeded:
name: All Succeeded
if: always()
runs-on: ubuntu-latest
needs:
- test-linux
- test-non-linux
- lint
steps:
- name: Check if all jubs succeeded
uses: re-actors/alls-green@release/v1
with:
jobs: ${{ toJSON(needs) }}
test-linux:
name: Test Linux
runs-on: ubuntu-latest
strategy:
fail-fast: false
matrix:
rust:
- stable
- beta
- nightly
mb_const_generics:
- ""
- "--features const-generics"
target:
- x86_64
- i686
- sparc64
include:
- mb_const_generics: ""
rust: 1.37.0
target: x86_64
steps:
- uses: actions/checkout@v3
- uses: dtolnay/rust-toolchain@master
with:
toolchain: ${{ matrix.rust }}
- uses: actions-rs/cargo@v1
with:
use-cross: ${{ matrix.target != 'x86_64' }}
command: test
args: --verbose --features "strict" ${{ matrix.mb_const_generics }} --target ${{ matrix.target }}-unknown-linux-gnu
- uses: actions-rs/cargo@v1
with:
use-cross: ${{ matrix.target != 'x86_64' }}
command: doc
args: --features "strict" ${{ matrix.mb_const_generics }} --target ${{ matrix.target }}-unknown-linux-gnu
test-non-linux:
name: Test non-Linux
runs-on: ${{ matrix.os }}
strategy:
matrix:
os:
- macos-latest
- windows-latest
rust:
- stable
mb_const_generics:
- ""
- "--features const-generics"
steps:
- uses: actions/checkout@v3
- uses: dtolnay/rust-toolchain@master
with:
toolchain: ${{ matrix.rust }}
- run: cargo test --verbose --features "strict" ${{ matrix.mb_const_generics }}
- run: cargo doc --features "strict" ${{ matrix.mb_const_generics }}
lint:
name: Lint
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v3
- uses: dtolnay/rust-toolchain@nightly
with:
components: rustfmt, clippy
- run: cargo fmt --all -- --check
- run: cargo clippy -- -D warnings
# Allow deprecated because we test the no_std feature.
- run: cargo clippy --all-features -- -D warnings -A deprecated