Skip to content

Commit a89039a

Browse files
committed
Make compiler version a bit more flexible
1 parent 1fcab18 commit a89039a

File tree

1 file changed

+12
-4
lines changed

1 file changed

+12
-4
lines changed

.github/workflows/fuzzy-ci.yml

Lines changed: 12 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -43,8 +43,10 @@ env:
4343
# TODO: Release merl-an and install a certain version instead of pinning it to a certain commit
4444
MERL_AN_SHA: 1643fb7a9958379fb4ed8d7c5169146aaa88f5b7
4545

46-
# The compiler version used on master. It also needs to form part of Irmin's build cache key. Bump this on other branches and whenever the compiler version on master is bumped.
47-
COMPILER_VERSION: ocaml-base-compiler.4.14.1
46+
# The compiler version used on the respective branches. It also needs to form part of Irmin's build cache key.
47+
# Bump either of these whenever the compiler version is bumped on either of the two branches.
48+
merge_branch_COMPILER_VERSION: ocaml-base-compiler.4.14.1
49+
base_branch_COMPILER_VERSION: ocaml-base-compiler.4.14.1
4850

4951
jobs:
5052
data:
@@ -78,10 +80,16 @@ jobs:
7880
echo "Check out $sha"
7981
git checkout $sha
8082
83+
- name: Get desired compiler version
84+
id: compiler
85+
run: |
86+
v=$${{ matrix.commit }}_COMPILER_VERSION
87+
echo "version=$v" | tee -a $GITHUB_OUTPUT
88+
8189
- name: Install OCaml
8290
uses: ocaml/setup-ocaml@v2
8391
with:
84-
ocaml-compiler: ${{ env.COMPILER_VERSION }}
92+
ocaml-compiler: ${{ steps.compiler.outputs.version }}
8593
dune-cache: true
8694

8795
- name: Install merlin dependencies
@@ -101,7 +109,7 @@ jobs:
101109
id: irmin-cache
102110
with:
103111
path: irmin/
104-
key: os${{ runner.os }}+arch${{ runner.arch }}+${{ hashFiles('fuzzy-ci-helpers/irmin.3.9.0.opam.locked') }}+${{ env.IRMIN_VERSION }}+${{ env.COMPILER_VERSION }}
112+
key: os${{ runner.os }}+arch${{ runner.arch }}+${{ hashFiles('fuzzy-ci-helpers/irmin.3.9.0.opam.locked') }}+${{ env.IRMIN_VERSION }}+${{ steps.compiler.outputs.version }}
105113

106114
- name: Download Irmin tarball
107115
if: steps.irmin-cache.outputs.cache-hit != 'true'

0 commit comments

Comments
 (0)