-
Notifications
You must be signed in to change notification settings - Fork 5
58 lines (47 loc) · 1.68 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
name: Test compilation
on: [push, pull_request]
# Prevent parallel CI: Stop every workflow of a branch
concurrency:
cancel-in-progress: true
group: ${{ github.ref }}
jobs:
build:
runs-on: ubuntu-latest
steps:
- name: Get branch name
shell: bash
run: echo "##[set-output name=branch;]$(echo ${GITHUB_REF#refs/heads/})"
id: get_branch
- name: Checkout code
uses: actions/checkout@v3
with:
submodules: true
- name: Install OCaml
uses: avsm/setup-ocaml@v2
with:
ocaml-compiler: 4.14
opam-repositories: |
coq-released: https://coq.inria.fr/opam/released
default: https://github.com/ocaml/opam-repository.git
- name: Install Coq and Iris
run: opam install . --deps-only -y
- name: Build
run: |
find ./theories -name "*.v" -exec ./disable-qed.sh {} +;
opam exec -- make pretty-timed -j2
- name: Build docs
run: opam exec -- make coqdoc
- name: Deploy docs (if main branch)
uses: peaceiris/actions-gh-pages@v3
if: ${{ steps.get_branch.outputs.branch == 'main' }}
with:
github_token: ${{ secrets.GITHUB_TOKEN }}
publish_dir: ./html
destination_dir: dev
- name: Deploy docs (if non-main branch and non-journal branch)
uses: peaceiris/actions-gh-pages@v3
if: ${{ steps.get_branch.outputs.branch != 'main' && (steps.get_branch.outputs.branch != 'journal') }}
with:
github_token: ${{ secrets.GITHUB_TOKEN }}
publish_dir: ./html
destination_dir: branch/${{ steps.get_branch.outputs.branch }}