forked from openvinotoolkit/openvino
-
Notifications
You must be signed in to change notification settings - Fork 0
97 lines (87 loc) · 2.96 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
name: Documentation
on: [push, pull_request]
jobs:
Build_Doc:
if: github.repository == 'openvinotoolkit/openvino'
runs-on: ubuntu-22.04
steps:
- name: Clone OpenVINO
uses: actions/checkout@v2
with:
submodules: recursive
lfs: true
- name: Install dependencies
run: |
set -e
# install doc dependencies
sudo apt update
sudo apt --assume-yes install libusb-1.0-0-dev graphviz texlive liblua5.2-0
cd docs
python3 -m pip install -r requirements.txt --user
cd openvino_sphinx_theme
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
mkdir doxygen
cd doxygen
git clone https://github.com/doxygen/doxygen.git
cd doxygen
git checkout Release_1_9_2
mkdir build
cd build
cmake ..
cmake --build . -j`nproc`
sudo make install
- name: CMake doc
run: |
mkdir build
cd build
cmake -DENABLE_DOCS=ON -DENABLE_PYTHON=ON -DCMAKE_BUILD_TYPE=Release ..
- name: Build doc
run: |
cmake --build . --target sphinx_docs -j8
working-directory: build
- 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