-
Notifications
You must be signed in to change notification settings - Fork 90
62 lines (51 loc) · 1.63 KB
/
build.yml
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
name: "Build"
on:
- push
- pull_request
jobs:
build: # Check build on various OSes
strategy:
matrix:
os:
- macos-latest
- ubuntu-latest
# - windows-latest Windows doesn't work yet
ocaml-compiler:
# Don't include every versions. OCaml-CI already covers that
- 4.12.x
include:
- os: ubuntu-latest # Enable coverage only on a single build
send-coverage: true
fail-fast: false
runs-on: ${{ matrix.os }}
steps:
# Clone the project
- uses: actions/checkout@v2
# Setup
- name: Setup OCaml ${{ matrix.ocaml-version }}
uses: ocaml/setup-ocaml@v2
with:
# Do not pin odoc to not break Mdx installation
opam-pin: false
ocaml-compiler: ${{ matrix.ocaml-compiler }}
opam-local-packages: |
odoc.opam
- name: Install dependencies
run: opam install -y --deps-only -t ./odoc.opam
- name: Install bisect_ppx
run: opam install bisect_ppx
- name: dune runtest
run: opam exec -- dune runtest
# Run Mdx tests that are disabled by default.
- name: Mdx tests
run: |
opam install -y mdx
opam exec -- dune build @runmdx
- name: Send coverage stats to Coveralls
if: matrix.send-coverage == true
run: |
opam exec -- dune runtest --instrument-with bisect_ppx --force
opam exec -- bisect-ppx-report send-to Coveralls
env:
COVERALLS_REPO_TOKEN: ${{ secrets.GITHUB_TOKEN }}
PULL_REQUEST_NUMBER: ${{ github.event.number }}