Browse Source

Add github actions workflow

Arthur Bit-Monnot 3 years ago
parent
commit
1ec2eed82f
1 changed files with 47 additions and 0 deletions
  1. 47
    0
      .github/workflows/workflow.yml

+ 47
- 0
.github/workflows/workflow.yml View File

@@ -0,0 +1,47 @@
1
+name: Basic test workflow
2
+
3
+on:
4
+  - pull_request
5
+  - push
6
+
7
+jobs:
8
+  build:
9
+    strategy:
10
+      fail-fast: false
11
+      matrix:
12
+        os:
13
+#          - macos-latest
14
+#          - ubuntu-latest
15
+#          - windows-latest
16
+          - ubuntu-18.04
17
+        ocaml-version:
18
+          - 4.11.0
19
+#          - 4.10.1
20
+#          - 4.09.1
21
+#          - 4.08.1
22
+
23
+    runs-on: ${{ matrix.os }}
24
+
25
+    steps:
26
+      - name: Checkout code
27
+        uses: actions/checkout@v2
28
+
29
+      - name: Try to restore opam cache
30
+        if: runner.os != 'Windows'
31
+        id: opam-cache
32
+        uses: actions/cache@v2
33
+        with:
34
+          path: "~/.opam"
35
+          key: ${{ matrix.os }}-${{ matrix.ocaml-version }}  
36
+
37
+      - name: Use OCaml ${{ matrix.ocaml-version }}
38
+        uses: avsm/setup-ocaml@v1
39
+        with:
40
+          ocaml-version: ${{ matrix.ocaml-version }}
41
+
42
+      - run: opam install ocamlbuild
43
+      - name: Build project
44
+        run: eval $(opam env) && make build
45
+      - name: Run demo
46
+        run: eval $(opam env) && make demo
47
+

Loading…
Cancel
Save