forked from openvinotoolkit/openvino
-
Notifications
You must be signed in to change notification settings - Fork 0
106 lines (89 loc) · 3.63 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
name: Documentation
on:
pull_request:
merge_group:
env:
DOXY_VER: '1.9.6'
concurrency:
group: ${{ github.workflow }}-${{ github.head_ref && github.ref || github.run_id }}
cancel-in-progress: true
permissions: read-all
jobs:
Build_Doc:
runs-on: ubuntu-20.04
if: ${{ github.repository_owner == 'openvinotoolkit' }}
steps:
- name: Clone OpenVINO
uses: actions/checkout@11bd71901bbe5b1630ceea73d27597364c9af683 # v4.2.2
with:
submodules: 'true'
lfs: 'true'
- name: Install apt-get dependencies
uses: awalsh128/cache-apt-pkgs-action@a6c3917cc929dd0345bfb2d3feaf9101823370ad # v1.4.2
with:
packages: graphviz texlive liblua5.2-0 libclang1-9 libclang-cpp9
version: 3.0
- uses: actions/setup-python@0b93645e9fea7318ecaed2b359559ac225c90a2b # v5.3.0
id: cp310
with:
python-version: '3.10'
cache: 'pip'
cache-dependency-path: |
docs/requirements.txt
docs/openvino_sphinx_theme/setup.py
- name: Install python dependencies
run: |
python3 -m pip install -r docs/requirements.txt
(cd docs/openvino_sphinx_theme && python3 -m pip install .)
python3 -m pip install docs/openvino_custom_sphinx_sitemap
- name: Download and install doxygen
run: |
# install doxygen
wget https://www.doxygen.nl/files/doxygen-$DOXY_VER.linux.bin.tar.gz
tar -I pigz -xf doxygen-$DOXY_VER.linux.bin.tar.gz
echo "$(pwd)/doxygen-$DOXY_VER/bin/" >> $GITHUB_PATH
- name: Validate benchmarks files
run: |
python3 docs/scripts/tests/validate_benchmarks.py docs/sphinx_setup/_static/benchmarks_files/
- name: Build docs
run: |
rm -rf build && mkdir build && cd build
cmake .. -DCMAKE_BUILD_TYPE=Release -DENABLE_DOCS=ON
cmake --build . --target sphinx_docs
- name: Cache documentation
id: cache_sphinx_docs
uses: actions/cache@6849a6489940f00c2f30c0fb92c6274307ccb58a # v4.1.2
with:
path: build/docs/_build/.doctrees
key: sphinx-docs-cache
- name: Archive docs HTML
run: (cd build/docs && zip -r openvino_docs_html.zip _build)
- name: Set PR number
run: |
PR_NUMBER=$(echo $GITHUB_REF | awk 'BEGIN { FS = "/" } ; { print $3 }')
echo "PR_NUMBER=$PR_NUMBER" >> $GITHUB_ENV
- name: 'Upload sphinx.log'
uses: actions/upload-artifact@b4b15b8c7c6ac21ea08fcf65892d2ee8f75cf882 # v4.4.3
with:
name: sphinx_build_log_${{ env.PR_NUMBER }}.log
path: build/docs/sphinx.log
- name: 'Upload docs html'
uses: actions/upload-artifact@b4b15b8c7c6ac21ea08fcf65892d2ee8f75cf882 # v4.4.3
with:
name: openvino_docs_html_${{ env.PR_NUMBER }}.zip
path: build/docs/openvino_docs_html.zip
- name: Run Pytest
run: |
pytest --sphinx="./build/docs/sphinx.log" \
--suppress-warnings="./docs/scripts/tests/suppress_warnings.txt" \
--confcutdir="./docs/scripts/tests/" \
--html="./build/docs/_artifacts/doc-generation.html" \
--sphinx-strip="$(pwd)/build/docs/sphinx_source" \
--xfail="./docs/scripts/tests/xfail.txt" \
--self-contained-html ./docs/scripts/tests/test_docs.py
- name: 'Upload test results'
if: failure()
uses: actions/upload-artifact@b4b15b8c7c6ac21ea08fcf65892d2ee8f75cf882 # v4.4.3
with:
name: openvino_docs_pytest
path: build/docs/_artifacts/