File tree Expand file tree Collapse file tree 1 file changed +28
-0
lines changed Expand file tree Collapse file tree 1 file changed +28
-0
lines changed Original file line number Diff line number Diff line change @@ -244,6 +244,24 @@ jobs:
244
244
fi
245
245
shell : bash
246
246
247
+ - name : Compiler build state key
248
+ id : compiler-build-state-key
249
+ shell : bash
250
+ run : |
251
+ echo "value=compiler-build-state-v1-${{ matrix.os }}-${{ matrix.ocaml_compiler }}-${{ hashFiles('dune-project') }}" \
252
+ | sed 's/,/-/g' >> "$GITHUB_OUTPUT"
253
+
254
+ - name : Restore compiler build state
255
+ if : github.base_ref == 'master'
256
+ id : compiler-build-state
257
+ uses : actions/cache/restore@v4
258
+ with :
259
+ path : |
260
+ D:\.cache\dune
261
+ ~/.cache/dune
262
+ _build
263
+ key : ${{ steps.compiler-build-state-key.outputs.value }}
264
+
247
265
- name : Build compiler
248
266
if : runner.os != 'Linux'
249
267
run : opam exec -- dune build --display quiet --profile release
@@ -252,6 +270,16 @@ jobs:
252
270
if : runner.os == 'Linux'
253
271
run : opam exec -- dune build --display quiet --profile static
254
272
273
+ - name : Save compiler build state
274
+ if : github.event_name == 'push' && github.ref == 'refs/heads/master'
275
+ uses : actions/cache/save@v4
276
+ with :
277
+ path : |
278
+ D:\.cache\dune
279
+ ~/.cache/dune
280
+ _build
281
+ key : ${{ steps.compiler-build-state-key.outputs.value }}
282
+
255
283
- name : Install npm packages
256
284
run : npm ci --ignore-scripts
257
285
You can’t perform that action at this time.
0 commit comments