Skip to content

Commit 26fcd2b

Browse files
committed
Include setup-ocaml version in cache key
1 parent ddff7a5 commit 26fcd2b

File tree

1 file changed

+5
-2
lines changed

1 file changed

+5
-2
lines changed

.github/workflows/ci.yml

Lines changed: 5 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -75,6 +75,9 @@ jobs:
7575

7676
runs-on: ${{matrix.os}}
7777

78+
env:
79+
SETUP_OCAML_VERSION: 3.3.5
80+
7881
steps:
7982
- name: "Windows: Set git config"
8083
if: runner.os == 'Windows'
@@ -141,7 +144,7 @@ jobs:
141144
# matrix.ocaml_compiler may contain commas
142145
- name: Get OPAM cache key
143146
shell: bash
144-
run: echo "opam_cache_key=opam-env-v8-${{ matrix.os }}-${{ matrix.ocaml_compiler }}-${{ hashFiles('*.opam') }}" | sed 's/,/-/g' >> $GITHUB_ENV
147+
run: echo "opam_cache_key=opam-env-v8-${{ matrix.os }}-${{ env.SETUP_OCAML_VERSION }}-{{ matrix.ocaml_compiler }}-${{ hashFiles('*.opam') }}" | sed 's/,/-/g' >> $GITHUB_ENV
145148

146149
- name: Restore OPAM environment
147150
id: cache-opam-env
@@ -157,7 +160,7 @@ jobs:
157160
key: ${{ env.opam_cache_key }}
158161

159162
- name: Use OCaml ${{matrix.ocaml_compiler}}
160-
uses: ocaml/setup-ocaml@v3.3.2
163+
uses: ocaml/setup-ocaml@v${{ env.SETUP_OCAML_VERSION }}
161164
if: steps.cache-opam-env.outputs.cache-hit != 'true'
162165
with:
163166
ocaml-compiler: ${{matrix.ocaml_compiler}}

0 commit comments

Comments
 (0)