-
Notifications
You must be signed in to change notification settings - Fork 10
88 lines (73 loc) · 2.39 KB
/
master.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
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
name: Build master in docker
on:
# pull_request:
# branches:
# - 'master'
push:
branches:
- 'master'
paths-ignore:
- 'README.md'
env:
OPAMROOT: /home/opam/.opam
OPAMCONFIRMLEVEL: unsafe-yes
GT_WITH_DOCS: yes
jobs:
build:
strategy:
fail-fast: false
matrix:
os:
- ubuntu-latest
runs-on: ${{ matrix.os }}
container:
image: ocaml/opam:ubuntu-lts-ocaml-4.14
options: --user root # dirty hack
steps:
- name: Cancel Previous Runs
uses: styfle/[email protected]
with:
access_token: ${{ github.token }}
- name: Checkout code
uses: actions/checkout@v4
- run: |
sudo apt-get update
sudo apt-get install pkg-config libpcre2-dev m4 -y
- run: opam --version
- run: |
git config --global --add safe.directory /__w/GT/GT
git submodule update --init
if: false
- run: opam pin add GT . --no-action
- run: opam depext GT --yes #--with-test
- name: Install dependecies for documentation
run: |
sudo apt-get install pkg-config libpcre2-dev -y
#opam install odoc pa_ppx --yes --depext
opam install odoc pa_ppx --yes
- run: opam install . --deps-only #--with-test
- run: opam exec -- dune build --profile=release
- run: opam exec -- dune test --profile=release
- name: Build documentation
run: opam exec -- dune build -p GT @doc
- name: Installing using Opam
run: |
opam exec -- dune build @install
opam exec -- dune install
- name: List files
run: opam show --list-files GT
- name: Deploy documentation
if: ${{ github.event.pull_request.head.repo.full_name == 'PLTools/OCanren' }}
uses: peaceiris/actions-gh-pages@v3
with:
github_token: ${{ secrets.GITHUB_TOKEN }}
publish_dir: ./_build/default/_doc/_html
- name: Send coverage report to Coveralls
run: |
#git config --global --add safe.directory /__w/zanuda/zanuda
opam exec -- make coverage
opam exec -- bisect-ppx-report send-to Coveralls --coverage-path $BISECT_DIR
env:
BISECT_DIR: /tmp/GTcov
COVERALLS_REPO_TOKEN: ${{ secrets.GITHUB_TOKEN }}
PULL_REQUEST_NUMBER: ${{ github.event.number }}