Fix GitHub actions for Ocaml5 specific tests

Co-authored-by: Puneeth Chaganti <punchagan@muse-amuse.in>
This commit is contained in:
Shon Feder 2025-07-10 17:48:50 -04:00
parent ea66f65187
commit 94772c7fe4
No known key found for this signature in database
4 changed files with 15 additions and 6 deletions

View file

@ -5,11 +5,12 @@ on:
push:
branches:
- main
- add-eio-backend
jobs:
build:
strategy:
fail-fast: true
fail-fast: false
matrix:
os:
- ubuntu-latest
@ -47,14 +48,14 @@ jobs:
opam install pbrt -y
# 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)
- run: |
packages=$(ls ./*.opam | grep -v eio)
opam install $packages --deps-only --with-test --solver=mccs
if: ${{ ! (startsWith(matrix.ocaml-compiler, '5')) }}
# 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 install . --deps-only --with-test --solver=mccs
if: ${{ startsWith(matrix.ocaml-compiler, '5') }}
- run: opam exec -- dune build @install -p opentelemetry,opentelemetry-lwt,opentelemetry-client-ocurl,opentelemetry-cohttp-lwt,opentelemetry-client-cohttp-lwt

View file

@ -2,6 +2,8 @@
(name opentelemetry_client_cohttp_eio)
(public_name opentelemetry-client-cohttp-eio)
(synopsis "Opentelemetry collector using cohttp+eio+unix")
(enabled_if
(>= %{ocaml_version} 5.0))
(libraries
opentelemetry
opentelemetry.client

View file

@ -25,6 +25,8 @@
(modules emit1_eio)
(preprocess
(pps lwt_ppx))
(enabled_if
(>= %{ocaml_version} 5.0))
(libraries
unix
logs

View file

@ -31,6 +31,8 @@
(names test_cottp_lwt_client_e2e)
(modules test_cottp_lwt_client_e2e)
(package opentelemetry-client-cohttp-lwt)
(enabled_if
(>= %{ocaml_version} 5.0))
(deps %{bin:emit1_cohttp} %{bin:emit1_eio})
(libraries clients_e2e_lib alcotest opentelemetry opentelemetry.client))
@ -39,6 +41,8 @@
(modules test_cottp_eio_client_e2e)
(package opentelemetry-client-cohttp-eio)
(deps %{bin:emit1_eio})
(enabled_if
(>= %{ocaml_version} 5.0))
(libraries clients_e2e_lib alcotest opentelemetry opentelemetry.client))
(executable