OpenVINO™ is an open source toolkit for optimizing and deploying AI inference
C++ aicomputer-visiondeep-learningdeploy-aidiffusion-modelsgenerative-aigood-first-issueinferencellm-inferencenatural-language-processingnlpopenvinooptimize-aiperformance-boostrecommendation-systemspeech-recognitionstable-diffusiontransformersyolo
[CI] [GHA] Use self-hosted runner for `build_doc` workflow (#30691)
Andrei Kashchikhin3b08b26d689e
diff --git a/.github/dockerfiles/docker_tag b/.github/dockerfiles/docker_tagindex 064f7aca623..d248e5b8700 100644--- a/.github/dockerfiles/docker_tag+++ b/.github/dockerfiles/docker_tag@@ -1 +1 @@-pr-30787\ No newline at end of file+pr-30691\ No newline at end of filediff --git a/.github/dockerfiles/ov_build/ubuntu_22_04_x64/Dockerfile b/.github/dockerfiles/ov_build/ubuntu_22_04_x64/Dockerfileindex 28b173bec65..f613ab3afb6 100644--- a/.github/dockerfiles/ov_build/ubuntu_22_04_x64/Dockerfile+++ b/.github/dockerfiles/ov_build/ubuntu_22_04_x64/Dockerfile@@ -41,6 +41,10 @@ RUN apt-get update && \python3.13-venv \# For Java APIdefault-jdk \+ # To build documentation+ graphviz \+ texlive \+ liblua5.2-0 \# JS APIxvfb \libgtk-3-0 \@@ -95,3 +99,12 @@ RUN mkdir -p $NVM_DIRRUN curl -o- https://raw.githubusercontent.com/nvm-sh/nvm/v0.39.0/install.sh | bashRUN . "$NVM_DIR/nvm.sh" && nvm install ${NODE_VERSION}ENV PATH="$NVM_DIR/versions/node/v${NODE_VERSION}/bin/:${PATH}"++# Install doxygen+ENV DOXYGEN_HOME="/opt/doxygen"+ENV DOXYGEN_VERSION='1.9.6'+RUN mkdir -p ${DOXYGEN_HOME} && cd ${DOXYGEN_HOME} && wget https://www.doxygen.nl/files/doxygen-$DOXYGEN_VERSION.linux.bin.tar.gz && \+ tar -I pigz -xf doxygen-$DOXYGEN_VERSION.linux.bin.tar.gz && \+ rm -f doxygen-$DOXYGEN_VERSION.linux.bin.tar.gz+ENV PATH="${DOXYGEN_HOME}/doxygen-$DOXYGEN_VERSION/bin:$PATH"+diff --git a/.github/workflows/build_doc.yml b/.github/workflows/build_doc.ymlindex a9b6905e2e7..d9ae0953707 100644--- a/.github/workflows/build_doc.yml+++ b/.github/workflows/build_doc.yml@@ -3,9 +3,6 @@ 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@@ -13,95 +10,139 @@ concurrency:permissions: read-alljobs:+ Smart_CI:+ runs-on: ubuntu-latest+ outputs:+ affected_components: "${{ steps.smart_ci.outputs.affected_components }}"+ changed_components: "${{ steps.smart_ci.outputs.changed_components }}"+ steps:+ - name: checkout action+ uses: actions/checkout@11bd71901bbe5b1630ceea73d27597364c9af683 # v4.2.2+ timeout-minutes: 15+ with:+ sparse-checkout: .github/actions/smart-ci++ - name: Get affected components+ id: smart_ci+ uses: ./.github/actions/smart-ci+ with:+ repository: ${{ github.repository }}+ pr: ${{ github.event.number }}+ commit_sha: ${{ github.sha }}+ ref_name: ${{ github.ref_name }}+ component_pattern: "category: (.*)"+ repo_token: ${{ secrets.GITHUB_TOKEN }}++ - name: Show affected components+ run: |+ echo "${{ toJSON(steps.smart_ci.outputs.affected_components) }}"+ shell: bash++ Docker:+ needs: Smart_CI+ runs-on: aks-linux-4-cores-16gb-docker-build+ container:+ image: openvinogithubactions.azurecr.io/docker_build:0.2+ volumes:+ - /mount:/mount+ outputs:+ images: "${{ steps.handle_docker.outputs.images && steps.handle_docker.outputs.images || steps.mock_image.outputs.images }}"+ steps:+ - name: Checkout+ uses: actions/checkout@11bd71901bbe5b1630ceea73d27597364c9af683 # v4.2.2+ timeout-minutes: 15++ - uses: ./.github/actions/handle_docker+ id: handle_docker+ with:+ images: |+ ov_build/ubuntu_22_04_x64+ registry: 'openvinogithubactions.azurecr.io'+ dockerfiles_root_dir: '.github/dockerfiles'+ changed_components: ${{ needs.smart_ci.outputs.changed_components }}+Build_Doc:- runs-on: ubuntu-22.04+ needs: [ Docker, Smart_CI ]if: ${{ github.repository_owner == 'openvinotoolkit' }}+ timeout-minutes: 20+ defaults:+ run:+ shell: bash+ runs-on: aks-linux-4-cores-16gb+ container:+ image: ${{ fromJSON(needs.docker.outputs.images).ov_build.ubuntu_22_04_x64 }}+ volumes:+ - /mount:/mount+ options: -e SCCACHE_AZURE_BLOB_CONTAINER -e SCCACHE_AZURE_CONNECTION_STRING -v ${{ github.workspace }}:${{ github.workspace }}+ env:+ OPENVINO_REPO: ${{ github.workspace }}/openvino+ BUILD_DIR: ${{ github.workspace }}/build+ CMAKE_CXX_COMPILER_LAUNCHER: sccache+ CMAKE_C_COMPILER_LAUNCHER: sccache+ SCCACHE_IGNORE_SERVER_IO_ERROR: 1+ SCCACHE_SERVER_PORT: 35555+ SCCACHE_CACHE_SIZE: 50G+ SCCACHE_AZURE_KEY_PREFIX: build_docssteps:- name: Clone OpenVINOuses: actions/checkout@11bd71901bbe5b1630ceea73d27597364c9af683 # v4.2.2timeout-minutes: 15with:+ path: ${{ env.OPENVINO_REPO }}submodules: 'true'lfs: 'true'- - name: Install apt-get dependencies- uses: awalsh128/cache-apt-pkgs-action@5902b33ae29014e6ca012c5d8025d4346556bd40 # v1.4.3- with:- packages: graphviz texlive liblua5.2-0 libclang1-9 libclang-cpp9- version: 3.0-- - uses: actions/setup-python@a26af69be951a213d495a4c3e4e4022e16d87065 # v5.6.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 dependenciesrun: |- 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+ python3 -m pip install -r ${OPENVINO_REPO}/docs/requirements.txt+ (cd ${OPENVINO_REPO}/docs/openvino_sphinx_theme && python3 -m pip install .)+ python3 -m pip install ${OPENVINO_REPO}/docs/openvino_custom_sphinx_sitemap- name: Validate benchmarks files- run: |- python3 docs/scripts/tests/validate_benchmarks.py docs/sphinx_setup/_static/benchmarks_files/+ run: python3 ${OPENVINO_REPO}/docs/scripts/tests/validate_benchmarks.py ${OPENVINO_REPO}/docs/sphinx_setup/_static/benchmarks_files/- name: Build docsrun: |- rm -rf build && mkdir build && cd build- cmake .. -DCMAKE_BUILD_TYPE=Release -DENABLE_DOCS=ON- cmake --build . --target sphinx_docs+ cmake -DCMAKE_BUILD_TYPE=Release -DENABLE_DOCS=ON -S ${OPENVINO_REPO} -B ${BUILD_DIR}+ cmake --build ${BUILD_DIR} --target sphinx_docs- name: Cache documentationid: cache_sphinx_docsuses: actions/cache@5a3ec84eff668545956fd18022155c47e93e2684 # v4.2.3with:- path: build/docs/_build/.doctrees+ path: ${{ env.BUILD_DIR }}/docs/_build/.doctreeskey: sphinx-docs-cache- - name: Archive docs HTML- run: (cd build/docs && zip -r openvino_docs_html.zip _build)-- name: Set PR numberrun: |PR_NUMBER=$(echo $GITHUB_REF | awk 'BEGIN { FS = "/" } ; { print $3 }')echo "PR_NUMBER=$PR_NUMBER" >> $GITHUB_ENV- - name: 'Upload sphinx.log'+ - name: Upload sphinx.loguses: actions/upload-artifact@ea165f8d65b6e75b540449e92b4886f43607fa02 # v4.6.2with:name: sphinx_build_log_${{ env.PR_NUMBER }}.log- path: build/docs/sphinx.log+ path: ${{ env.BUILD_DIR }}/docs/sphinx.log- - name: 'Upload docs html'+ - name: Upload docs htmluses: actions/upload-artifact@ea165f8d65b6e75b540449e92b4886f43607fa02 # v4.6.2with:- name: openvino_docs_html_${{ env.PR_NUMBER }}.zip- path: build/docs/openvino_docs_html.zip+ name: openvino_docs_html_${{ env.PR_NUMBER }}+ path: ${{ env.BUILD_DIR }}/docs/_build- name: Run Pytestrun: |- 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'+ pytest --sphinx="${BUILD_DIR}/docs/sphinx.log" \+ --suppress-warnings="${OPENVINO_REPO}/docs/scripts/tests/suppress_warnings.txt" \+ --confcutdir="${OPENVINO_REPO}/docs/scripts/tests/" \+ --html="${OPENVINO_REPO}/build/docs/_artifacts/doc-generation.html" \+ --sphinx-strip="${BUILD_DIR}/docs/sphinx_source" \+ --xfail="${OPENVINO_REPO}/docs/scripts/tests/xfail.txt" \+ --self-contained-html ${OPENVINO_REPO}/docs/scripts/tests/test_docs.py++ - name: Upload test resultsif: failure()uses: actions/upload-artifact@ea165f8d65b6e75b540449e92b4886f43607fa02 # v4.6.2with:name: openvino_docs_pytest- path: build/docs/_artifacts/+ path: ${{ env.BUILD_DIR }}/docs/_artifacts/diff --git a/.github/workflows/workflow_rerunner.yml b/.github/workflows/workflow_rerunner.ymlindex 9190c6f0a36..9485f2e312d 100644--- a/.github/workflows/workflow_rerunner.yml+++ b/.github/workflows/workflow_rerunner.yml@@ -20,6 +20,7 @@ on:- "Manylinux 2014"- "Manylinux 2_28"- "Clang-tidy static analysis (Ubuntu 24.04, Python 3.12, Clang-18, Clang-tidy-18)"+ - "Documentation"types:- completedpull_request: