Skip to content

Update ocaml/setup-ocaml to v3 #2302

Update ocaml/setup-ocaml to v3

Update ocaml/setup-ocaml to v3 #2302

Workflow file for this run

name: Build
on:
- push
- pull_request
jobs:
build:
strategy:
fail-fast: false
matrix:
os:
- ubuntu-latest
- macos-latest
- windows-latest
ocaml-compiler:
- 4
- 5
include:
- os: ubuntu-latest
# We don't need to run lower bound test for more than one build
ocaml-compiler: "4.02"
- os: ubuntu-latest
ocaml-compiler: 5
# We don't need to compute coverage for more than one build
send-coverage: true
# Mdx tests Mdx tests
run-mdx: true
runs-on: ${{ matrix.os }}
steps:
- name: Set git to use LF
if: runner.os == 'Windows'
run: |
git config --global core.autocrlf false
git config --global core.eol lf
- name: Checkout tree
uses: actions/checkout@v4
- name: Setup OCaml ${{ matrix.ocaml-compiler }}
uses: ocaml/setup-ocaml@v3
with:
ocaml-compiler: ${{ matrix.ocaml-compiler }}
# Do not pin odoc to not break Mdx installation
opam-pin: ${{ matrix.run-mdx != true }}
- name: Install dependencies
run: opam install --deps-only --with-test odoc odoc-parser
- name: dune runtest
run: opam exec -- dune runtest
- name: Mdx tests
if: matrix.run-mdx == true
run: |
opam install mdx
opam exec -- dune build @runmdx
- name: Send coverage stats to Coveralls
if: matrix.send-coverage == true
run: |
opam install bisect_ppx
mkdir -p $BISECT_FILE
opam exec -- dune runtest --instrument-with bisect_ppx --force
opam exec -- bisect-ppx-report send-to Coveralls --coverage-path /tmp/coverage
env:
BISECT_FILE: /tmp/coverage/bisect
COVERALLS_REPO_TOKEN: ${{ github.token }}
PULL_REQUEST_NUMBER: ${{ github.event.number }}