name: build on: pull_request: push: branches: - main jobs: build: strategy: fail-fast: false matrix: os: - ubuntu-latest #- windows-latest #- macos-latest ocaml-compiler: - 4.08.x - 4.13.x - 5.0.x - 5.3.x runs-on: ${{ matrix.os }} steps: - name: Checkout code uses: actions/checkout@v4 with: submodules: recursive # needed for depext to work - run: sudo apt-get update && sudo apt-get install mccs if: ${{ matrix.os == 'ubuntu-latest' }} - name: Use OCaml ${{ matrix.ocaml-compiler }} uses: ocaml/setup-ocaml@v3 with: ocaml-compiler: ${{ matrix.ocaml-compiler }} opam-depext-flags: --with-test dune-cache: true allow-prerelease-opam: true - run: | opam pin pbrt 4.0 -y -n opam install pbrt -y # We cannot install packages that need eio on ocaml versions before 5 - 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 - run: opam install . --deps-only --with-test --solver=mccs if: ${{ startsWith(matrix.ocaml-compiler, '5') }} - run: opam exec -- dune build @install -p opentelemetry,opentelemetry-client,opentelemetry-lwt,opentelemetry-client-ocurl,opentelemetry-cohttp-lwt,opentelemetry-client-cohttp-lwt,opentelemetry-logs - run: opam pin trace https://github.com/c-cube/ocaml-trace.git#b132951644884ce204aeee3ba1d3c1ba79442f2f -y -n - run: opam install trace - run: opam exec -- dune build @install -p opentelemetry - run: opam install ocaml-protoc - run: opam exec -- dune build @lint # check that nothing changed - run: git diff --exit-code - run: opam exec -- dune build @runtest if: ${{ matrix.os == 'ubuntu-latest' }}