this repo has no description
1name: Build
2
3on:
4 - push
5 - pull_request
6
7jobs:
8 build:
9 strategy:
10 fail-fast: false
11 matrix:
12 os:
13 - ubuntu-latest
14 ocaml-compiler:
15 - "4.08"
16 - "4.10"
17 - "4.12"
18 - "4.14"
19 - "5.0"
20 - "5.2"
21 - "5.3"
22 include:
23 - os: ubuntu-latest
24 ocaml-compiler: "5.3"
25 # We don't need to compute coverage for more than one build
26 send-coverage: true
27 # Mdx tests Mdx tests
28 run-mdx: true
29 test-sherlodoc: true
30 - os: macos-latest
31 ocaml-compiler: "5.3"
32 # - os: windows-latest
33 # ocaml-compiler: "5.2"
34
35 runs-on: ${{ matrix.os }}
36
37 steps:
38 - name: Set git to use LF
39 if: runner.os == 'Windows'
40 run: |
41 git config --global core.autocrlf false
42 git config --global core.eol lf
43
44 - name: Checkout tree
45 uses: actions/checkout@v5
46
47 - name: Set-up OCaml ${{ matrix.ocaml-compiler }}
48 uses: ocaml/setup-ocaml@v3
49 with:
50 ocaml-compiler: ${{ matrix.ocaml-compiler }}
51 # Do not pin odoc to not break Mdx installation
52 opam-pin: ${{ matrix.run-mdx != true }}
53
54 - name: Install dependencies
55 run: |
56 opam install --deps-only --with-test ./odoc.opam ./odoc-parser.opam \
57 ${{ matrix.test-sherlodoc && './sherlodoc.opam' }}
58
59 - name: dune runtest
60 if: matrix.test-sherlodoc == true
61 # Run all tests
62 run: opam exec -- dune runtest
63
64 - name: dune runtest
65 if: matrix.test-sherlodoc != true
66 # Run the tests for odoc and odoc-parser only
67 run: opam exec -- dune runtest -p odoc,odoc-parser
68
69 - name: Mdx tests
70 if: matrix.run-mdx == true
71 run: |
72 opam install mdx
73 opam exec -- dune build @runmdx
74
75 - name: Send coverage stats to Coveralls
76 if: matrix.send-coverage == true
77 run: |
78 opam install bisect_ppx
79 mkdir -p $BISECT_FILE
80 opam exec -- dune runtest --instrument-with bisect_ppx --force
81 opam exec -- bisect-ppx-report send-to Coveralls --coverage-path /tmp/coverage
82 env:
83 BISECT_FILE: /tmp/coverage/bisect
84 COVERALLS_REPO_TOKEN: ${{ github.token }}
85 PULL_REQUEST_NUMBER: ${{ github.event.number }}