77 tags :
88 - ' *'
99 branches :
10- - master
10+ - master
1111 pull_request :
1212 branches :
1313 - master
@@ -25,33 +25,21 @@ jobs:
2525
2626 - name : Display Rust version
2727 run : rustc --version
28- - name : Cache toolchain
29- uses : actions/cache@v3
30- with :
31- path : /usr/share/rust/.cargo
32- key : ${{ runner.os }}-rustup
33- - name : Cache cargo registry
34- uses : actions/cache@v3
35- with :
36- path : ~/.cargo/registry
37- key : ${{ runner.os }}-cargo-registry-${{ hashFiles('**/Cargo.toml') }}
38- - name : Cache cargo index
39- uses : actions/cache@v3
40- with :
41- path : ~/.cargo/git
42- key : ${{ runner.os }}-cargo-index-${{ hashFiles('**/Cargo.toml') }}
43- - name : Cache cargo build
44- uses : actions/cache@v3
45- with :
46- path : target
47- key : ${{ runner.os }}-cargo-build-target-${{ hashFiles('**/Cargo.toml') }}
48-
4928 - name : Install stable toolchain
5029 uses : actions-rs/toolchain@v1
5130 with :
5231 toolchain : stable
53- override : true
32+ default : true
5433 components : rustfmt, clippy
34+ - uses : actions/cache@v3
35+ with :
36+ path : |
37+ ~/.cargo/bin/
38+ ~/.cargo/registry/index/
39+ ~/.cargo/registry/cache/
40+ ~/.cargo/git/db/
41+ target/
42+ key : ${{ runner.os }}-cargo-${{ hashFiles('**/Cargo.lock') }}
5543
5644 - name : Run cargo check
5745 uses : actions-rs/cargo@v1
@@ -69,44 +57,30 @@ jobs:
6957 - name : Maximize disk space
7058 uses : easimon/maximize-build-space@master
7159 with :
72- remove-android : true
73- remove-haskell : true
74- remove-dotnet : true
60+ remove-docker-images : true
7561 - name : Set up JDK 11
7662 uses : actions/setup-java@v1
7763 with :
7864 java-version : 11
7965
8066 - name : Checkout sources
8167 uses : actions/checkout@v2
82-
83- - name : Cache toolchain
84- uses : actions/cache@v3
85- with :
86- path : /usr/share/rust/.cargo
87- key : ${{ runner.os }}-rustup
88- - name : Cache cargo registry
89- uses : actions/cache@v3
90- with :
91- path : ~/.cargo/registry
92- key : ${{ runner.os }}-cargo-registry-${{ hashFiles('**/Cargo.toml') }}
93- - name : Cache cargo index
94- uses : actions/cache@v3
95- with :
96- path : ~/.cargo/git
97- key : ${{ runner.os }}-cargo-index-${{ hashFiles('**/Cargo.toml') }}
98- - name : Cache cargo build
99- uses : actions/cache@v3
100- with :
101- path : target
102- key : ${{ runner.os }}-cargo-build-target-${{ hashFiles('**/Cargo.toml') }}
103-
10468 - name : Install stable toolchain
10569 uses : actions-rs/toolchain@v1
10670 with :
10771 toolchain : stable
108- override : true
72+ default : true
10973 components : rustfmt, clippy
74+ - uses : actions/cache@v3
75+ with :
76+ path : |
77+ ~/.cargo/bin/
78+ ~/.cargo/registry/index/
79+ ~/.cargo/registry/cache/
80+ ~/.cargo/git/db/
81+ target/
82+ key : ${{ runner.os }}-cargo-${{ hashFiles('**/Cargo.lock') }}
83+
11084 - name : Run cargo test
11185 uses : actions-rs/cargo@v1
11286 with :
@@ -125,34 +99,21 @@ jobs:
12599 steps :
126100 - name : Checkout sources
127101 uses : actions/checkout@v2
128-
129- - name : Cache toolchain
130- uses : actions/cache@v3
131- with :
132- path : /usr/share/rust/.cargo
133- key : ${{ runner.os }}-rustup
134- - name : Cache cargo registry
135- uses : actions/cache@v3
136- with :
137- path : ~/.cargo/registry
138- key : ${{ runner.os }}-cargo-registry-${{ hashFiles('**/Cargo.toml') }}
139- - name : Cache cargo index
140- uses : actions/cache@v3
141- with :
142- path : ~/.cargo/git
143- key : ${{ runner.os }}-cargo-index-${{ hashFiles('**/Cargo.toml') }}
144- - name : Cache cargo build
145- uses : actions/cache@v3
146- with :
147- path : target
148- key : ${{ runner.os }}-cargo-build-target-${{ hashFiles('**/Cargo.toml') }}
149-
150102 - name : Install stable toolchain
151103 uses : actions-rs/toolchain@v1
152104 with :
153105 toolchain : stable
154- override : true
106+ default : true
155107 components : rustfmt, clippy
108+ - uses : actions/cache@v3
109+ with :
110+ path : |
111+ ~/.cargo/bin/
112+ ~/.cargo/registry/index/
113+ ~/.cargo/registry/cache/
114+ ~/.cargo/git/db/
115+ target/
116+ key : ${{ runner.os }}-cargo-${{ hashFiles('**/Cargo.lock') }}
156117
157118 - name : Run cargo fmt
158119 uses : actions-rs/cargo@v1
@@ -166,42 +127,23 @@ jobs:
166127 name : Clippy
167128 runs-on : ubuntu-latest
168129 steps :
169- - name : Maximize disk space
170- uses : easimon/maximize-build-space@master
171- with :
172- remove-android : true
173- remove-haskell : true
174- remove-dotnet : true
175130 - name : Checkout sources
176131 uses : actions/checkout@v2
177-
178- - name : Cache toolchain
179- uses : actions/cache@v3
180- with :
181- path : /usr/share/rust/.cargo
182- key : ${{ runner.os }}-rustup
183- - name : Cache cargo registry
184- uses : actions/cache@v3
185- with :
186- path : ~/.cargo/registry
187- key : ${{ runner.os }}-cargo-registry-${{ hashFiles('**/Cargo.toml') }}
188- - name : Cache cargo index
189- uses : actions/cache@v3
190- with :
191- path : ~/.cargo/git
192- key : ${{ runner.os }}-cargo-index-${{ hashFiles('**/Cargo.toml') }}
193- - name : Cache cargo build
194- uses : actions/cache@v3
195- with :
196- path : target
197- key : ${{ runner.os }}-cargo-build-target-${{ hashFiles('**/Cargo.toml') }}
198-
199132 - name : Install stable toolchain
200133 uses : actions-rs/toolchain@v1
201134 with :
202135 toolchain : stable
203- override : true
136+ default : true
204137 components : rustfmt, clippy
138+ - uses : actions/cache@v3
139+ with :
140+ path : |
141+ ~/.cargo/bin/
142+ ~/.cargo/registry/index/
143+ ~/.cargo/registry/cache/
144+ ~/.cargo/git/db/
145+ target/
146+ key : ${{ runner.os }}-cargo-${{ hashFiles('**/Cargo.lock') }}
205147
206148 - name : Run cargo clean
207149 uses : actions-rs/cargo@v1
@@ -220,7 +162,7 @@ jobs:
220162
221163 build-release :
222164 name : build-release
223- needs : ['clippy', ' fmt', 'check', 'test ']
165+ needs : ['fmt', 'check']
224166 runs-on : ${{ matrix.os }}
225167 env :
226168 # For some builds, we use cross to test on 32-bit and big-endian
@@ -280,10 +222,17 @@ jobs:
280222 uses : actions-rs/toolchain@v1
281223 with :
282224 toolchain : ${{ matrix.rust }}
283- override : true
225+ default : true
284226 target : ${{ matrix.target }}
285- components : rustfmt, clippy
286-
227+ - uses : actions/cache@v3
228+ with :
229+ path : |
230+ ~/.cargo/bin/
231+ ~/.cargo/registry/index/
232+ ~/.cargo/registry/cache/
233+ ~/.cargo/git/db/
234+ target/
235+ key : cross-${{ matrix.build }}-cargo-${{ hashFiles('**/Cargo.lock') }}
287236 - name : Use Cross
288237 shell : bash
289238# // Changed cargo version from latest to 0.2.4 for more information please refer https://github.com/cross-rs/cross/issues/1214
0 commit comments