-
Notifications
You must be signed in to change notification settings - Fork 1.7k
142 lines (120 loc) · 4.05 KB
/
Copy pathdocs.yml
File metadata and controls
142 lines (120 loc) · 4.05 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
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
name: Documentation
on:
workflow_dispatch:
release:
types: [published]
permissions:
contents: read
concurrency:
group: "pages"
cancel-in-progress: false
env:
EM_VERSION: 3.1.73
jobs:
build-go-docs:
name: Build Go Documentation
runs-on: ubuntu-latest
steps:
- name: Checkout
uses: actions/checkout@v7.0.1
- name: Setup Go
uses: actions/setup-go@v7
with:
go-version: '1.21'
- name: Generate Go Documentation
working-directory: doc
run: |
python3 mk_go_doc.py --output-dir=api/html/go --go-api-path=../src/api/go
- name: Upload Go Documentation
uses: actions/upload-artifact@v7
with:
name: go-docs
path: doc/api/html/go/
retention-days: 1
build-docs:
name: Build Documentation
runs-on: ubuntu-latest
needs: build-go-docs
steps:
- name: Checkout
uses: actions/checkout@v7.0.1
- name: Setup node
uses: actions/setup-node@v7.0.0
with:
node-version: "lts/*"
# Setup OCaml via action
- uses: ocaml/setup-ocaml@v3
with:
ocaml-compiler: 5
opam-disable-sandboxing: true
- name: Install system dependencies
run: |
sudo apt-get update
sudo apt-get install -y doxygen graphviz python3 python3-pip
sudo apt-get install -y \
bubblewrap m4 libgmp-dev pkg-config
- name: Install required opam packages
run: opam install -y ocamlfind zarith
- name: Build Z3 natively for Python documentation
run: |
eval $(opam env)
echo "CC: $CC"
echo "CXX: $CXX"
echo "OCAMLFIND: $(which ocamlfind)"
echo "OCAMLC: $(which ocamlc)"
echo "OCAMLOPT: $(which ocamlopt)"
echo "OCAML_VERSION: $(ocamlc -version)"
echo "OCAMLLIB: $OCAMLLIB"
mkdir build-x64
python3 scripts/mk_make.py --python --ml --build=build-x64
cd build-x64
make -j$(nproc)
- name: Generate Documentation (from doc directory)
working-directory: doc
run: |
eval $(opam env)
python3 mk_api_doc.py --mld --go --output-dir=api --z3py-package-path=../build-x64/python/z3 --build=../build-x64
Z3BUILD=build-x64 python3 mk_params_doc.py
mkdir api/html/ml
ocamldoc -html -d api/html/ml -sort -hide Z3 -I $( ocamlfind query zarith ) -I ../build-x64/api/ml ../build-x64/api/ml/z3enums.mli ../build-x64/api/ml/z3.mli
- name: Setup emscripten
uses: mymindstorm/setup-emsdk@v16
with:
no-install: true
version: ${{env.EM_VERSION}}
actions-cache-folder: "emsdk-cache"
- name: Install dependencies
working-directory: src/api/js
run: npm ci
- name: Build TypeScript
working-directory: src/api/js
run: npm run build:ts
- name: Build wasm
working-directory: src/api/js
run: |
emsdk install ${EM_VERSION}
emsdk activate ${EM_VERSION}
source $(dirname $(which emsdk))/emsdk_env.sh
which node
which clang++
npm run build:wasm
- name: Generate JS Documentation (from doc directory)
working-directory: doc
run: |
eval $(opam env)
python3 mk_api_doc.py --js --go --output-dir=api --mld --z3py-package-path=../build-x64/python/z3 --build=../build-x64
- name: Download Go Documentation
uses: actions/download-artifact@v8.0.1
with:
name: go-docs
path: doc/api/html/go/
- name: Deploy to z3prover.github.io
uses: peaceiris/actions-gh-pages@v4
with:
deploy_key: ${{ secrets.ACTIONS_DEPLOY_KEY }}
external_repository: Z3Prover/z3prover.github.io
destination_dir: ./api
publish_branch: master
publish_dir: ./doc/api
user_name: github-actions[bot]
user_email: github-actions[bot]@users.noreply.github.com