11
11
os :
12
12
- ubuntu-latest
13
13
- macOS-latest
14
- rust :
14
+ toolchain :
15
15
- " 1.62.0" # Current MSRV
16
16
- stable
17
17
- beta
@@ -25,11 +25,12 @@ jobs:
25
25
env :
26
26
RUST_BACKTRACE : 1
27
27
steps :
28
- - uses : actions/checkout@v1
29
- - uses : actions-rs/ toolchain@v1
28
+ - uses : actions/checkout@v3
29
+ - uses : dtolnay/rust- toolchain@master
30
30
with :
31
- toolchain : ${{ matrix.rust }}
32
- override : true
31
+ toolchain : ${{ matrix.toolchain }}
32
+ - uses : Swatinem/rust-cache@v2
33
+
33
34
- name : Build
34
35
run : cargo build --all --verbose
35
36
env :
@@ -40,38 +41,29 @@ jobs:
40
41
env :
41
42
TARGET : ${{ matrix.target }}
42
43
continue-on-error : ${{ matrix.allow_failure }}
43
- fmt :
44
+ formatting :
44
45
runs-on : ubuntu-latest
45
46
steps :
46
- - uses : actions/checkout@v1
47
- - uses : actions-rs/ toolchain@v1
47
+ - uses : actions/checkout@v2
48
+ - uses : dtolnay/rust- toolchain@master
48
49
with :
49
50
toolchain : stable
50
- components : rustfmt
51
- override : true
51
+ - uses : Swatinem/rust-cache@v2
52
+
52
53
- name : Run fmt check
53
54
run : cargo fmt --all -- --check
54
- clippy :
55
- runs-on : ubuntu-latest
56
- steps :
57
- - uses : actions/checkout@v1
58
- - uses : actions-rs/toolchain@v1
59
- with :
60
- toolchain : stable
61
- components : clippy
62
- override : true
63
55
- name : Run clippy check
64
- run : cargo clippy
56
+ run : cargo clippy --all-features -- -D warnings
65
57
66
58
check-examples :
67
59
runs-on : ubuntu-latest
68
60
steps :
69
- - uses : actions/checkout@v1
70
- - uses : actions-rs/ toolchain@v1
61
+ - uses : actions/checkout@v3
62
+ - uses : dtolnay/rust- toolchain@master
71
63
with :
72
64
toolchain : stable
73
- components : clippy
74
- override : true
65
+ - uses : Swatinem/rust-cache@v2
66
+
75
67
- name : Check examples
76
68
working-directory : examples
77
69
shell : bash
84
76
runs-on : ubuntu-latest
85
77
needs : [build]
86
78
steps :
87
- - name : Set up Rust
88
- uses : hecrj/setup-rust-action@v1
89
- - uses : actions/checkout@v2
79
+ - uses : actions/checkout@v3
80
+ - uses : dtolnay/rust-toolchain@master
81
+ with :
82
+ toolchain : stable
83
+ - uses : Swatinem/rust-cache@v2
84
+
90
85
- name : Generate Docs
91
86
run : |
92
87
cargo doc --no-deps
0 commit comments