15
15
- stable
16
16
- beta
17
17
- nightly
18
- - ' 1.41 .0'
18
+ - ' 1.46 .0'
19
19
features :
20
20
-
21
21
- derive
@@ -29,31 +29,16 @@ jobs:
29
29
profile : minimal
30
30
override : true
31
31
id : toolchain
32
- - name : Cache Cargo registry
33
- uses : actions/cache@v2
34
- with :
35
- path : ~/.cargo/registry
36
- key : cargo-registry-test-${{ runner.os }}-${{ matrix.features }}-${{ hashFiles('Cargo.*') }}
37
- restore-keys : |
38
- cargo-registry-test-${{ runner.os }}-${{ matrix.features }}-
39
- cargo-registry-test-${{ runner.os }}-
40
- - name : Cache Cargo build
41
- uses : actions/cache@v2
42
- with :
43
- path : target
44
- key : cargo-target-test-${{ runner.os }}-${{ steps.toolchain.outputs.rustc_hash }}-${{ matrix.features }}-${{ hashFiles('**/Cargo.*') }}
45
- restore-keys : |
46
- cargo-target-test-${{ runner.os }}-${{ steps.toolchain.outputs.rustc_hash }}-${{ matrix.features }}-
47
- cargo-target-test-${{ runner.os }}-${{ steps.toolchain.outputs.rustc_hash }}-
32
+ - uses : Swatinem/rust-cache@v1
48
33
- run : echo 'RUSTFLAGS=--allow unknown_lints' >> $GITHUB_ENV
49
- if : matrix.toolchain == '1.41 .0'
34
+ if : matrix.toolchain == '1.46 .0'
50
35
- name : Build `oauth1-request`
51
36
uses : actions-rs/cargo@v1
52
37
with :
53
38
command : build
54
39
args : --verbose --tests --manifest-path oauth1-request/Cargo.toml --features=${{ matrix.features }}
55
40
- name : Build `examples`
56
- if : ${{ matrix.toolchain != '1.41 .0' }}
41
+ if : ${{ matrix.toolchain != '1.46 .0' }}
57
42
uses : actions-rs/cargo@v1
58
43
with :
59
44
command : build
82
67
profile : minimal
83
68
override : true
84
69
id : toolchain
85
- - name : Cache Cargo registry
86
- uses : actions/cache@v2
87
- with :
88
- path : ~/.cargo/registry
89
- key : cargo-registry-derive-test-${{ runner.os }}-${{ matrix.features }}-${{ hashFiles('Cargo.*') }}
90
- restore-keys : |
91
- cargo-registry-derive-test-${{ runner.os }}-${{ matrix.features }}-
92
- cargo-registry-derive-test-${{ runner.os }}-
93
- - name : Cache Cargo build
94
- uses : actions/cache@v2
95
- with :
96
- path : target
97
- key : cargo-target-derive-test-${{ runner.os }}-${{ steps.toolchain.outputs.rustc_hash }}-${{ matrix.features }}-${{ hashFiles('**/Cargo.*') }}
98
- restore-keys : |
99
- cargo-target-derive-test-${{ runner.os }}-${{ steps.toolchain.outputs.rustc_hash }}-${{ matrix.features }}-
100
- cargo-target-derive-test-${{ runner.os }}-${{ steps.toolchain.outputs.rustc_hash }}-
70
+ - uses : Swatinem/rust-cache@v1
101
71
- name : Build `oauth1-request-derive`
102
72
uses : actions-rs/cargo@v1
103
73
with :
@@ -148,25 +118,22 @@ jobs:
148
118
profile : minimal
149
119
override : true
150
120
id : toolchain
151
- - name : Cache Cargo registry
152
- uses : actions/cache@v2
153
- with :
154
- path : ~/.cargo/registry
155
- key : cargo-registry-credentials-msrv-${{ steps.toolchain.outputs.rustc_hash }}-${{ matrix.features }}-${{ hashFiles('Cargo.*') }}
156
- restore-keys : |
157
- cargo-registry-credentials-msrv-${{ steps.toolchain.outputs.rustc_hash }}-${{ matrix.features }}-
158
- cargo-registry-credentials-msrv-${{ steps.toolchain.outputs.rustc_hash }}-
159
- - name : Cache Cargo build
160
- uses : actions/cache@v2
121
+ - uses : Swatinem/rust-cache@v1
122
+ - uses : actions/checkout@v2
161
123
with :
162
- path : target
163
- key : cargo-target-credentials-${{ runner.os }}-${{ steps.toolchain.outputs.rustc_hash }}-${{ matrix.features }}-${{ hashFiles('**/Cargo.*') }}
164
- restore-keys : |
165
- cargo-target-credentials-${{ runner.os }}-${{ steps.toolchain.outputs.rustc_hash }}-${{ matrix.features }}-${{ hashFiles('**/Cargo.*') }}
166
- cargo-target-credentials-${{ runner.os }}-${{ steps.toolchain.outputs.rustc_hash }}-${{ matrix.features }}-
167
- cargo-target-credentials-${{ runner.os }}-${{ steps.toolchain.outputs.rustc_hash }}-
168
- # Remove the virtual manifest because Rust 1.13.0 run fails when built as a workspace member.
169
- - run : rm Cargo.toml
124
+ repository : rust-lang/crates.io-index
125
+ ref : 46a429eac9f70fd7281922780d7dd42e2fb7ab77
126
+ path : crates.io-index
127
+ - name : Workaround compatibility issues of Cargo
128
+ run : |
129
+ # Remove the virtual manifest because Rust 1.13.0 run fails when built as a workspace member.
130
+ rm Cargo.toml
131
+ # Reference: <https://github.com/mcgoo/vcpkg-rs/blob/f75707b/.github/workflows/rust-1.12.yml>
132
+ mkdir -p oauth-credentials/.cargo
133
+ cat <<EOF >> oauth-credentials/.cargo/config
134
+ [source.crates-io]
135
+ registry = "file://$GITHUB_WORKSPACE/crates.io-index"
136
+ EOF
170
137
- name : Build `oauth-credentials`
171
138
uses : actions-rs/cargo@v1
172
139
with :
@@ -196,23 +163,7 @@ jobs:
196
163
profile : minimal
197
164
override : true
198
165
id : toolchain
199
- - name : Cache Cargo registry
200
- uses : actions/cache@v2
201
- with :
202
- path : ~/.cargo/registry
203
- key : cargo-registry-credentials-test-${{ runner.os }}-${{ matrix.features }}-${{ hashFiles('Cargo.*') }}
204
- restore-keys : |
205
- cargo-registry-credentials-test-${{ runner.os }}-${{ matrix.features }}-
206
- cargo-registry-credentials-test-${{ runner.os }}-
207
- - name : Cache Cargo build
208
- uses : actions/cache@v2
209
- with :
210
- path : target
211
- key : cargo-target-credentials-${{ runner.os }}-${{ steps.toolchain.outputs.rustc_hash }}-${{ matrix.features }}-${{ hashFiles('**/Cargo.*') }}
212
- restore-keys : |
213
- cargo-target-credentials-${{ runner.os }}-${{ steps.toolchain.outputs.rustc_hash }}-${{ matrix.features }}-${{ hashFiles('**/Cargo.*') }}
214
- cargo-target-credentials-${{ runner.os }}-${{ steps.toolchain.outputs.rustc_hash }}-${{ matrix.features }}-
215
- cargo-target-credentials-${{ runner.os }}-${{ steps.toolchain.outputs.rustc_hash }}-
166
+ - uses : Swatinem/rust-cache@v1
216
167
- name : Build `oauth-credentials`
217
168
uses : actions-rs/cargo@v1
218
169
with :
@@ -234,20 +185,7 @@ jobs:
234
185
toolchain : stable
235
186
profile : minimal
236
187
id : toolchain
237
- - name : Cache Cargo registry
238
- uses : actions/cache@v2
239
- with :
240
- path : ~/.cargo/registry
241
- key : cargo-registry-min-deps-${{ runner.os }}-${{ hashFiles('Cargo.*') }}
242
- restore-keys : |
243
- cargo-registry-min-deps-${{ runner.os }}-
244
- - name : Cache Cargo build
245
- uses : actions/cache@v2
246
- with :
247
- path : target
248
- key : cargo-target-min-deps-${{ runner.os }}-${{ steps.toolchain.outputs.rustc_hash }}-${{ hashFiles('**/Cargo.*') }}
249
- restore-keys : |
250
- cargo-target-min-deps-${{ runner.os }}-${{ steps.toolchain.outputs.rustc_hash }}-
188
+ - uses : Swatinem/rust-cache@v1
251
189
- name : Cargo update
252
190
uses : actions-rs/cargo@v1
253
191
with :
0 commit comments