Skip to content
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
65 changes: 65 additions & 0 deletions .github/workflows/workflow.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,65 @@
name: Main workflow

on:
- pull_request
- push

jobs:
build:
strategy:
fail-fast: false
matrix:
os:
- macos-latest
- ubuntu-latest
ocaml-version:
- 4.08.x
- 4.09.x
- 4.10.x
- 4.11.x

runs-on: ${{ matrix.os }}

steps:
- name: Checkout code
uses: actions/checkout@v2

- name: Use OCaml ${{ matrix.ocaml-version }}
uses: actions-ml/setup-ocaml@master
with:
ocaml-version: ${{ matrix.ocaml-version }}
dune-cache: true
opam-depext: false
opam-pin: false

- run: |
opam pin add cohttp-async.dev . --no-action
opam pin add cohttp-lwt-jsoo.dev . --no-action
opam pin add cohttp-lwt-unix-nossl.dev . --no-action
opam pin add cohttp-lwt-unix-ssl.dev . --no-action
opam pin add cohttp-lwt-unix.dev . --no-action
opam pin add cohttp-lwt.dev . --no-action
opam pin add cohttp-mirage.dev . --no-action
opam pin add cohttp-top.dev . --no-action
opam pin add cohttp.dev . --no-action

- run: |
opam depext --yes \
cohttp \
cohttp-async \
cohttp-lwt \
cohttp-lwt-jsoo \
cohttp-lwt-unix \
cohttp-lwt-unix-nossl \
cohttp-lwt-unix-ssl \
cohttp-mirage \
cohttp-top \

- run: echo "PKG_CONFIG_PATH=$(brew --prefix openssl)/lib/pkgconfig" >>"$GITHUB_ENV"
if: ${{ matrix.os == 'macos-latest' }}

- run: opam install . --deps-only --with-doc --with-test --yes

- run: opam exec -- make build

- run: opam exec -- make test