fix(ci): do not pin dune — use whatever setup-ocaml provides
Some checks are pending
release / release (push) Waiting to run

The pinned `opam install dune.3.14.0` failed. setup-ocaml installs a
dune of its own for caching, so requesting an exact older version is a
downgrade the solver refuses — which also means run 1's
`dune: command not found` was only ever a PATH problem, fixed by
`opam exec --`.

- probe with `opam exec -- dune --version`, install only if absent
- echo the resolved version so the log says what built the release
- any dune >= 3.14 satisfies `(lang dune 3.14)`

Co-Authored-By: Claude Opus 5 (1M context) <noreply@anthropic.com>
This commit is contained in:
shoney.arickathil 2026-08-25 07:39:51 +02:00
parent 4f89d42948
commit 3f9ce2bf32

View file

@ -45,10 +45,16 @@ jobs:
with: with:
ocaml-compiler: '4.14' ocaml-compiler: '4.14'
# Pinned to the version this project is developed against # setup-ocaml may already have installed a dune (it uses one for its
# (compiler/dune-project says `(lang dune 3.14)`). # own cache), in which case asking for an exact older version is a
- name: Install dune # DOWNGRADE the solver refuses — which is how the pinned
run: opam install -y dune.3.14.0 # `dune.3.14.0` failed. So: use whatever is there, and only install
# if there is nothing. Any dune >= 3.14 satisfies this project's
# `(lang dune 3.14)`.
- name: Ensure dune is available
run: |
opam exec -- dune --version || opam install -y dune
echo "dune: $(opam exec -- dune --version)"
# The tag is the release's identity; VERSION is what the binaries # The tag is the release's identity; VERSION is what the binaries
# report. If they disagree the download URL would name a version # report. If they disagree the download URL would name a version