From a0bee6bfcca9562e20fcf0dd4d47c61cb038310c Mon Sep 17 00:00:00 2001 From: Shon Feder Date: Thu, 10 Jul 2025 17:36:50 -0400 Subject: [PATCH] Only install Eio in builds for ocaml >= 5 --- .github/workflows/main.yml | 10 +++++++++- 1 file changed, 9 insertions(+), 1 deletion(-) diff --git a/.github/workflows/main.yml b/.github/workflows/main.yml index f65a6192..78fbfb4a 100644 --- a/.github/workflows/main.yml +++ b/.github/workflows/main.yml @@ -46,7 +46,15 @@ jobs: opam pin pbrt 3.0.1 -y -n opam install pbrt -y - - run: opam install . --deps-only --with-test --solver=mccs + # We cannot install packages that need eio on ocaml versions before 5 + - if: ${{ ! startsWith("5" matrix.ocaml-compiler) }} + run: | + packages=$(ls *.opam | grep -v eio) + opam install $packages --deps-only --with-test --solver=mccs + + # We should be able to install all packages on ocaml 5 + - if: ${{ startsWith("5" matrix.ocaml-compiler) }} + run: opam install . --deps-only --with-test --solver=mccs - run: opam exec -- dune build @install -p opentelemetry,opentelemetry-lwt,opentelemetry-client-ocurl,opentelemetry-cohttp-lwt,opentelemetry-client-cohttp-lwt