-
Notifications
You must be signed in to change notification settings - Fork 5
70 lines (59 loc) · 1.65 KB
/
build.yml
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
name: CI
on: [push, pull_request]
env:
OCAML_VERSION: 4.11.0
CACHE_KEY: opam-8.16-${{github.base_ref}}-${{github.ref}}
jobs:
build-deps:
runs-on: ubuntu-latest
steps:
- name: Try to restore build cache
id: cache
uses: actions/cache@v2
with:
path: "~/.opam"
key: ${{env.CACHE_KEY}}
restore-keys: |
opam-8.16--refs/heads/${{github.base_ref}}
- name: Install OCaml
uses: avsm/setup-ocaml@v1
with:
ocaml-version: ${{env.OCAML_VERSION}}
- name: Checkout code
if: steps.cache.outputs.cache-hit != 'true'
uses: actions/checkout@v2
with:
fetch-depth: 1
- name: Build dependencies
if: steps.cache.outputs.cache-hit != 'true'
run: |
opam repo add coq-released https://coq.inria.fr/opam/released
opam update
opam upgrade
opam install . --deps-only --with-doc --with-test
opam list --installed
build-full:
needs: build-deps
runs-on: ubuntu-latest
steps:
- name: Restore build cache
id: cache
uses: actions/cache@v2
with:
path: "~/.opam"
key: ${{env.CACHE_KEY}}
- name: Check sucess of cache restoration
if: steps.cache.outputs.cache-hit != 'true'
run: exit
- name: Install OCaml
uses: avsm/setup-ocaml@v1
with:
ocaml-version: ${{env.OCAML_VERSION}}
- name: Checkout code
uses: actions/checkout@v2
with:
fetch-depth: 1
- name: Build interfaces (vos)
run: opam exec -- make -j 2 vos TIMED=1
- name: Build full (vo)
run: opam exec -- make -j 2 all TIMED=1