chore: CI

This commit is contained in:
Simon Cruanes 2024-04-01 15:38:53 -04:00
parent 81b272e685
commit 7a558bb5f3
No known key found for this signature in database
GPG key ID: EBFFF6F283F3A2B4
2 changed files with 53 additions and 0 deletions

View file

@ -44,3 +44,50 @@ jobs:
- run: opam exec -- dune build --profile=release --force @install @runtest - run: opam exec -- dune build --profile=release --force @install @runtest
compat:
name: build-compat
timeout-minutes: 15
strategy:
fail-fast: true
matrix:
os:
- ubuntu-latest
- macos-latest
- windows-latest
ocaml-compiler:
- '5.1'
runs-on: ${{ matrix.os }}
steps:
- uses: actions/checkout@main
- name: Use OCaml ${{ matrix.ocaml-compiler }}
uses: ocaml/setup-ocaml@v2
with:
ocaml-compiler: ${{ matrix.ocaml-compiler }}
dune-cache: true
allow-prerelease-opam: true
- run: opam install -t moonpool moonpool-lwt --deps-only
- run: opam exec -- dune build @install
# install some depopts
- run: opam install thread-local-storage trace domain-local-await
- run: opam exec -- dune build --profile=release --force @install @runtest
format:
name: format
strategy:
matrix:
ocaml-compiler:
- '5.1'
runs-on: 'ubuntu-latest'
steps:
- uses: actions/checkout@main
- name: Use OCaml ${{ matrix.ocaml-compiler }}
uses: ocaml/setup-ocaml@v2
with:
ocaml-compiler: ${{ matrix.ocaml-compiler }}
dune-cache: true
allow-prerelease-opam: true
- run: opam install ocamlformat.0.24.1
- run: opam exec -- make format-check

View file

@ -15,6 +15,12 @@ doc:
build-dev: build-dev:
dune build @install @runtest $(DUNE_OPTS) --workspace=dune-workspace.dev dune build @install @runtest $(DUNE_OPTS) --workspace=dune-workspace.dev
format:
@dune build $(DUNE_OPTS) @fmt --auto-promote
format-check:
@dune build $(DUNE_OPTS) @fmt --display=quiet
WATCH?= @check @runtest WATCH?= @check @runtest
watch: watch:
dune build $(DUNE_OPTS) -w $(WATCH) dune build $(DUNE_OPTS) -w $(WATCH)