-
Notifications
You must be signed in to change notification settings - Fork 3
48 lines (37 loc) · 1.07 KB
/
main.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
name: CI
on:
- pull_request
- push
jobs:
build:
strategy:
fail-fast: false
matrix:
os:
- ubuntu-latest
ocaml-version:
- 5.2.0
- 5.1.1
- 4.14.1
- 4.10.1
runs-on: ${{ matrix.os }}
steps:
- name: Checkout code
uses: actions/checkout@v2
- name: Use OCaml ${{ matrix.ocaml-version }}
uses: avsm/setup-ocaml@v1
with:
ocaml-version: ${{ matrix.ocaml-version }}
- run: opam pin add . --no-action
- run: opam install . --deps-only --with-doc --with-test
- run: opam exec -- dune build
- run: opam exec -- dune runtest
- run: opam exec -- dune build @doc
- name: Deploy to GitHub Pages
if: ${{ matrix.os == 'ubuntu-latest' && matrix.ocaml-version == '4.14.1' && github.ref == 'refs/heads/master' }}
uses: crazy-max/ghaction-github-pages@v2
with:
target_branch: gh-pages
build_dir: _build/default/_doc/_html/
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}