@@ -19,13 +19,13 @@ jobs:
19
19
steps :
20
20
- uses : actions/checkout@v3
21
21
- uses : dtolnay/rust-toolchain@nightly # Needed for -Z minimal-versions and doc_cfg
22
- - uses : Swatinem/rust-cache@v1
23
22
- name : Install precompiled cargo-deadlinks
24
23
run : |
25
24
export URL=$(curl -s https://api.github.com/repos/deadlinks/cargo-deadlinks/releases/latest | jq -r '.assets[] | select(.name | contains("cargo-deadlinks-linux")) | .browser_download_url')
26
25
wget -O /tmp/cargo-deadlinks $URL
27
26
chmod +x /tmp/cargo-deadlinks
28
27
mv /tmp/cargo-deadlinks ~/.cargo/bin
28
+ - uses : Swatinem/rust-cache@v2
29
29
- name : Generate Docs
30
30
env :
31
31
RUSTDOCFLAGS : --cfg docsrs
51
51
- uses : dtolnay/rust-toolchain@master
52
52
with :
53
53
toolchain : ${{ matrix.toolchain }}
54
- - uses : Swatinem/rust-cache@v1
54
+ - uses : Swatinem/rust-cache@v2
55
55
- run : cargo test
56
56
- run : cargo test --features=std
57
57
- run : cargo test --features=custom # custom should do nothing here
@@ -73,13 +73,13 @@ jobs:
73
73
- uses : dtolnay/rust-toolchain@stable
74
74
with :
75
75
targets : ${{ matrix.target }}
76
- - uses : Swatinem/rust-cache@v1
77
76
- name : Install multilib
78
77
# update is needed to fix the 404 error on install, see:
79
78
# https://github.com/actions/virtual-environments/issues/675
80
79
run : |
81
80
sudo apt-get update
82
81
sudo apt-get install gcc-multilib
82
+ - uses : Swatinem/rust-cache@v2
83
83
- run : cargo test --target=${{ matrix.target }} --features=std
84
84
85
85
ios-tests :
90
90
- uses : dtolnay/rust-toolchain@stable
91
91
with :
92
92
targets : x86_64-apple-ios
93
- - uses : Swatinem/rust-cache@v1
94
93
- name : Download cargo-dinghy
95
94
run : |
96
95
VERSION=0.6.2
@@ -103,6 +102,7 @@ jobs:
103
102
SIM_ID=$(xcrun simctl create My-iphone7 com.apple.CoreSimulator.SimDeviceType.iPhone-7 $RUNTIME_ID)
104
103
xcrun simctl boot $SIM_ID
105
104
echo "device=$SIM_ID" >> $GITHUB_ENV
105
+ - uses : Swatinem/rust-cache@v2
106
106
- name : Run tests
107
107
run : cargo dinghy -d ${{ env.device }} test
108
108
@@ -121,7 +121,7 @@ jobs:
121
121
- uses : dtolnay/rust-toolchain@master
122
122
with :
123
123
toolchain : ${{ matrix.toolchain }}
124
- - uses : Swatinem/rust-cache@v1
124
+ - uses : Swatinem/rust-cache@v2
125
125
- run : cargo test --features=std
126
126
127
127
cross-tests :
@@ -137,13 +137,13 @@ jobs:
137
137
]
138
138
steps :
139
139
- uses : actions/checkout@v3
140
- - uses : Swatinem/rust-cache@v1
141
140
- name : Install precompiled cross
142
141
run : |
143
142
export URL=$(curl -s https://api.github.com/repos/cross-rs/cross/releases/latest | jq -r '.assets[] | select(.name | contains("x86_64-unknown-linux-gnu.tar.gz")) | .browser_download_url')
144
143
wget -O /tmp/binaries.tar.gz $URL
145
144
tar -C /tmp -xzf /tmp/binaries.tar.gz
146
145
mv /tmp/cross ~/.cargo/bin
146
+ - uses : Swatinem/rust-cache@v2
147
147
- name : Test
148
148
run : cross test --no-fail-fast --target=${{ matrix.target }} --features=std
149
149
@@ -155,7 +155,7 @@ jobs:
155
155
- uses : dtolnay/rust-toolchain@stable
156
156
with :
157
157
targets : aarch64-apple-darwin, aarch64-apple-ios
158
- - uses : Swatinem/rust-cache@v1
158
+ - uses : Swatinem/rust-cache@v2
159
159
- run : cargo test --no-run --target=aarch64-apple-darwin --features=std
160
160
- run : cargo test --no-run --target=aarch64-apple-ios --features=std
161
161
@@ -172,13 +172,13 @@ jobs:
172
172
]
173
173
steps :
174
174
- uses : actions/checkout@v3
175
- - uses : Swatinem/rust-cache@v1
176
175
- name : Install precompiled cross
177
176
run : |
178
177
export URL=$(curl -s https://api.github.com/repos/cross-rs/cross/releases/latest | jq -r '.assets[] | select(.name | contains("x86_64-unknown-linux-gnu.tar.gz")) | .browser_download_url')
179
178
wget -O /tmp/binaries.tar.gz $URL
180
179
tar -C /tmp -xzf /tmp/binaries.tar.gz
181
180
mv /tmp/cross ~/.cargo/bin
181
+ - uses : Swatinem/rust-cache@v2
182
182
- name : Build Tests
183
183
run : cross test --no-run --target=${{ matrix.target }} --features=std
184
184
@@ -190,13 +190,13 @@ jobs:
190
190
- uses : dtolnay/rust-toolchain@stable
191
191
with :
192
192
targets : wasm32-unknown-unknown
193
- - uses : Swatinem/rust-cache@v1
194
193
- name : Install precompiled wasm-bindgen-test-runner
195
194
run : |
196
195
export VERSION=$(cargo metadata --format-version=1 | jq -r '.packages[] | select ( .name == "wasm-bindgen" ) | .version')
197
196
wget -O /tmp/binaries.tar.gz https://github.com/rustwasm/wasm-bindgen/releases/download/$VERSION/wasm-bindgen-$VERSION-x86_64-unknown-linux-musl.tar.gz
198
197
tar -C /tmp -xzf /tmp/binaries.tar.gz --strip-components=1
199
198
mv /tmp/wasm-bindgen-test-runner ~/.cargo/bin
199
+ - uses : Swatinem/rust-cache@v2
200
200
- name : Test (Node)
201
201
run : cargo test --target=wasm32-unknown-unknown --features=js
202
202
- name : Test (Firefox)
@@ -218,7 +218,7 @@ jobs:
218
218
- uses : dtolnay/rust-toolchain@nightly # Need to build libstd
219
219
with :
220
220
components : rust-src
221
- - uses : Swatinem/rust-cache@v1
221
+ - uses : Swatinem/rust-cache@v2
222
222
- name : Build and Link tests (build-std)
223
223
# This target is Tier 3, so we have to build libstd ourselves.
224
224
# We currently cannot run these tests because wasm-bindgen-test-runner
@@ -233,13 +233,13 @@ jobs:
233
233
- uses : dtolnay/rust-toolchain@stable
234
234
with :
235
235
targets : wasm32-wasi
236
- - uses : Swatinem/rust-cache@v1
237
236
- name : Install precompiled wasmtime
238
237
run : |
239
238
export URL=$(curl -s https://api.github.com/repos/bytecodealliance/wasmtime/releases/latest | jq -r '.assets[] | select(.name | contains("x86_64-linux.tar.xz")) | .browser_download_url')
240
239
wget -O /tmp/binaries.tar.xz $URL
241
240
tar -C /tmp -xf /tmp/binaries.tar.xz --strip-components=1
242
241
mv /tmp/wasmtime ~/.cargo/bin
242
+ - uses : Swatinem/rust-cache@v2
243
243
- run : cargo test --target wasm32-wasi
244
244
245
245
build-tier2 :
@@ -257,7 +257,7 @@ jobs:
257
257
- uses : dtolnay/rust-toolchain@stable
258
258
with :
259
259
targets : ${{ matrix.target }}
260
- - uses : Swatinem/rust-cache@v1
260
+ - uses : Swatinem/rust-cache@v2
261
261
- name : Build
262
262
run : cargo build --target=${{ matrix.target }} --features=std
263
263
@@ -269,7 +269,7 @@ jobs:
269
269
- uses : dtolnay/rust-toolchain@nightly # Required to build libcore
270
270
with :
271
271
components : rust-src
272
- - uses : Swatinem/rust-cache@v1
272
+ - uses : Swatinem/rust-cache@v2
273
273
- name : Hermit (x86-64 only)
274
274
run : cargo build -Z build-std=core --target=x86_64-unknown-hermit
275
275
- name : UEFI (RDRAND)
@@ -299,7 +299,7 @@ jobs:
299
299
- uses : dtolnay/rust-toolchain@stable
300
300
with :
301
301
components : rustfmt, clippy
302
- - uses : Swatinem/rust-cache@v1
302
+ - uses : Swatinem/rust-cache@v2
303
303
- name : clippy
304
304
run : cargo clippy --all --features=custom,std
305
305
- name : fmt
0 commit comments