@@ -111,29 +111,6 @@ jobs:
111111 with :
112112 packages : tar zstd
113113
114- # Restore previously built v8
115- - uses : actions/cache/restore@v4
116- id : v8-cache
117- with :
118- key : v8/${{ env.V8_REF }}/${{ matrix.host.platform }}.${{ matrix.host.arch }}.${{ env.V8_CONFIGURATION }}
119- path : ./deps/v8/out
120-
121- # Build v8 on cache miss
122- - uses : ./.github/actions/v8
123- name : Build v8
124- if : steps.v8-cache.outputs.cache-hit != 'true'
125- with :
126- arch : ${{ matrix.host.arch }}
127- platform : ${{ matrix.host.platform }}
128- ref : ${{ env.V8_REF }}
129-
130- # Cache v8
131- - uses : actions/cache/save@v4
132- if : steps.v8-cache.outputs.cache-hit != 'true'
133- with :
134- key : ${{ steps.v8-cache.outputs.cache-primary-key }}
135- path : ./deps/v8/out
136-
137114 # Install toolchain
138115 - name : Toolchain [Linux]
139116@@ -194,6 +171,29 @@ jobs:
194171 echo "$PWD" >> "$GITHUB_PATH"
195172 echo ::endgroup::
196173
174+ # Restore previously built v8
175+ - uses : actions/cache/restore@v4
176+ id : v8-cache
177+ with :
178+ key : v8/${{ env.V8_REF }}/${{ matrix.host.platform }}.${{ matrix.host.arch }}.${{ env.V8_CONFIGURATION }}
179+ path : ./deps/v8/out
180+
181+ # Build v8 on cache miss
182+ - uses : ./.github/actions/v8
183+ name : Build v8
184+ if : steps.v8-cache.outputs.cache-hit != 'true'
185+ with :
186+ arch : ${{ matrix.host.arch }}
187+ platform : ${{ matrix.host.platform }}
188+ ref : ${{ env.V8_REF }}
189+
190+ # Cache v8
191+ - uses : actions/cache/save@v4
192+ if : steps.v8-cache.outputs.cache-hit != 'true'
193+ with :
194+ key : ${{ steps.v8-cache.outputs.cache-primary-key }}
195+ path : ./deps/v8/out
196+
197197 # Install nodejs & npm dependencies
198198 - uses : actions/setup-node@v4
199199 with :
0 commit comments