moonpool/.github/workflows/main.yml
2026-04-07 22:09:22 -04:00

65 lines
1.8 KiB
YAML

name: build
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:
container:
- ghcr.io/c-cube/c-cube-commmon/ci-5.0:latest
- ghcr.io/c-cube/c-cube-commmon/ci-5.4:latest
runs-on: ubuntu-latest
container: ${{ matrix.container }}
steps:
- uses: actions/checkout@v6
- run: opam pin picos 0.6.0 -y -n
- run: opam install -t . --deps-only
- run: opam exec -- dune build @install
# install some depopts
- run: opam install thread-local-storage trace hmap ambient-context.0.2
- run: opam exec -- dune build --profile=release --force @install @runtest
compat:
name: build-compat # compat with other OSes
needs: run # only run this if cheap linux job passed
timeout-minutes: 15
strategy:
fail-fast: true
matrix:
os:
- macos-latest
#- windows-latest
ocaml-compiler:
- '5.2'
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
# temporary until it's in a release
- run: opam pin https://github.com/ocaml-multicore/picos.git -y -n
- run: opam pin -y -n lwt 5.9.2
- run: opam install -t moonpool moonpool-lwt --deps-only
- run: opam exec -- dune build @install
# install some depopts
- run: opam pin -y -n lwt 6.1.1
- run: opam install thread-local-storage trace domain-local-await
- run: opam exec -- dune build --profile=release --force @install @runtest