66 - master
77 - staging
88 - trying
9+ - bors/staging
10+ - bors/trying
911
1012env :
1113 CARGO_TERM_COLOR : always
1719 runs-on : ubuntu-20.04
1820 steps :
1921 - name : Checkout
20- uses : actions/checkout@v1
22+ uses : actions/checkout@v2
2123
2224 - name : Install Rust
2325 uses : actions-rs/toolchain@v1
2729 override : true
2830 components : rustfmt
2931
32+ - name : Fail on warnings
33+ run : sed -i 's,//deny_warnings_placeholder_for_ci,#![deny(warnings)],' src/lib.rs
34+
3035 - name : cargo fmt --check
3136 uses : actions-rs/cargo@v1
3237 with :
4752 - name : Checkout
4853 uses : actions/checkout@v2
4954
50- - name : Cache cargo dependencies
51- uses : actions/cache@v2
52- with :
53- path : |
54- - ~/.cargo/bin/
55- - ~/.cargo/registry/index/
56- - ~/.cargo/registry/cache/
57- - ~/.cargo/git/db/
58- key : ${{ runner.OS }}-cargo-${{ hashFiles('**/Cargo.lock') }}
59- restore-keys : |
60- ${{ runner.OS }}-cargo-${{ hashFiles('**/Cargo.lock') }}
61- ${{ runner.OS }}-cargo-
62-
63- - name : Cache build output dependencies
64- uses : actions/cache@v2
65- with :
66- path : target
67- key : ${{ runner.OS }}-build-${{ hashFiles('**/Cargo.lock') }}
68- restore-keys : |
69- ${{ runner.OS }}-build-${{ hashFiles('**/Cargo.lock') }}
70- ${{ runner.OS }}-build-
71-
7255 - name : Install Rust ${{ matrix.toolchain }} with target (${{ matrix.target }})
7356 uses : actions-rs/toolchain@v1
7457 with :
@@ -79,13 +62,43 @@ jobs:
7962 - name : Fail on warnings
8063 run : sed -i 's,//deny_warnings_placeholder_for_ci,#![deny(warnings)],' src/lib.rs
8164
65+ - name : Cache Dependencies
66+ uses : Swatinem/rust-cache@v1
67+
8268 - name : cargo check
8369 uses : actions-rs/cargo@v1
8470 with :
8571 use-cross : false
8672 command : check
8773 args : --target=${{ matrix.target }}
8874
75+ # Clippy
76+ clippy :
77+ name : Cargo clippy
78+ runs-on : ubuntu-20.04
79+ steps :
80+ - name : Checkout
81+ uses : actions/checkout@v2
82+
83+ - name : Install Rust stable
84+ uses : actions-rs/toolchain@v1
85+ with :
86+ toolchain : stable
87+ target : x86_64-unknown-linux-gnu
88+ override : true
89+
90+ - name : Fail on warnings
91+ run : sed -i 's,//deny_warnings_placeholder_for_ci,#![deny(warnings)],' src/lib.rs
92+
93+ - name : Cache Dependencies
94+ uses : Swatinem/rust-cache@v1
95+
96+ - name : cargo clippy
97+ uses : actions-rs/cargo@v1
98+ with :
99+ use-cross : false
100+ command : clippy
101+
89102 # Verify all examples
90103 testexamples :
91104 name : testexamples
@@ -100,35 +113,16 @@ jobs:
100113 - name : Checkout
101114 uses : actions/checkout@v2
102115
103- - name : Cache cargo dependencies
104- uses : actions/cache@v2
105- with :
106- path : |
107- - ~/.cargo/bin/
108- - ~/.cargo/registry/index/
109- - ~/.cargo/registry/cache/
110- - ~/.cargo/git/db/
111- key : ${{ runner.OS }}-cargo-${{ hashFiles('**/Cargo.lock') }}
112- restore-keys : |
113- ${{ runner.OS }}-cargo-${{ hashFiles('**/Cargo.lock') }}
114- ${{ runner.OS }}-cargo-
115-
116- - name : Cache build output dependencies
117- uses : actions/cache@v2
118- with :
119- path : target
120- key : ${{ runner.OS }}-build-${{ hashFiles('**/Cargo.lock') }}
121- restore-keys : |
122- ${{ runner.OS }}-build-${{ hashFiles('**/Cargo.lock') }}
123- ${{ runner.OS }}-build-
124-
125116 - name : Install Rust ${{ matrix.toolchain }} with target (${{ matrix.target }})
126117 uses : actions-rs/toolchain@v1
127118 with :
128119 toolchain : ${{ matrix.toolchain }}
129120 target : ${{ matrix.target }}
130121 override : true
131122
123+ - name : Cache Dependencies
124+ uses : Swatinem/rust-cache@v1
125+
132126 - name : Fail on warnings
133127 run : sed -i 's,//deny_warnings_placeholder_for_ci,#![deny(warnings)],' src/lib.rs
134128
@@ -138,7 +132,6 @@ jobs:
138132 command : test
139133 args : --examples
140134
141-
142135 # Run test suite for UI
143136 testui :
144137 name : testui
@@ -153,33 +146,20 @@ jobs:
153146 - name : Checkout
154147 uses : actions/checkout@v2
155148
156- - name : Cache cargo dependencies
157- uses : actions/cache@v2
158- with :
159- path : |
160- - ~/.cargo/bin/
161- - ~/.cargo/registry/index/
162- - ~/.cargo/registry/cache/
163- - ~/.cargo/git/db/
164- key : ${{ runner.OS }}-cargo-${{ hashFiles('**/Cargo.lock') }}
165- restore-keys : |
166- ${{ runner.OS }}-cargo-
167-
168- - name : Cache build output dependencies
169- uses : actions/cache@v2
170- with :
171- path : target
172- key : ${{ runner.OS }}-build-${{ hashFiles('**/Cargo.lock') }}
173- restore-keys : |
174- ${{ runner.OS }}-build-
175-
176149 - name : Install Rust ${{ matrix.toolchain }} with target (${{ matrix.target }})
177150 uses : actions-rs/toolchain@v1
178151 with :
179152 toolchain : ${{ matrix.toolchain }}
180153 target : ${{ matrix.target }}
181154 override : true
182155
156+ - name : Cache Dependencies
157+ uses : Swatinem/rust-cache@v1
158+
159+ - name : Fail on warnings
160+ run : sed -i 's,//deny_warnings_placeholder_for_ci,#![deny(warnings)],' src/lib.rs
161+
162+
183163 - uses : actions-rs/cargo@v1
184164 with :
185165 use-cross : false
@@ -194,33 +174,19 @@ jobs:
194174 - name : Checkout
195175 uses : actions/checkout@v2
196176
197- - name : Cache cargo dependencies
198- uses : actions/cache@v2
199- with :
200- path : |
201- - ~/.cargo/bin/
202- - ~/.cargo/registry/index/
203- - ~/.cargo/registry/cache/
204- - ~/.cargo/git/db/
205- key : ${{ runner.OS }}-cargo-${{ hashFiles('**/Cargo.lock') }}
206- restore-keys : |
207- ${{ runner.OS }}-cargo-
208-
209- - name : Cache build output dependencies
210- uses : actions/cache@v2
211- with :
212- path : target
213- key : ${{ runner.OS }}-build-${{ hashFiles('**/Cargo.lock') }}
214- restore-keys : |
215- ${{ runner.OS }}-build-
216-
217177 - name : Install Rust
218178 uses : actions-rs/toolchain@v1
219179 with :
220180 toolchain : stable
221181 target : thumbv7m-none-eabi
222182 override : true
223183
184+ - name : Cache Dependencies
185+ uses : Swatinem/rust-cache@v1
186+
187+ - name : Fail on warnings
188+ run : sed -i 's,//deny_warnings_placeholder_for_ci,#![deny(warnings)],' src/lib.rs
189+
224190 - uses : actions-rs/cargo@v1
225191 with :
226192 use-cross : false
@@ -237,6 +203,7 @@ jobs:
237203 needs :
238204 - style
239205 - check
206+ - clippy
240207 - testexamples
241208 - test
242209 - testui
0 commit comments