linol/.github/workflows/main.yml
2024-05-22 10:20:24 -04:00

35 lines
929 B
YAML

name: build
on:
push:
branches:
- main
pull_request:
jobs:
run:
name: Build
strategy:
matrix:
os:
- ubuntu-latest
#- macos-latest
#- windows-latest
ocaml-compiler:
- 4.14.x
- 5.1.x
runs-on: ${{ matrix.os }}
steps:
- uses: actions/checkout@main
- uses: ocaml/setup-ocaml@v2
with:
ocaml-compiler: ${{ matrix.ocaml-compiler }}
dune-cache: true
allow-prerelease-opam: true
- run: opam pin -n .
- run: opam depext -yt linol linol-lwt
- run: opam install -t . --deps-only
- run: opam exec -- dune build
if: ${{ matrix.ocaml-compiler == '5.1.x' }}
- run: opam exec -- dune build -p linol,linol-lwt
if: ${{ matrix.ocaml-compiler == '4.14.x' }}
- run: opam exec -- dune runtest
if: ${{ matrix.os == 'ubuntu-latest' && matrix.ocaml-compiler == '5.1.x' }}