forked from openvinotoolkit/openvino
-
Notifications
You must be signed in to change notification settings - Fork 0
142 lines (124 loc) · 4.16 KB
/
build_doc.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
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: [push, pull_request]
env:
DOXY_VER: '1.9.6'
concurrency:
group: ${{ github.workflow }}-${{ github.ref }}
cancel-in-progress: true
jobs:
Build_Doc:
if: github.repository == 'openvinotoolkit/openvino'
runs-on: ubuntu-22.04
steps:
- name: Clone OpenVINO
uses: actions/checkout@v2
with:
submodules: true
lfs: true
# cache from ccache
- name: Cache ccache
id: cache_restore
uses: actions/cache@v3
with:
path: .ccache
key: doc-ccache-cache
- name: Install ccache
uses: hendrikmuhs/[email protected]
with:
key: doc-ccache-cache
save: false
# cache from doxygen build
- name: Cache doxygen make
id: cache_doxygen_make
uses: actions/cache@v3
with:
path: doxygen-build
key: build-doxygen-cache
# cache from python packages
- name: Cache python requirements
id: cache_python_requirements
uses: actions/cache@v3
with:
path: ~/.cache/pip
key: doc-python-requirements
- name: Install apt-get tools
uses: awalsh128/[email protected]
# install doc dependencies
with:
packages: graphviz texlive liblua5.2-0
version: 3.0
- name: Install dependencies
run: |
set -e
python3 -m pip install -r docs/requirements.txt --user
cd docs/openvino_sphinx_theme
python3 setup.py install --user
cd ../openvino_custom_sphinx_sitemap
python3 setup.py install --user
cd ../..
# install doxyrest
wget https://github.com/vovkos/doxyrest/releases/download/doxyrest-2.1.3/doxyrest-2.1.3-linux-amd64.tar.xz
tar -xf doxyrest-2.1.3-linux-amd64.tar.xz
echo "$(pwd)/doxyrest-2.1.3-linux-amd64/bin/" >> $GITHUB_PATH
# install doxygen
wget https://www.doxygen.nl/files/doxygen-$DOXY_VER.linux.bin.tar.gz
tar -xzf doxygen-$DOXY_VER.linux.bin.tar.gz
echo "$(pwd)/doxygen-$DOXY_VER/bin/" >> $GITHUB_PATH
- name: CMake doc
run: |
cmake \
-DCMAKE_C_COMPILER_LAUNCHER=ccache \
-DCMAKE_CXX_COMPILER_LAUNCHER=ccache \
-DENABLE_INTEL_MYRIAD_COMMON=OFF \
-DENABLE_DOCS=ON \
-DCMAKE_BUILD_TYPE=Release \
-B build
- name: Cache documentation
id: cache_sphinx_docs
uses: actions/cache@v3
with:
path: build/docs/_build/.doctrees
key: sphinx-docs-cache
- name: Build doc
run: |
cmake --build build --target sphinx_docs -j`nproc`
- name: Archive HTML
run: |
zip -r openvino_html.zip _build
working-directory: build/docs
- name: Run Pytest
run: |
pytest --doxygen="./build/docs/doxygen.log" \
--include_pot \
--sphinx="./build/docs/sphinx.log" \
--suppress-warnings="./docs/suppress_warnings.txt" \
--confcutdir="./docs/scripts/tests/" \
--html="./build/docs/_artifacts/doc-generation.html" \
--doxygen-strip="$(pwd)" \
--sphinx-strip="$(pwd)/build/docs/rst" \
--doxygen-xfail="./docs/doxygen-xfail.txt" \
--self-contained-html ./docs/scripts/tests/test_docs.py
- name: 'Upload test results'
if: always()
uses: actions/upload-artifact@v2
with:
name: openvino_doc_pytest
path: build/docs/_artifacts/
- name: 'Upload doxygen.log'
if: always()
uses: actions/upload-artifact@v2
with:
name: doxygen_log
path: build/docs/doxygen.log
- name: 'Upload sphinx.log'
if: always()
uses: actions/upload-artifact@v2
with:
name: sphinx_log
path: build/docs/sphinx.log
- name: 'Upload html'
if: always()
uses: actions/upload-artifact@v2
with:
name: openvino_html
path: build/docs/openvino_html.zip