Skip to content

Commit bd1d980

Browse files
committed
Add GitHub Actions CI workflow
Build matrix: ubuntu-latest + macos-latest x OCaml 5.0 / 5.4. Plus an opam lint job. Modelled after the workflow shipped by html_of_wiki. Windows is intentionally excluded: the build relies on POSIX make and the pcre/lwt dependencies are not exercised on the win32 runner here.
1 parent e2dafea commit bd1d980

2 files changed

Lines changed: 50 additions & 0 deletions

File tree

.github/workflows/workflow.yml

Lines changed: 48 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,48 @@
1+
name: Main workflow
2+
3+
on:
4+
pull_request:
5+
push:
6+
schedule:
7+
# Prime the caches every Monday
8+
- cron: 0 1 * * MON
9+
10+
jobs:
11+
build:
12+
strategy:
13+
fail-fast: false
14+
matrix:
15+
os:
16+
- ubuntu-latest
17+
- macos-latest
18+
ocaml-compiler:
19+
- "5.0"
20+
- "5.4"
21+
22+
runs-on: ${{ matrix.os }}
23+
24+
steps:
25+
- name: Checkout tree
26+
uses: actions/checkout@v4
27+
28+
- name: Set-up OCaml
29+
uses: ocaml/setup-ocaml@v3
30+
with:
31+
ocaml-compiler: ${{ matrix.ocaml-compiler }}
32+
33+
- run: opam install . --deps-only
34+
35+
- run: opam exec -- make all
36+
37+
lint-opam:
38+
runs-on: ubuntu-latest
39+
steps:
40+
- name: Checkout tree
41+
uses: actions/checkout@v4
42+
43+
- name: Set-up OCaml
44+
uses: ocaml/setup-ocaml@v3
45+
with:
46+
ocaml-compiler: "5.4"
47+
48+
- uses: ocaml/setup-ocaml/lint-opam@v3

CHANGES

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -13,3 +13,5 @@
1313
* Add LICENSE / LICENSE.GPL-2 / LICENSE.QPL-1.0 documenting the
1414
per-component licensing (latex_of_wiki under GPL-2-or-later,
1515
odoc_wiki under QPL-1.0 as a derivative of the ocamldoc generators).
16+
* Add a GitHub Actions workflow building on Ubuntu and macOS against
17+
OCaml 5.0 and 5.4, plus an opam lint job.

0 commit comments

Comments
 (0)