nanoev/.github/workflows/main.yml
Simon Cruanes 7105cf4234
CI
2025-02-16 22:05:43 -05:00

61 lines
1.4 KiB
YAML

name: Build and Test
on:
push:
branches:
- main
pull_request:
jobs:
run:
name: build # build+test on various versions of OCaml, on linux
timeout-minutes: 15
strategy:
fail-fast: true
matrix:
os:
- ubuntu-latest
ocaml-compiler:
- '5.0'
- '5.3'
runs-on: ${{ matrix.os }}
steps:
- uses: actions/checkout@main
- name: Use OCaml ${{ matrix.ocaml-compiler }}
uses: ocaml/setup-ocaml@v3
with:
ocaml-compiler: ${{ matrix.ocaml-compiler }}
dune-cache: true
allow-prerelease-opam: true
- run: opam pin picos 0.6.0 -y -n
- run: opam install picos
- run: opam install -t --deps-only .
- run: opam exec -- dune build @install
# install some depopts and test deps
- run: opam install -t trace
- run: opam exec -- dune build --profile=release --force @install @runtest
format:
name: format
strategy:
matrix:
ocaml-compiler:
- '5.2'
runs-on: 'ubuntu-latest'
steps:
- uses: actions/checkout@main
- name: Use OCaml ${{ matrix.ocaml-compiler }}
uses: ocaml/setup-ocaml@v3
with:
ocaml-compiler: ${{ matrix.ocaml-compiler }}
dune-cache: true
allow-prerelease-opam: true
- run: opam install ocamlformat.0.26.2
- run: opam exec -- make format-check