Skip to content

Commit 94772c7

Browse files
shonfederpunchagan
andcommitted
Fix GitHub actions for Ocaml5 specific tests
Co-authored-by: Puneeth Chaganti <punchagan@muse-amuse.in>
1 parent ea66f65 commit 94772c7

File tree

4 files changed

+15
-6
lines changed

4 files changed

+15
-6
lines changed

.github/workflows/main.yml

Lines changed: 7 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -5,11 +5,12 @@ on:
55
push:
66
branches:
77
- main
8+
- add-eio-backend
89

910
jobs:
1011
build:
1112
strategy:
12-
fail-fast: true
13+
fail-fast: false
1314
matrix:
1415
os:
1516
- ubuntu-latest
@@ -47,14 +48,14 @@ jobs:
4748
opam install pbrt -y
4849
4950
# We cannot install packages that need eio on ocaml versions before 5
50-
- if: ${{ ! startsWith("5" matrix.ocaml-compiler) }}
51-
run: |
52-
packages=$(ls *.opam | grep -v eio)
51+
- run: |
52+
packages=$(ls ./*.opam | grep -v eio)
5353
opam install $packages --deps-only --with-test --solver=mccs
54+
if: ${{ ! (startsWith(matrix.ocaml-compiler, '5')) }}
5455
5556
# We should be able to install all packages on ocaml 5
56-
- if: ${{ startsWith("5" matrix.ocaml-compiler) }}
57-
run: opam install . --deps-only --with-test --solver=mccs
57+
- run: opam install . --deps-only --with-test --solver=mccs
58+
if: ${{ startsWith(matrix.ocaml-compiler, '5') }}
5859

5960
- run: opam exec -- dune build @install -p opentelemetry,opentelemetry-lwt,opentelemetry-client-ocurl,opentelemetry-cohttp-lwt,opentelemetry-client-cohttp-lwt
6061

src/client-cohttp-eio/dune

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -2,6 +2,8 @@
22
(name opentelemetry_client_cohttp_eio)
33
(public_name opentelemetry-client-cohttp-eio)
44
(synopsis "Opentelemetry collector using cohttp+eio+unix")
5+
(enabled_if
6+
(>= %{ocaml_version} 5.0))
57
(libraries
68
opentelemetry
79
opentelemetry.client

tests/bin/dune

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -25,6 +25,8 @@
2525
(modules emit1_eio)
2626
(preprocess
2727
(pps lwt_ppx))
28+
(enabled_if
29+
(>= %{ocaml_version} 5.0))
2830
(libraries
2931
unix
3032
logs

tests/client_e2e/dune

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -31,6 +31,8 @@
3131
(names test_cottp_lwt_client_e2e)
3232
(modules test_cottp_lwt_client_e2e)
3333
(package opentelemetry-client-cohttp-lwt)
34+
(enabled_if
35+
(>= %{ocaml_version} 5.0))
3436
(deps %{bin:emit1_cohttp} %{bin:emit1_eio})
3537
(libraries clients_e2e_lib alcotest opentelemetry opentelemetry.client))
3638

@@ -39,6 +41,8 @@
3941
(modules test_cottp_eio_client_e2e)
4042
(package opentelemetry-client-cohttp-eio)
4143
(deps %{bin:emit1_eio})
44+
(enabled_if
45+
(>= %{ocaml_version} 5.0))
4246
(libraries clients_e2e_lib alcotest opentelemetry opentelemetry.client))
4347

4448
(executable

0 commit comments

Comments
 (0)