Merge pull request #95 from ocaml-wasm/wasm #21
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
name: CI | |
on: | |
pull_request: | |
branches: | |
- master | |
push: | |
branches: | |
- master | |
jobs: | |
build: | |
strategy: | |
fail-fast: false | |
matrix: | |
os: | |
- macos-latest | |
- ubuntu-latest | |
ocaml-version: | |
- 4.11.1 | |
runs-on: ${{ matrix.os }} | |
steps: | |
- name: Checkout code | |
uses: actions/checkout@v2 | |
- name: Retrieve opam cache | |
uses: actions/cache@v2 | |
id: cache-opam | |
with: | |
path: ~/.opam | |
key: v1-${{ runner.os }}-opam-${{ matrix.ocaml-version }}-${{ hashFiles('dune-project') }} | |
restore-keys: | | |
v1-${{ runner.os }}-opam-${{ matrix.ocaml-version }}- | |
- name: Use OCaml ${{ matrix.ocaml-version }} | |
uses: avsm/setup-ocaml@v1 | |
with: | |
ocaml-version: ${{ matrix.ocaml-version }} | |
- name: Install opam packages | |
if: steps.cache-opam.outputs.cache-hit != 'true' | |
run: | | |
opam update | |
opam install . --deps-only --with-doc --with-test | |
opam install $(opam show -f depopts: . | sed -e 's/{.*}//g' -e 's/"//g') | |
- name: Check the consistency of installed opam packages | |
if: steps.cache-opam.outputs.cache-hit == 'true' | |
run: opam upgrade --fixup | |
- name: Run build | |
run: opam exec -- make build |