-
Notifications
You must be signed in to change notification settings - Fork 0
77 lines (62 loc) · 2.24 KB
/
Copy pathmaster.yml
File metadata and controls
77 lines (62 loc) · 2.24 KB
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
71
72
73
74
75
76
name: Build master
on:
push:
paths-ignore:
- 'papers/**'
# do not run CI if we are writing a paper
# https://docs.github.com/en/actions/reference/workflow-syntax-for-github-actions#example-ignoring-paths
branches:
- 'master'
#schedule:
# - cron: "0 13 * * 1"
# https://jasonet.co/posts/scheduled-actions/
env:
OPAMROOT: /home/user/.opam
OPAMCONFIRMLEVEL: unsafe-yes
jobs:
build:
runs-on: ubuntu-latest
container:
image: kakadu18/ocaml:pltools
options: --user user
concurrency:
group: ${{ github.workflow }}-${{ github.ref }}
cancel-in-progress: true
steps:
- run: opam --version
- run: opam exec -- ocamlopt --version
- name: Checkout code
uses: actions/checkout@v4
- run: opam update
- name: Install dependencies
run: opam install . --yes --deps-only --with-test --with-doc
- run: opam exec -- dune build
- run: opam exec -- dune runtest
- name: Build and Test in Release
run: |
opam exec -- dune build @all @check --profile=release
opam exec -- dune build @runtest --profile=release
#### API documentation
- name: Build API documentation
run: |
opam exec -- dune b @install --profile=release
opam exec -- dune install
opam exec -- odig odoc --odoc-theme=odig.gruvbox.light --no-tag-index --no-pkg-deps ${{ env.latest }}
echo "DOCS_PATH=$(opam exec -- odig cache path)/html" >> $GITHUB_ENV
- run: ls $(opam exec -- odig cache path)/html
- run: ls $(opam exec -- odig cache path)/html/ostap
- name: Deploy API documentation
#if: ${{ github.event.pull_request.head.repo.full_name == 'PLTools/OCanren' }}
#if: false
# We do not deploy in forks
uses: peaceiris/actions-gh-pages@v4
with:
github_token: ${{ secrets.GITHUB_TOKEN }}
publish_dir: ${{ env.DOCS_PATH }}
destination_dir: api
#### Check that installed ostap works
- run: |
opam exec -- dune install
opam show ostap --list-files
- run: |
opam exec -- ocamlfind c -i -syntax camlp5o -package ostap,GT.syntax,GT.syntax.all,ostap.syntax tests/test100.ml