mirror of
https://github.com/c-cube/ocaml-containers.git
synced 2025-12-06 03:05:28 -05:00
53 lines
1.3 KiB
YAML
53 lines
1.3 KiB
YAML
name: Build and test
|
|
|
|
on:
|
|
push:
|
|
branches:
|
|
- master
|
|
pull_request:
|
|
branches:
|
|
- master
|
|
|
|
jobs:
|
|
run:
|
|
name: Build
|
|
strategy:
|
|
fail-fast: false
|
|
matrix:
|
|
os:
|
|
- macos-latest
|
|
- ubuntu-latest
|
|
- windows-latest
|
|
ocaml-compiler:
|
|
- '4.03.x'
|
|
- '4.08.x'
|
|
- '4.13.x'
|
|
|
|
runs-on: ${{ matrix.os }}
|
|
steps:
|
|
- uses: actions/checkout@v2
|
|
- name: Use OCaml ${{ matrix.ocaml-compiler }}
|
|
uses: ocaml/setup-ocaml@v2
|
|
with:
|
|
ocaml-compiler: ${{ matrix.ocaml-compiler }}
|
|
|
|
- run: opam pin -n .
|
|
|
|
- run: opam depext -yt containers containers-data containers-thread
|
|
|
|
- run: opam install -t containers containers-data containers-thread --deps-only
|
|
if: matrix.os == 'ubuntu-latest'
|
|
|
|
- run: |
|
|
opam install -t containers --deps-only ;
|
|
opam install containers-data containers-thread --deps-only # no test deps
|
|
if: matrix.os != 'ubuntu-latest'
|
|
|
|
- run: opam exec -- dune build '@install'
|
|
|
|
- run: opam exec -- dune runtest
|
|
if: ${{ matrix.os == 'ubuntu-latest' }}
|
|
|
|
- run: opam exec -- dune runtest -j 1 -p containers # test only core on non-ubuntu platform
|
|
if: ${{ matrix.os != 'ubuntu-latest' }}
|
|
|