-
Notifications
You must be signed in to change notification settings - Fork 17
84 lines (73 loc) · 2.03 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
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
# Buildability check
# ==================
# Build dolmen using various version of the OCaml compiler
name: build
# Configure when to run the workflows. Currently only when
# it affects the `master` branch (either pushes to the branch,
# or pull request against it).
on:
push:
branches:
- master
pull_request:
branches:
- master
jobs:
# Build workflow
# ==============
# Goal: Ensure the packages builds across all supported
# versions of the ocaml compiler.
build:
runs-on: ${{ matrix.os }}
# Build Matrix
# --------------
strategy:
# Do not cancel other jobs when one fails
fail-fast: false
matrix:
# Operating system to run tests on.
os:
- ubuntu-latest
# Ocaml versions to use
ocaml-version:
- ocaml-base-compiler.5.2.0
# Build ENV
# ---------
env:
# Ensure opam will not stop because it waits on some user input
OPAMYES: "true"
# Build/test steps
# ----------------
steps:
# checkout the repo (full clone, necessary for push later)
- name: Checkout the repo
uses: actions/checkout@v3
# Setup ocaml/opam
- name: Setup ocaml/opam
uses: avsm/setup-ocaml@v2
with:
ocaml-compiler: ${{ matrix.ocaml-version }}
# Run opam udpate to get an up-to-date repo
- name: Update opam repo
run: opam update
# Install ocaml deps
- name: Install Ocaml deps
run: opam install . --deps-only --with-test --with-doc
# Build the package
- name: Build the package
run: opam exec -- make
# Check the tests
- name: Build the examples
run: opam exec -- make test
# Check the doc builds
- name: Build the doc
run: opam exec -- make doc
# Update the doc
# --------------
- name: Deploy the dev documentation
uses: JamesIves/[email protected]
if: github.ref == 'refs/heads/master'
with:
branch: gh-pages
folder: _build/default/_doc/_html
target-folder: dev