-
Notifications
You must be signed in to change notification settings - Fork 76
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Only test latest OCaml 4 and OCaml 5, the other versions are too old and unsupported.
- Loading branch information
Showing
1 changed file
with
18 additions
and
56 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,77 +1,39 @@ | ||
name: build | ||
name: Builds, tests & co | ||
|
||
on: | ||
- push | ||
- pull_request | ||
|
||
jobs: | ||
builds: | ||
name: Earliest Supported Version | ||
strategy: | ||
fail-fast: false | ||
matrix: | ||
os: | ||
- ubuntu-latest | ||
ocaml-version: | ||
- 4.04.0 | ||
|
||
runs-on: ${{ matrix.os }} | ||
permissions: read-all | ||
|
||
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 }} | ||
|
||
- name: Deps | ||
run: | | ||
opam pin add -n angstrom . | ||
opam install --deps-only angstrom | ||
- name: Build | ||
run: opam exec -- dune build -p angstrom | ||
|
||
tests: | ||
name: Tests | ||
jobs: | ||
build: | ||
strategy: | ||
fail-fast: false | ||
matrix: | ||
os: | ||
- ubuntu-latest | ||
ocaml-version: | ||
- 4.08.1 | ||
- 4.10.2 | ||
- 4.11.2 | ||
- 4.12.0 | ||
- macos-latest | ||
- windows-latest | ||
ocaml-compiler: | ||
- 4 | ||
- 5 | ||
|
||
runs-on: ${{ matrix.os }} | ||
|
||
steps: | ||
- name: Checkout code | ||
uses: actions/checkout@v2 | ||
- name: Checkout tree | ||
uses: actions/checkout@v4 | ||
|
||
- name: Use OCaml ${{ matrix.ocaml-version }} | ||
uses: avsm/setup-ocaml@v1 | ||
- name: Set-up OCaml | ||
uses: ocaml/setup-ocaml@v3 | ||
with: | ||
ocaml-version: ${{ matrix.ocaml-version }} | ||
ocaml-compiler: ${{ matrix.ocaml-compiler }} | ||
|
||
- name: Deps | ||
run: | | ||
opam pin add -n angstrom . | ||
opam pin add -n angstrom-async . | ||
opam pin add -n angstrom-lwt-unix . | ||
opam install -t --deps-only . | ||
- run: opam install . --deps-only --with-test | ||
|
||
- name: Build | ||
run: opam exec -- dune build | ||
- run: opam exec -- dune build | ||
|
||
- name: Test | ||
run: opam exec -- dune runtest | ||
- run: opam exec -- dune runtest | ||
|
||
- name: Examples | ||
run: | | ||
opam install -t angstrom-async angstrom-lwt-unix | ||
opam exec -- make examples | ||
- run: opam exec -- make examples |