Skip to content

Merge pull request #17 from toots/fix-tests #288

Merge pull request #17 from toots/fix-tests

Merge pull request #17 from toots/fix-tests #288

Workflow file for this run

name: Build
on:
pull_request:
push:
jobs:
build:
strategy:
fail-fast: false
matrix:
os:
# - macos-latest
- ubuntu-latest
# - windows-latest
ocaml-compiler:
- 4.14.x
- 5.x
runs-on: ${{ matrix.os }}
steps:
- run: |
sudo apt-get update
- name: Checkout code
uses: actions/checkout@v2
- name: Use OCaml ${{ matrix.ocaml-compiler }}
uses: ocaml/setup-ocaml@v3
with:
ocaml-compiler: ${{ matrix.ocaml-compiler }}
- run: opam install . --deps-only --with-test
- run: opam exec -- dune build --profile release
- run: opam exec -- dune runtest
# Build and deploy release build that uses js-of-ocaml instead of wasm-of-ocaml
- run: |
cp bin/web/dune-for-js bin/web/dune
opam exec -- dune build --profile release --build-dir _build-js
cp -r _build-js/default/bin/web _build/default/bin/web/js
- name: Deploy website
uses: peaceiris/actions-gh-pages@v3
if: ${{ github.ref == 'refs/heads/main' }}
with:
github_token: ${{ secrets.GITHUB_TOKEN }}
publish_dir: _build/default/bin/web