Add github actions workflow

This commit is contained in:
Arthur Bit-Monnot 2020-11-02 18:01:44 +01:00
parent 5782042b22
commit 1ec2eed82f

47
.github/workflows/workflow.yml vendored Normal file
View file

@ -0,0 +1,47 @@
name: Basic test workflow
on:
- pull_request
- push
jobs:
build:
strategy:
fail-fast: false
matrix:
os:
# - macos-latest
# - ubuntu-latest
# - windows-latest
- ubuntu-18.04
ocaml-version:
- 4.11.0
# - 4.10.1
# - 4.09.1
# - 4.08.1
runs-on: ${{ matrix.os }}
steps:
- name: Checkout code
uses: actions/checkout@v2
- name: Try to restore opam cache
if: runner.os != 'Windows'
id: opam-cache
uses: actions/cache@v2
with:
path: "~/.opam"
key: ${{ matrix.os }}-${{ matrix.ocaml-version }}
- name: Use OCaml ${{ matrix.ocaml-version }}
uses: avsm/setup-ocaml@v1
with:
ocaml-version: ${{ matrix.ocaml-version }}
- run: opam install ocamlbuild
- name: Build project
run: eval $(opam env) && make build
- name: Run demo
run: eval $(opam env) && make demo