@@ -11,10 +11,12 @@ defaults:
11
11
shell : bash
12
12
env :
13
13
viceroy_version : 0.3.5
14
+ wasm-tools_version : 1.0.28
14
15
15
16
jobs :
16
17
build :
17
18
name : Build
19
+ needs : [ensure_cargo_installs]
18
20
strategy :
19
21
matrix :
20
22
profile : [debug, release]
27
29
- uses : ./.github/actions/cache-crates
28
30
with :
29
31
lockfiles : ' c-dependencies/js-compute-runtime/**/Cargo.lock'
32
+
33
+ - name : Restore wasm-tools from cache
34
+ uses : actions/cache@v3
35
+ id : wasm-tools
36
+ with :
37
+ path : " /home/runner/.cargo/bin/wasm-tools"
38
+ key : crate-cache-wasm-tools-${{ env.wasm-tools_version }}
39
+
40
+ - name : " Check wasm-tools has been restored"
41
+ if : steps.wasm-tools.outputs.cache-hit != 'true'
42
+ run : |
43
+ echo "wasm-tools was not restored from the cache"
44
+ echo "bailing out from the build early"
45
+ exit 1
30
46
31
47
- uses : ./.github/actions/install-rust
32
48
with :
@@ -102,6 +118,9 @@ jobs:
102
118
- crate : viceroy
103
119
version : 0.3.5 # Note: workflow-level env vars can't be used in matrix definitions
104
120
options : " "
121
+ - crate : wasm-tools
122
+ version : 1.0.28 # Note: workflow-level env vars can't be used in matrix definitions
123
+ options : " "
105
124
runs-on : ubuntu-latest
106
125
steps :
107
126
- name : Cache ${{ matrix.crate }} ${{ matrix.version }}
@@ -143,6 +162,20 @@ jobs:
143
162
path : " /home/runner/.cargo/bin/viceroy"
144
163
key : crate-cache-viceroy-${{ env.viceroy_version }}
145
164
165
+ - name : Restore wasm-tools from cache
166
+ uses : actions/cache@v3
167
+ id : wasm-tools
168
+ with :
169
+ path : " /home/runner/.cargo/bin/wasm-tools"
170
+ key : crate-cache-wasm-tools-${{ env.wasm-tools_version }}
171
+
172
+ - name : " Check wasm-tools has been restored"
173
+ if : steps.wasm-tools.outputs.cache-hit != 'true'
174
+ run : |
175
+ echo "wasm-tools was not restored from the cache"
176
+ echo "bailing out from the build early"
177
+ exit 1
178
+
146
179
- run : yarn install --frozen-lockfile
147
180
148
181
- name : Build WPT runtime
@@ -221,6 +254,20 @@ jobs:
221
254
with :
222
255
path : " /home/runner/.cargo/bin/viceroy"
223
256
key : crate-cache-viceroy-${{ env.viceroy_version }}
257
+
258
+ - name : Restore wasm-tools from cache
259
+ uses : actions/cache@v3
260
+ id : wasm-tools
261
+ with :
262
+ path : " /home/runner/.cargo/bin/wasm-tools"
263
+ key : crate-cache-wasm-tools-${{ env.wasm-tools_version }}
264
+
265
+ - name : " Check wasm-tools has been restored"
266
+ if : steps.wasm-tools.outputs.cache-hit != 'true'
267
+ run : |
268
+ echo "wasm-tools was not restored from the cache"
269
+ echo "bailing out from the build early"
270
+ exit 1
224
271
225
272
# https://github.com/fastly/js-compute-runtime/issues/361
226
273
# TODO: Use engine-debug on all apps once we upgrade to FF 109
0 commit comments