@@ -217,8 +217,10 @@ jobs:
217
217
id : cache-opam-env
218
218
uses : actions/cache/restore@v4
219
219
with :
220
- path : ~/.opam
221
- key : opam-env-${{ runner.os }}-${{ hashFiles('dune-project') }}
220
+ path : |
221
+ ${{ runner.tool_cache }}/opam
222
+ ~/.opam
223
+ key : opam-env-v1-${{ runner.os }}-${{ hashFiles('dune-project') }}
222
224
223
225
- name : Use OCaml ${{matrix.ocaml_compiler}}
224
226
uses : ocaml/setup-ocaml@v2
@@ -248,8 +250,10 @@ jobs:
248
250
if : steps.cache-opam-env.outputs.cache-hit != 'true'
249
251
uses : actions/cache/save@v4
250
252
with :
251
- path : ~/.opam
252
- key : opam-env-${{ runner.os }}-${{ hashFiles('dune-project') }}
253
+ path : |
254
+ ${{ runner.tool_cache }}/opam
255
+ ~/.opam
256
+ key : opam-env-v1-${{ runner.os }}-${{ hashFiles('dune-project') }}
253
257
254
258
- name : Get OPAM path
255
259
if : steps.cache-opam-env.outputs.cache-hit != 'true'
@@ -275,10 +279,9 @@ jobs:
275
279
- name : Use cached OPAM env
276
280
if : steps.cache-opam-env.outputs.cache-hit == 'true'
277
281
run : |
278
- ls -al "$(dirname "$(cat .opam-path)")"
279
- ls -al "$(cat .opam-path)"
280
- chmod +x "$(cat .opam-path)"
281
- echo "$(dirname "$(cat .opam-path)")" >> $GITHUB_PATH
282
+ OPAM_PATH="$(cat .opam-path)"
283
+ chmod +x $OPAM_PATH
284
+ dirname $OPAM_PATH >> $GITHUB_PATH
282
285
283
286
- name : Use cached OPAM env
284
287
if : steps.cache-opam-env.outputs.cache-hit == 'true'
0 commit comments