Skip to content

merge master with slight conflicts fixed #1615

merge master with slight conflicts fixed

merge master with slight conflicts fixed #1615

Workflow file for this run

name: CI
on:
[pull_request, push]
jobs:
build:
name: Build
strategy:
matrix:
os: [ 'ubuntu-latest', 'macos-latest' ]
ocaml-version:
- 4.12.1
- 4.13.1
- 4.14.0
runs-on: ${{ matrix.os }}
steps:
- name: Checkout code
uses: actions/checkout@v2
- name: Cache dist fonts
uses: actions/cache@v2
env:
cache-name: cache-dist-fonts
with:
path: lib-satysfi/dist/fonts
key: ${{ env.cache-name }}-${{ hashFiles('download-fonts.sh') }}
- name: Determine the default OPAM Repo
id: determine-default-opam-repo
# See https://docs.github.com/en/actions/reference/context-and-expression-syntax-for-github-actions#runner-context
# and https://github.com/ocaml/setup-ocaml/blob/4ac56b0fd440c3eef30fd1e34c96e0c740a807da/src/constants.ts#L45
run: |
if [ "${{ runner.os }}" = "Windows" ] ; then
DEFAULT_OPAM_REPO="https://github.com/fdopen/opam-repository-mingw.git#opam2"
else
DEFAULT_OPAM_REPO="https://github.com/ocaml/opam-repository.git"
fi
echo "::set-output name=opam-repo-default::$(echo "$DEFAULT_OPAM_REPO")"
- name: Setup OCaml ${{ matrix.ocaml-version }} and pin satysfi
uses: ocaml/setup-ocaml@v2
with:
ocaml-compiler: ${{ matrix.ocaml-version }}
dune-cache: ${{ matrix.os != 'macos-latest' }}
opam-depext: true
opam-pin: true
opam-repositories: |
satysfi-external: https://github.com/gfngfn/satysfi-external-repo.git
default: ${{ steps.determine-default-opam-repo.outputs.opam-repo-default }}
- name: Install SATySFi dependencies
run: |
opam install . --deps-only --with-doc --with-test --verbose
- name: Build SATySFi
run: opam exec -- make all
- name: Run tests
run: |
opam exec -- dune runtest
- name: Install SATySFi
run: |
opam install -y .
if [ -z "$(ls lib-satysfi/dist/fonts)" ]; then
./download-fonts.sh
fi
./install-libs.sh ~/.satysfi
- name: Build demo docs
run: |
(cd demo; opam exec -- make)
(cd doc; opam exec -- make)
(cd tests; opam exec -- make)