From 1ec2eed82f5c6eb42676c4c8cdb981fe2388fa48 Mon Sep 17 00:00:00 2001 From: Arthur Bit-Monnot Date: Mon, 2 Nov 2020 18:01:44 +0100 Subject: [PATCH] Add github actions workflow --- .github/workflows/workflow.yml | 47 ++++++++++++++++++++++++++++++++++ 1 file changed, 47 insertions(+) create mode 100644 .github/workflows/workflow.yml diff --git a/.github/workflows/workflow.yml b/.github/workflows/workflow.yml new file mode 100644 index 0000000..645d1dc --- /dev/null +++ b/.github/workflows/workflow.yml @@ -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 +