41
41
path : |
42
42
~/.cargo/bin/cargo-make
43
43
~/.cargo/bin/cargo-make.exe
44
- key : ${{ runner.os }}-${{ steps.cargo-make-version.outputs.hash }}
44
+ key : ${{ runner.os }}-make- ${{ steps.cargo-make-version.outputs.hash }}
45
45
- name : Install cargo-make
46
46
if : steps.cargo-make-cache.outputs.cache-hit != 'true'
47
47
uses :
actions-rs/[email protected]
80
80
path : |
81
81
~/.cargo/bin/cargo-make
82
82
~/.cargo/bin/cargo-make.exe
83
- key : ${{ runner.os }}-${{ steps.cargo-make-version.outputs.hash }}
83
+ key : ${{ runner.os }}-make- ${{ steps.cargo-make-version.outputs.hash }}
84
84
- name : Install cargo-make
85
85
if : steps.cargo-make-cache.outputs.cache-hit != 'true'
86
86
uses :
actions-rs/[email protected]
@@ -129,7 +129,7 @@ jobs:
129
129
path : |
130
130
~/.cargo/bin/cargo-make
131
131
~/.cargo/bin/cargo-make.exe
132
- key : ${{ runner.os }}-${{ steps.cargo-make-version.outputs.hash }}
132
+ key : ${{ runner.os }}-make- ${{ steps.cargo-make-version.outputs.hash }}
133
133
- name : Install cargo-make
134
134
if : steps.cargo-make-cache.outputs.cache-hit != 'true'
135
135
uses :
actions-rs/[email protected]
@@ -145,13 +145,27 @@ jobs:
145
145
packages : |
146
146
sphinx
147
147
sphinx-rtd-theme
148
+ - name : Get Diplomat version
149
+ id : diplomat-version
150
+ run : |
151
+ echo "::set-output name=rev::$(cargo make diplomat-get-rev --loglevel error | tr -d '[:space:]')"
152
+ shell : bash
153
+ - name : Attempt to load cached Diplomat
154
+ uses : actions/cache@v2
155
+ id : diplomat-cache
156
+ with :
157
+ path : |
158
+ ~/.cargo/bin/diplomat-tool
159
+ ~/.cargo/bin/diplomat-tool.exe
160
+ key : ${{ runner.os }}-diplomat-${{ steps.diplomat-version.outputs.rev }}
148
161
149
162
- name : Install Diplomat
163
+ if : steps.diplomat-cache.outputs.cache-hit != 'true'
150
164
uses :
actions-rs/[email protected]
151
165
with :
152
166
command : install
153
167
# Keep this in sync with ffi/capi/Cargo.toml
154
- args : --git https://github.com/rust-diplomat/diplomat.git --rev 3ac8c3e8e31353a2f3eb02d015eb23a1feb84b4d diplomat-tool
168
+ args : --git https://github.com/rust-diplomat/diplomat.git --rev ${{ steps.diplomat-version.outputs.rev }} diplomat-tool
155
169
156
170
- name : Build
157
171
uses :
actions-rs/[email protected]
@@ -191,7 +205,7 @@ jobs:
191
205
path : |
192
206
~/.cargo/bin/cargo-make
193
207
~/.cargo/bin/cargo-make.exe
194
- key : ${{ runner.os }}-${{ steps.cargo-make-version.outputs.hash }}
208
+ key : ${{ runner.os }}-make- ${{ steps.cargo-make-version.outputs.hash }}
195
209
- name : Install cargo-make
196
210
if : steps.cargo-make-cache.outputs.cache-hit != 'true'
197
211
uses :
actions-rs/[email protected]
@@ -219,7 +233,26 @@ jobs:
219
233
- name : Install WASM tools
220
234
run : |
221
235
sudo apt-get install wabt binaryen
222
- cargo install twiggy
236
+
237
+ - name : Get twiggy version
238
+ id : twiggy-version
239
+ run : |
240
+ echo "::set-output name=hash::$(cargo search twiggy | grep '^twiggy =' | md5sum)"
241
+ shell : bash
242
+ - name : Attempt to load cached twiggy
243
+ uses : actions/cache@v2
244
+ id : twiggy-cache
245
+ with :
246
+ path : |
247
+ ~/.cargo/bin/twiggy
248
+ ~/.cargo/bin/twiggy.exe
249
+ key : ${{ runner.os }}-twiggy-${{ steps.twiggy-version.outputs.hash }}
250
+ - name : Install twiggy
251
+ if : steps.twiggy-cache.outputs.cache-hit != 'true'
252
+ uses :
actions-rs/[email protected]
253
+ with :
254
+ crate : twiggy
255
+ version : latest
223
256
224
257
- name : Get cargo-make version
225
258
id : cargo-make-version
@@ -233,19 +266,35 @@ jobs:
233
266
path : |
234
267
~/.cargo/bin/cargo-make
235
268
~/.cargo/bin/cargo-make.exe
236
- key : ${{ runner.os }}-${{ steps.cargo-make-version.outputs.hash }}
269
+ key : ${{ runner.os }}-make- ${{ steps.cargo-make-version.outputs.hash }}
237
270
- name : Install cargo-make
238
271
if : steps.cargo-make-cache.outputs.cache-hit != 'true'
239
272
uses :
actions-rs/[email protected]
240
273
with :
241
274
crate : cargo-make
242
275
version : latest
243
276
277
+ - name : Get Diplomat version
278
+ id : diplomat-version
279
+ run : |
280
+ echo "::set-output name=rev::$(cargo make diplomat-get-rev --loglevel error | tr -d '[:space:]')"
281
+ shell : bash
282
+ - name : Attempt to load cached Diplomat
283
+ uses : actions/cache@v2
284
+ id : diplomat-cache
285
+ with :
286
+ path : |
287
+ ~/.cargo/bin/diplomat-tool
288
+ ~/.cargo/bin/diplomat-tool.exe
289
+ key : ${{ runner.os }}-diplomat-${{ steps.diplomat-version.outputs.rev }}
290
+
244
291
- name : Install Diplomat
292
+ if : steps.diplomat-cache.outputs.cache-hit != 'true'
245
293
uses :
actions-rs/[email protected]
246
294
with :
247
295
command : install
248
- args : --git https://github.com/rust-diplomat/diplomat.git --rev 3ac8c3e8e31353a2f3eb02d015eb23a1feb84b4d diplomat-tool
296
+ # Keep this in sync with ffi/capi/Cargo.toml
297
+ args : --git https://github.com/rust-diplomat/diplomat.git --rev ${{ steps.diplomat-version.outputs.rev }} diplomat-tool
249
298
250
299
- name : Build
251
300
uses :
actions-rs/[email protected]
@@ -287,7 +336,7 @@ jobs:
287
336
path : |
288
337
~/.cargo/bin/cargo-make
289
338
~/.cargo/bin/cargo-make.exe
290
- key : ${{ runner.os }}-${{ steps.cargo-make-version.outputs.hash }}
339
+ key : ${{ runner.os }}-make- ${{ steps.cargo-make-version.outputs.hash }}
291
340
- name : Install cargo-make
292
341
if : steps.cargo-make-cache.outputs.cache-hit != 'true'
293
342
uses :
actions-rs/[email protected]
@@ -324,7 +373,7 @@ jobs:
324
373
path : |
325
374
~/.cargo/bin/cargo-make
326
375
~/.cargo/bin/cargo-make.exe
327
- key : ${{ runner.os }}-${{ steps.cargo-make-version.outputs.hash }}
376
+ key : ${{ runner.os }}-make- ${{ steps.cargo-make-version.outputs.hash }}
328
377
- name : Install cargo-make
329
378
if : steps.cargo-make-cache.outputs.cache-hit != 'true'
330
379
uses :
actions-rs/[email protected]
@@ -344,7 +393,7 @@ jobs:
344
393
path : |
345
394
~/.cargo/bin/cargo-readme
346
395
~/.cargo/bin/cargo-readme.exe
347
- key : ${{ runner.os }}-${{ steps.cargo-readme-version.outputs.hash }}
396
+ key : ${{ runner.os }}-readme- ${{ steps.cargo-readme-version.outputs.hash }}
348
397
- name : Install cargo-readme
349
398
if : steps.cargo-readme-cache.outputs.cache-hit != 'true'
350
399
uses :
actions-rs/[email protected]
@@ -645,7 +694,7 @@ jobs:
645
694
path : |
646
695
~/.cargo/bin/cargo-make
647
696
~/.cargo/bin/cargo-make.exe
648
- key : ${{ runner.os }}-${{ steps.cargo-make-version.outputs.hash }}
697
+ key : ${{ runner.os }}-make- ${{ steps.cargo-make-version.outputs.hash }}
649
698
650
699
- name : Install cargo-make
651
700
if : steps.cargo-make-cache.outputs.cache-hit != 'true'
@@ -654,14 +703,34 @@ jobs:
654
703
crate : cargo-make
655
704
version : latest
656
705
706
+ - name : Get twiggy version
707
+ id : twiggy-version
708
+ run : |
709
+ echo "::set-output name=hash::$(cargo search twiggy | grep '^twiggy =' | md5sum)"
710
+ shell : bash
711
+ - name : Attempt to load cached twiggy
712
+ uses : actions/cache@v2
713
+ id : twiggy-cache
714
+ with :
715
+ path : |
716
+ ~/.cargo/bin/twiggy
717
+ ~/.cargo/bin/twiggy.exe
718
+ key : ${{ runner.os }}-twiggy-${{ steps.twiggy-version.outputs.hash }}
719
+ - name : Install twiggy
720
+ if : steps.twiggy-cache.outputs.cache-hit != 'true'
721
+ uses :
actions-rs/[email protected]
722
+ with :
723
+ crate : twiggy
724
+ version : latest
725
+
657
726
- name : Install prerequisites for wasm build
658
727
run : |
659
728
rustup component add rust-src
660
729
rustup toolchain list
661
730
rustup toolchain install nightly-2021-02-28
662
731
sudo npm install -g wasm-opt --unsafe-perm
663
732
sudo npm install -g wabt
664
- cargo install twiggy
733
+
665
734
666
735
- name : Setup output data directory
667
736
run : mkdir -p benchmarks/binsize
0 commit comments