@@ -19,12 +19,19 @@ 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
+
23
+ id : latest
24
+ with :
25
+ route : GET /repos/deadlinks/cargo-deadlinks/releases/latest
26
+ env :
27
+ GITHUB_TOKEN : ${{ secrets.GITHUB_TOKEN }}
22
28
- name : Install precompiled cargo-deadlinks
23
29
run : |
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')
25
- wget -O /tmp/cargo-deadlinks $URL
26
- chmod +x /tmp/cargo-deadlinks
27
- mv /tmp/cargo-deadlinks ~/.cargo/bin
30
+ VERSION=${{ fromJson(steps.latest.outputs.data).tag_name }}
31
+ URL="https://github.com/deadlinks/cargo-deadlinks/releases/download/${VERSION}/cargo-deadlinks-linux"
32
+ wget -O ~/.cargo/bin/cargo-deadlinks $URL
33
+ chmod +x ~/.cargo/bin/cargo-deadlinks
34
+ cargo deadlinks --version
28
35
- uses : Swatinem/rust-cache@v2
29
36
- name : Generate Docs
30
37
env :
@@ -90,11 +97,17 @@ jobs:
90
97
- uses : dtolnay/rust-toolchain@stable
91
98
with :
92
99
targets : x86_64-apple-ios
93
- - name : Download cargo-dinghy
100
+
101
+ id : latest
102
+ with :
103
+ route : GET /repos/sonos/dinghy/releases/latest
104
+ env :
105
+ GITHUB_TOKEN : ${{ secrets.GITHUB_TOKEN }}
106
+ - name : Install precompiled cargo-dinghy
94
107
run : |
95
- VERSION=0.6.2
108
+ VERSION=${{ fromJson(steps.latest.outputs.data).tag_name }}
96
109
URL="https://github.com/sonos/dinghy/releases/download/${VERSION}/cargo-dinghy-macos-${VERSION}.tgz"
97
- curl -L $URL | tar -xz --strip-components=1 -C ~/.cargo/bin
110
+ wget -O - $URL | tar -xz --strip-components=1 -C ~/.cargo/bin
98
111
cargo dinghy --version
99
112
- name : Setup Simulator
100
113
run : |
@@ -137,12 +150,18 @@ jobs:
137
150
]
138
151
steps :
139
152
- uses : actions/checkout@v3
153
+
154
+ id : latest
155
+ with :
156
+ route : GET /repos/cross-rs/cross/releases/latest
157
+ env :
158
+ GITHUB_TOKEN : ${{ secrets.GITHUB_TOKEN }}
140
159
- name : Install precompiled cross
141
160
run : |
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')
143
- wget -O /tmp/binaries .tar.gz $URL
144
- tar -C /tmp -xzf /tmp/binaries.tar.gz
145
- mv /tmp/ cross ~/.cargo/bin
161
+ VERSION=${{ fromJson(steps. latest.outputs.data).tag_name }}
162
+ URL=https://github.com/cross-rs/cross/releases/download/${VERSION}/cross-x86_64-unknown-linux-gnu .tar.gz
163
+ wget -O - $URL | tar -xz -C ~/.cargo/bin
164
+ cross --version
146
165
- uses : Swatinem/rust-cache@v2
147
166
- name : Test
148
167
run : cross test --no-fail-fast --target=${{ matrix.target }} --features=std
@@ -174,12 +193,18 @@ jobs:
174
193
]
175
194
steps :
176
195
- uses : actions/checkout@v3
196
+
197
+ id : latest
198
+ with :
199
+ route : GET /repos/cross-rs/cross/releases/latest
200
+ env :
201
+ GITHUB_TOKEN : ${{ secrets.GITHUB_TOKEN }}
177
202
- name : Install precompiled cross
178
203
run : |
179
- 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')
180
- wget -O /tmp/binaries .tar.gz $URL
181
- tar -C /tmp -xzf /tmp/binaries.tar.gz
182
- mv /tmp/ cross ~/.cargo/bin
204
+ VERSION=${{ fromJson(steps. latest.outputs.data).tag_name }}
205
+ URL=https://github.com/cross-rs/cross/releases/download/${VERSION}/cross-x86_64-unknown-linux-gnu .tar.gz
206
+ wget -O - $URL | tar -xz -C ~/.cargo/bin
207
+ cross --version
183
208
- uses : Swatinem/rust-cache@v2
184
209
- name : Build Tests
185
210
run : cross test --no-run --target=${{ matrix.target }} --features=std
@@ -203,10 +228,16 @@ jobs:
203
228
- uses : dtolnay/rust-toolchain@stable
204
229
- run : choco install wget
205
230
if : matrix.os == 'windows-latest'
231
+
232
+ id : latest
233
+ with :
234
+ route : GET /repos/rustwasm/wasm-pack/releases/latest
235
+ env :
236
+ GITHUB_TOKEN : ${{ secrets.GITHUB_TOKEN }}
206
237
- name : Install precompiled wasm-pack
207
238
shell : bash
208
239
run : |
209
- VERSION=$(wget -nv -O - https://api.github.com/repos/rustwasm/wasm-pack/releases/ latest | jq -r '.tag_name')
240
+ VERSION=${{ fromJson(steps. latest.outputs.data).tag_name }}
210
241
URL=https://github.com/rustwasm/wasm-pack/releases/download/${VERSION}/wasm-pack-${VERSION}-${{ matrix.target }}.tar.gz
211
242
wget -O - $URL | tar -xz --strip-components=1 -C ~/.cargo/bin
212
243
wasm-pack --version
@@ -250,12 +281,18 @@ jobs:
250
281
- uses : dtolnay/rust-toolchain@stable
251
282
with :
252
283
targets : wasm32-wasi
284
+
285
+ id : latest
286
+ with :
287
+ route : GET /repos/cross-rs/bytecodealliance/wasmtime/latest
288
+ env :
289
+ GITHUB_TOKEN : ${{ secrets.GITHUB_TOKEN }}
253
290
- name : Install precompiled wasmtime
254
291
run : |
255
- 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')
256
- wget -O /tmp/binaries. tar.xz $URL
257
- tar -C /tmp -xf /tmp/binaries. tar.xz -- strip-components=1
258
- mv /tmp/ wasmtime ~/.cargo/bin
292
+ VERSION=${{ fromJson(steps. latest.outputs.data).tag_name }}
293
+ URL=https://github.com/bytecodealliance/wasmtime/releases/download/${VERSION}/wasmtime-${VERSION}-x86_64-linux. tar.xz
294
+ wget -O - $URL | tar -xJ -- strip-components=1 -C ~/.cargo/bin
295
+ wasmtime --version
259
296
- uses : Swatinem/rust-cache@v2
260
297
- run : cargo test --target wasm32-wasi
261
298
0 commit comments