Skip to content

[Template plugin] Unify headers inclusion #95962

[Template plugin] Unify headers inclusion

[Template plugin] Unify headers inclusion #95962

Workflow file for this run

name: Documentation
on:
pull_request:
env:
DOXY_VER: '1.9.6'
DOXYREST_VER: '2.1.3'
concurrency:
group: ${{ github.workflow }}-${{ github.head_ref && github.ref || github.run_id }}
cancel-in-progress: true
jobs:
Build_Doc:
runs-on: ubuntu-20.04
steps:
- name: Clone OpenVINO
uses: actions/checkout@v4
with:
submodules: true
lfs: true
- name: Install apt-get dependencies
uses: awalsh128/[email protected]
with:
packages: graphviz texlive liblua5.2-0 libclang1-9 libclang-cpp9
version: 3.0
- uses: actions/setup-python@v4
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 setup.py install)
- name: Download and install doxygen && doxyrest
run: |
# install doxyrest
wget https://github.com/vovkos/doxyrest/releases/download/doxyrest-$DOXYREST_VER/doxyrest-$DOXYREST_VER-linux-amd64.tar.xz
tar -xf doxyrest-$DOXYREST_VER-linux-amd64.tar.xz
echo "$(pwd)/doxyrest-$DOXYREST_VER-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 configure
run: cmake -DENABLE_DOCS=ON -B build
- name: Cache documentation
id: cache_sphinx_docs
uses: actions/cache@v3
with:
path: build/docs/_build/.doctrees
key: sphinx-docs-cache
- name: Get number of CPU cores
uses: SimenB/github-actions-cpu-cores@v2
id: cpu-cores
- name: Build docs
run: cmake --build build --target sphinx_docs --parallel ${{ steps.cpu-cores.outputs.count }}
- 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 doxygen.log'
uses: actions/upload-artifact@v3
with:
name: doxygen_build_log_${{ env.PR_NUMBER }}.log
path: build/docs/doxygen.log
- name: 'Upload sphinx.log'
uses: actions/upload-artifact@v3
with:
name: sphinx_build_log_${{ env.PR_NUMBER }}.log
path: build/docs/sphinx.log
- name: 'Upload docs html'
uses: actions/upload-artifact@v3
with:
name: openvino_docs_html_${{ env.PR_NUMBER }}.zip
path: build/docs/openvino_docs_html.zip
- 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: failure()
uses: actions/upload-artifact@v3
with:
name: openvino_docs_pytest
path: build/docs/_artifacts/