From c237330c02073cef21429fb50bdf97c4294f6569 Mon Sep 17 00:00:00 2001 From: Ilya Lavrenov Date: Wed, 28 Dec 2022 16:02:28 +0400 Subject: [PATCH 1/9] Used newer version of checkout github action --- .ci/azure/windows.yml | 14 +++++++------- .github/workflows/build_doc.yml | 2 +- .github/workflows/check_pr_commits.yml | 2 +- .github/workflows/code_snippets.yml | 2 +- .github/workflows/code_style.yml | 6 +++--- .github/workflows/files_size.yml | 2 +- .github/workflows/mo.yml | 2 +- .github/workflows/py_checks.yml | 2 +- 8 files changed, 16 insertions(+), 16 deletions(-) diff --git a/.ci/azure/windows.yml b/.ci/azure/windows.yml index cbb456748d5c79..bce04b73f82898 100644 --- a/.ci/azure/windows.yml +++ b/.ci/azure/windows.yml @@ -4,7 +4,7 @@ trigger: - master - releases/* paths: - exclude: + exclude: - docs/ - /**/docs/* - /**/*.md @@ -17,7 +17,7 @@ pr: - master - releases/* paths: - exclude: + exclude: - docs/ - /**/docs/* - /**/*.md @@ -89,25 +89,25 @@ jobs: rd /Q /S $(BUILD_SAMPLES_DIR) & mkdir $(BUILD_SAMPLES_DIR) rd /Q /S $(BUILD_SAMPLES_TESTS_DIR) & mkdir $(BUILD_SAMPLES_TESTS_DIR) displayName: 'Make dir' - + - script: curl -O https://www.python.org/ftp/python/3.10.7/python-3.10.7-amd64.exe displayName: 'Download Python' workingDirectory: $(WORK_DIR) continueOnError: false - + - script: | python-3.10.7-amd64.exe /passive InstallAllUsers=0 Include_launcher=0 TargetDir=C:\hostedtoolcache\windows\Python\3.10.7\x64 cp C:\hostedtoolcache\windows\Python\3.8.2\x64.complete C:\hostedtoolcache\windows\Python\3.10.7\x64.complete displayName: 'Install Python' workingDirectory: $(WORK_DIR) continueOnError: false - + - task: UsePythonVersion@0 displayName: 'Use Python' inputs: - versionSpec: '3.10.7' + versionSpec: '3.10' disableDownloadFromRegistry: true - + - script: | powershell -command "Invoke-RestMethod -Headers @{\"Metadata\"=\"true\"} -Method GET -Uri http://169.254.169.254/metadata/instance/compute?api-version=2019-06-01 | format-custom" tree C:\hostedtoolcache\windows\Python diff --git a/.github/workflows/build_doc.yml b/.github/workflows/build_doc.yml index 346120252c65d7..1e7e667d20ed67 100644 --- a/.github/workflows/build_doc.yml +++ b/.github/workflows/build_doc.yml @@ -11,7 +11,7 @@ jobs: runs-on: ubuntu-22.04 steps: - name: Clone OpenVINO - uses: actions/checkout@v2 + uses: actions/checkout@v3 with: submodules: true lfs: true diff --git a/.github/workflows/check_pr_commits.yml b/.github/workflows/check_pr_commits.yml index 68ad3e41bbca63..9053424e335656 100644 --- a/.github/workflows/check_pr_commits.yml +++ b/.github/workflows/check_pr_commits.yml @@ -10,7 +10,7 @@ jobs: runs-on: ubuntu-22.04 steps: - name: Clone OpenVINO - uses: actions/checkout@v2 + uses: actions/checkout@v3 - name: Install dependencies run: python3 -m pip install -r ./.github/github_org_control/requirements.txt diff --git a/.github/workflows/code_snippets.yml b/.github/workflows/code_snippets.yml index dc669ad980451d..9de37490db407f 100644 --- a/.github/workflows/code_snippets.yml +++ b/.github/workflows/code_snippets.yml @@ -22,7 +22,7 @@ jobs: runs-on: ${{ matrix.os }} steps: - name: Clone OpenVINO - uses: actions/checkout@v2 + uses: actions/checkout@v3 with: submodules: recursive lfs: true diff --git a/.github/workflows/code_style.yml b/.github/workflows/code_style.yml index 17ff75bf1f5c40..c4b0ff69d90116 100644 --- a/.github/workflows/code_style.yml +++ b/.github/workflows/code_style.yml @@ -9,7 +9,7 @@ jobs: clang-format: runs-on: ubuntu-20.04 steps: - - uses: actions/checkout@v2 + - uses: actions/checkout@v3 with: submodules: recursive @@ -60,7 +60,7 @@ jobs: ShellCheck: runs-on: ubuntu-22.04 steps: - - uses: actions/checkout@v2 + - uses: actions/checkout@v3 with: submodules: recursive @@ -85,7 +85,7 @@ jobs: NamingConventionCheck: runs-on: ubuntu-22.04 steps: - - uses: actions/checkout@v2 + - uses: actions/checkout@v3 with: submodules: recursive diff --git a/.github/workflows/files_size.yml b/.github/workflows/files_size.yml index 35a4431d436034..4d094758e24c84 100644 --- a/.github/workflows/files_size.yml +++ b/.github/workflows/files_size.yml @@ -9,7 +9,7 @@ jobs: Check_Files_Size: runs-on: ubuntu-22.04 steps: - - uses: actions/checkout@v2 + - uses: actions/checkout@v3 - name: git ls-tree run: | diff --git a/.github/workflows/mo.yml b/.github/workflows/mo.yml index 266b57cb9a5ced..becc6df63d5262 100644 --- a/.github/workflows/mo.yml +++ b/.github/workflows/mo.yml @@ -15,7 +15,7 @@ jobs: Pylint-UT: runs-on: ubuntu-22.04 steps: - - uses: actions/checkout@v2 + - uses: actions/checkout@v3 with: submodules: recursive diff --git a/.github/workflows/py_checks.yml b/.github/workflows/py_checks.yml index 56f8d434b4b875..a865df4c78b814 100644 --- a/.github/workflows/py_checks.yml +++ b/.github/workflows/py_checks.yml @@ -22,7 +22,7 @@ jobs: runs-on: ubuntu-20.04 steps: - name: Code checkout - uses: actions/checkout@v2 + uses: actions/checkout@v3 with: submodules: recursive - name: Set up Python From f09c239691652c04b4b095bcbe79be1e117d8c47 Mon Sep 17 00:00:00 2001 From: Ilya Lavrenov Date: Wed, 28 Dec 2022 16:34:40 +0400 Subject: [PATCH 2/9] Updated actions/upload-artifact action version to use Node 16 --- .github/workflows/build_doc.yml | 8 ++++---- .github/workflows/code_style.yml | 2 +- .github/workflows/py_checks.yml | 10 +++++----- 3 files changed, 10 insertions(+), 10 deletions(-) diff --git a/.github/workflows/build_doc.yml b/.github/workflows/build_doc.yml index 1e7e667d20ed67..08c56a027bf0c8 100644 --- a/.github/workflows/build_doc.yml +++ b/.github/workflows/build_doc.yml @@ -117,28 +117,28 @@ jobs: - name: 'Upload test results' if: always() - uses: actions/upload-artifact@v2 + uses: actions/upload-artifact@v3 with: name: openvino_doc_pytest path: build/docs/_artifacts/ - name: 'Upload doxygen.log' if: always() - uses: actions/upload-artifact@v2 + uses: actions/upload-artifact@v3 with: name: doxygen_log path: build/docs/doxygen.log - name: 'Upload sphinx.log' if: always() - uses: actions/upload-artifact@v2 + uses: actions/upload-artifact@v3 with: name: sphinx_log path: build/docs/sphinx.log - name: 'Upload html' if: always() - uses: actions/upload-artifact@v2 + uses: actions/upload-artifact@v3 with: name: openvino_html path: build/docs/openvino_html.zip diff --git a/.github/workflows/code_style.yml b/.github/workflows/code_style.yml index c4b0ff69d90116..e407e0361b537a 100644 --- a/.github/workflows/code_style.yml +++ b/.github/workflows/code_style.yml @@ -51,7 +51,7 @@ jobs: level: error tool_name: clang-format - - uses: actions/upload-artifact@v2 + - uses: actions/upload-artifact@v3 if: failure() with: name: code_style_diff diff --git a/.github/workflows/py_checks.yml b/.github/workflows/py_checks.yml index a865df4c78b814..5f7f5951efd1dc 100644 --- a/.github/workflows/py_checks.yml +++ b/.github/workflows/py_checks.yml @@ -41,7 +41,7 @@ jobs: python -m black -l 160 -S ./ git diff > samples_diff.diff working-directory: samples/python - - uses: actions/upload-artifact@v2 + - uses: actions/upload-artifact@v3 if: failure() with: name: samples_diff @@ -56,7 +56,7 @@ jobs: python -m black -l 160 -S ./ git diff > ie_python_diff.diff working-directory: src/bindings/python/src/compatibility/openvino - - uses: actions/upload-artifact@v2 + - uses: actions/upload-artifact@v3 if: failure() with: name: ie_python_diff @@ -71,7 +71,7 @@ jobs: python -m black -l 160 -S ./ git diff > pyngraph_diff.diff working-directory: src/bindings/python/src/compatibility/ngraph - - uses: actions/upload-artifact@v2 + - uses: actions/upload-artifact@v3 if: failure() with: name: pyngraph_diff @@ -86,7 +86,7 @@ jobs: python -m black -l 160 -S ./ git diff > pyopenvino_diff.diff working-directory: src/bindings/python/src/openvino - - uses: actions/upload-artifact@v2 + - uses: actions/upload-artifact@v3 if: failure() with: name: pyopenvino_diff @@ -101,7 +101,7 @@ jobs: python -m black -l 160 -S ./ git diff > wheel_diff.diff working-directory: src/bindings/python/wheel - - uses: actions/upload-artifact@v2 + - uses: actions/upload-artifact@v3 if: failure() with: name: wheel_diff From 50726091a4f0d726f0a7fc4691e56956a26f098d Mon Sep 17 00:00:00 2001 From: Ilya Lavrenov Date: Wed, 28 Dec 2022 18:09:07 +0400 Subject: [PATCH 3/9] Updated actions --- .github/workflows/build_doc.yml | 145 +++++++++---------------- .github/workflows/check_pr_commits.yml | 4 - .github/workflows/code_snippets.yml | 16 +-- .github/workflows/code_style.yml | 32 ++---- .github/workflows/files_size.yml | 7 +- .github/workflows/mo.yml | 17 ++- .github/workflows/py_checks.yml | 25 ++++- 7 files changed, 98 insertions(+), 148 deletions(-) diff --git a/.github/workflows/build_doc.yml b/.github/workflows/build_doc.yml index 08c56a027bf0c8..43a52976431c0a 100644 --- a/.github/workflows/build_doc.yml +++ b/.github/workflows/build_doc.yml @@ -7,7 +7,6 @@ concurrency: jobs: Build_Doc: - if: github.repository == 'openvinotoolkit/openvino' runs-on: ubuntu-22.04 steps: - name: Clone OpenVINO @@ -16,75 +15,41 @@ jobs: 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/ccache-action@v1.2 + - name: Install apt-get dependencies + uses: awalsh128/cache-apt-pkgs-action@v1.1.3 with: - key: doc-ccache-cache - save: false + packages: graphviz texlive liblua5.2-0 + version: 3.0 - # cache from doxygen build - - name: Cache doxygen make - id: cache_doxygen_make - uses: actions/cache@v3 + - uses: actions/setup-python@v4 + id: cp310 with: - path: doxygen-build - key: build-doxygen-cache + python-version: '3.10' + cache: 'pip' + cache-dependency-path: | + 'docs/requirements.txt' + 'docs/openvino_sphinx_theme/setup.py' - # cache from python packages - - name: Cache python requirements - id: cache_python_requirements - uses: actions/cache@v3 - with: - path: ~/.cache/pip - key: doc-python-requirements + - run: echo '${{ steps.cp310.outputs.cache-hit }}' - - name: Install apt-get tools - uses: awalsh128/cache-apt-pkgs-action@v1.1.3 - # install doc dependencies - with: - packages: graphviz texlive liblua5.2-0 - version: 3.0 + - name: Install python dependencies + run: | + python3 -m pip install -r docs/requirements.txt + python3 install -e docs/openvino_sphinx_theme/setup.py - - name: Install dependencies + - name: Download and install doxygen && doxyrest run: | - set -e - python3 -m pip install -r docs/requirements.txt --user - cd docs/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 --depth 1 https://github.com/doxygen/doxygen.git -b Release_1_9_2 - cmake \ - -DCMAKE_C_COMPILER_LAUNCHER=ccache \ - -DCMAKE_CXX_COMPILER_LAUNCHER=ccache \ - -S doxygen \ - -B ../doxygen-build - cmake --build ../doxygen-build -j`nproc` - sudo cmake --build ../doxygen-build --target install - - - 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 + wget https://sourceforge.net/projects/doxygen/files/rel-1.9.2/doxygen-1.9.2.linux.bin.tar.gz + tar -xzf doxygen-1.9.2.linux.bin.tar.gz + echo "$(pwd)/doxygen-1.9.2/bin/" >> $GITHUB_PATH + + - name: CMake configure + run: cmake -DENABLE_INTEL_MYRIAD_COMMON=OFF -DENABLE_DOCS=ON -B build - name: Cache documentation id: cache_sphinx_docs @@ -92,16 +57,35 @@ jobs: 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: Get number of CPU cores + uses: SimenB/github-actions-cpu-cores@v1 + id: cpu-cores + + - name: Build docs + run: cmake --build build --target sphinx_docs --parallel ${{ steps.cpu-cores.outputs.count }} + + - name: Archive docs HTML + run: zip -r openvino_docs_html.zip build/docs/_build + + - name: 'Upload doxygen.log' + uses: actions/upload-artifact@v3 + with: + name: doxygen_build_log + path: build/docs/doxygen.log + + - name: 'Upload sphinx.log' + uses: actions/upload-artifact@v3 + with: + name: sphinx_build_log + path: build/docs/sphinx.log + + - name: 'Upload docs html' + uses: actions/upload-artifact@v3 + with: + name: openvino_docs_html + path: build/docs/openvino_docs_html.zip + - name: Run Pytest run: | pytest --doxygen="./build/docs/doxygen.log" \ @@ -116,29 +100,8 @@ jobs: --self-contained-html ./docs/scripts/tests/test_docs.py - name: 'Upload test results' - if: always() + if: failure() uses: actions/upload-artifact@v3 with: - name: openvino_doc_pytest + name: openvino_docs_pytest path: build/docs/_artifacts/ - - - name: 'Upload doxygen.log' - if: always() - uses: actions/upload-artifact@v3 - with: - name: doxygen_log - path: build/docs/doxygen.log - - - name: 'Upload sphinx.log' - if: always() - uses: actions/upload-artifact@v3 - with: - name: sphinx_log - path: build/docs/sphinx.log - - - name: 'Upload html' - if: always() - uses: actions/upload-artifact@v3 - with: - name: openvino_html - path: build/docs/openvino_html.zip diff --git a/.github/workflows/check_pr_commits.yml b/.github/workflows/check_pr_commits.yml index 9053424e335656..41d1564a0cad1d 100644 --- a/.github/workflows/check_pr_commits.yml +++ b/.github/workflows/check_pr_commits.yml @@ -1,10 +1,6 @@ name: PR Commits on: [pull_request] -concurrency: - group: ${{ github.workflow }}-${{ github.ref }} - cancel-in-progress: true - jobs: Checks: runs-on: ubuntu-22.04 diff --git a/.github/workflows/code_snippets.yml b/.github/workflows/code_snippets.yml index 9de37490db407f..d866f854ea235e 100644 --- a/.github/workflows/code_snippets.yml +++ b/.github/workflows/code_snippets.yml @@ -27,22 +27,12 @@ jobs: submodules: recursive lfs: true - - name: Check cmake - run: | - which cmake - cmake --version - - - name: CMake - run: | - mkdir build - cd build - cmake -DENABLE_INTEL_MYRIAD_COMMON=OFF -DCMAKE_BUILD_TYPE=Release .. + - name: CMake configure + run: cmake -DENABLE_INTEL_MYRIAD_COMMON=OFF -DCMAKE_BUILD_TYPE=Release -B build - name: Get number of CPU cores uses: SimenB/github-actions-cpu-cores@v1 id: cpu-cores - name: Build snippets - run: | - cmake --build . --target ie_docs_snippets -j${{ steps.cpu-cores.outputs.count }} - working-directory: build + run: cmake --build build --target ie_docs_snippets --parallel ${{ steps.cpu-cores.outputs.count }} diff --git a/.github/workflows/code_style.yml b/.github/workflows/code_style.yml index e407e0361b537a..3e6d9f2f20d004 100644 --- a/.github/workflows/code_style.yml +++ b/.github/workflows/code_style.yml @@ -28,15 +28,12 @@ jobs: python3 -m pip install -r ./src/bindings/python/src/compatibility/openvino/requirements-dev.txt # Run cmake with -DENABLE_PROFILING_ITT=ON -DSELECTIVE_BUILD=COLLECT in order to enable codestyle check for ITT collector - - name: CMake + - name: CMake configure run: | - mkdir build - cd build - cmake -DENABLE_PYTHON=ON -DENABLE_TESTS=ON -DENABLE_PROFILING_ITT=ON -DSELECTIVE_BUILD=COLLECT .. + cmake -DENABLE_PYTHON=ON -DENABLE_TESTS=ON -DENABLE_PROFILING_ITT=ON -DSELECTIVE_BUILD=COLLECT -B build - name: Check code style - run: cmake --build . --target clang_format_check_all -j8 - working-directory: build + run: cmake --build build --target clang_format_check_all -j8 - name: Create code style diff if: failure() @@ -69,18 +66,11 @@ jobs: sudo apt update sudo apt --assume-yes install shellcheck - - name: Install dependencies - run: python3 -m pip install -r ./src/bindings/python/requirements.txt - - - name: CMake - run: | - mkdir build - cd build - cmake -DENABLE_INTEL_MYRIAD_COMMON=OFF .. + - name: CMake configure + run: cmake -DENABLE_INTEL_MYRIAD_COMMON=OFF -B build - name: ShellCheck - run: cmake --build . --target ie_shellcheck -j8 - working-directory: build + run: cmake --build build --target ie_shellcheck -j8 NamingConventionCheck: runs-on: ubuntu-22.04 @@ -98,12 +88,8 @@ jobs: - name: Install Python-based dependencies run: python3 -m pip install -r cmake/developer_package/ncc_naming_style/requirements_dev.txt - - name: CMake - run: | - mkdir build - cd build - cmake -DENABLE_INTEL_MYRIAD_COMMON=OFF .. + - name: CMake configure + run: cmake -DENABLE_INTEL_MYRIAD_COMMON=OFF -B build - name: Naming convention check - run: cmake --build . --target ncc_all -j8 - working-directory: build + run: cmake --build build --target ncc_all -j8 diff --git a/.github/workflows/files_size.yml b/.github/workflows/files_size.yml index 4d094758e24c84..ce9757af172ba8 100644 --- a/.github/workflows/files_size.yml +++ b/.github/workflows/files_size.yml @@ -12,10 +12,7 @@ jobs: - uses: actions/checkout@v3 - name: git ls-tree - run: | - git ls-tree -r -t -l --full-name HEAD | sort -n -r -k 4 + run: git ls-tree -r -t -l --full-name HEAD | sort -n -r -k 4 - name: git lfs ls-files - run: | - git lfs ls-files --size - + run: git lfs ls-files --size diff --git a/.github/workflows/mo.yml b/.github/workflows/mo.yml index becc6df63d5262..b36bad3eb8deb4 100644 --- a/.github/workflows/mo.yml +++ b/.github/workflows/mo.yml @@ -19,8 +19,8 @@ jobs: with: submodules: recursive - - name: Set up Python ${{ matrix.python-version }} - uses: actions/setup-python@v1 + - name: Setup Python ${{ matrix.python-version }} + uses: actions/setup-python@v4 with: python-version: 3.7 @@ -33,9 +33,9 @@ jobs: ${{ runner.os }}-pip- ${{ runner.os }}- - # tensorflow 1.15 causes modules import - # errors, most likely due to https://github.com/PyCQA/pylint/issues/2603 - # for tensorflow.core.framework and tensorflow.contrib + # tensorflow 1.15 causes modules import + # errors, most likely due to https://github.com/PyCQA/pylint/issues/2603 + # for tensorflow.core.framework and tensorflow.contrib - name: Install dependencies run: | python -m pip install --upgrade pip setuptools @@ -53,11 +53,8 @@ jobs: run: pylint -d C,R,W openvino/tools/mo/ openvino/tools/mo/mo.py working-directory: openvino/tools/mo - - name: CMake - run: | - mkdir build - cd build - cmake .. + - name: CMake configure + run: cmake -B build - name: UT run: | diff --git a/.github/workflows/py_checks.yml b/.github/workflows/py_checks.yml index 5f7f5951efd1dc..7e65c8febce20b 100644 --- a/.github/workflows/py_checks.yml +++ b/.github/workflows/py_checks.yml @@ -25,100 +25,121 @@ jobs: uses: actions/checkout@v3 with: submodules: recursive - - name: Set up Python - uses: actions/setup-python@v2 + + - name: Setup Python + uses: actions/setup-python@v4 with: python-version: '3.7' + - name: Install dependencies run: python -m pip install -r src/bindings/python/requirements_test.txt + # samples code-style - name: Run flake8 on samples run: python -m flake8 ./ --config=setup.cfg working-directory: samples/python + - name: Create code style diff for samples if: failure() run: | python -m black -l 160 -S ./ git diff > samples_diff.diff working-directory: samples/python + - uses: actions/upload-artifact@v3 if: failure() with: name: samples_diff path: samples_diff.diff + # IE Python API Flake code-style - name: Run flake8 on IE Python API run: python -m flake8 ./ --config=setup.cfg working-directory: src/bindings/python/src/compatibility/openvino + - name: Create code style diff for IE Python API if: failure() run: | python -m black -l 160 -S ./ git diff > ie_python_diff.diff working-directory: src/bindings/python/src/compatibility/openvino + - uses: actions/upload-artifact@v3 if: failure() with: name: ie_python_diff path: ie_python_diff.diff + # nGraph Python API Flake code-style - name: Run flake8 on nGraph Python API run: python -m flake8 ./src/compatibility/ngraph --config=setup.cfg working-directory: src/bindings/python + - name: Create code style diff for nGraph Python API if: failure() run: | python -m black -l 160 -S ./ git diff > pyngraph_diff.diff working-directory: src/bindings/python/src/compatibility/ngraph + - uses: actions/upload-artifact@v3 if: failure() with: name: pyngraph_diff path: pyngraph_diff.diff + # Python API 2.0 Flake code-style - name: Run flake8 on Python API 2.0 run: python -m flake8 ./src/openvino --config=setup.cfg working-directory: src/bindings/python + - name: Create code style diff for Python API 2.0 if: failure() run: | python -m black -l 160 -S ./ git diff > pyopenvino_diff.diff working-directory: src/bindings/python/src/openvino + - uses: actions/upload-artifact@v3 if: failure() with: name: pyopenvino_diff path: pyopenvino_diff.diff + # wheel Flake code-style - name: Run flake8 on wheel run: python -m flake8 ./ --config=../setup.cfg working-directory: src/bindings/python/wheel + - name: Create code style diff for wheel if: failure() run: | python -m black -l 160 -S ./ git diff > wheel_diff.diff working-directory: src/bindings/python/wheel + - uses: actions/upload-artifact@v3 if: failure() with: name: wheel_diff path: wheel_diff.diff + # Python API 2.0 tests Flake code-style - name: Run flake8 on python tests # ignore lack of docs in tests run: python -m flake8 tests/ --config=setup.cfg working-directory: src/bindings/python + # IE Python API mypy check - name: Run mypy on IE Python API run: python -m mypy ./ --config-file ./setup.cfg working-directory: src/bindings/python/src/compatibility/openvino + # nGraph Python API mypy check - name: Run mypy on nGraph Python API run: python -m mypy ./src/compatibility/ngraph --config-file ./setup.cfg working-directory: src/bindings/python + # Python API 2.0 mypy check - name: Run mypy on Python API 2.0 run: python -m mypy ./src/openvino --config-file ./setup.cfg From f1c8174754dc54c67db7fa0e06e442bf2e8d7af3 Mon Sep 17 00:00:00 2001 From: Ilya Lavrenov Date: Wed, 28 Dec 2022 18:18:34 +0400 Subject: [PATCH 4/9] Experiment --- .github/workflows/build_doc.yml | 22 +++++++++++++++------- .github/workflows/code_snippets.yml | 3 +++ .github/workflows/code_style.yml | 7 ++++++- .github/workflows/mo.yml | 5 +++++ .github/workflows/py_checks.yml | 3 +++ 5 files changed, 32 insertions(+), 8 deletions(-) diff --git a/.github/workflows/build_doc.yml b/.github/workflows/build_doc.yml index 43a52976431c0a..a22f411a848637 100644 --- a/.github/workflows/build_doc.yml +++ b/.github/workflows/build_doc.yml @@ -1,5 +1,13 @@ name: Documentation -on: [push, pull_request] +on: + pull_request: + push: + branches: + - 'master' + - 'releases/**' + +env: + DOXY_VER: '1.9.6' concurrency: group: ${{ github.workflow }}-${{ github.ref }} @@ -27,15 +35,15 @@ jobs: python-version: '3.10' cache: 'pip' cache-dependency-path: | - 'docs/requirements.txt' - 'docs/openvino_sphinx_theme/setup.py' + docs/requirements.txt + docs/openvino_sphinx_theme/setup.py - run: echo '${{ steps.cp310.outputs.cache-hit }}' - name: Install python dependencies run: | python3 -m pip install -r docs/requirements.txt - python3 install -e docs/openvino_sphinx_theme/setup.py + (cd docs/openvino_sphinx_theme && python3 setup.py install) - name: Download and install doxygen && doxyrest run: | @@ -44,9 +52,9 @@ jobs: 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://sourceforge.net/projects/doxygen/files/rel-1.9.2/doxygen-1.9.2.linux.bin.tar.gz - tar -xzf doxygen-1.9.2.linux.bin.tar.gz - echo "$(pwd)/doxygen-1.9.2/bin/" >> $GITHUB_PATH + wget https://sourceforge.net/projects/doxygen/files/rel-$DOXY_VER/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_INTEL_MYRIAD_COMMON=OFF -DENABLE_DOCS=ON -B build diff --git a/.github/workflows/code_snippets.yml b/.github/workflows/code_snippets.yml index d866f854ea235e..f5c7f1972798ff 100644 --- a/.github/workflows/code_snippets.yml +++ b/.github/workflows/code_snippets.yml @@ -4,6 +4,9 @@ on: paths: - '.github/workflows/code_snippets.yml' - 'docs/snippets/**' + branches: + - 'master' + - 'releases/**' pull_request: paths: - '.github/workflows/code_snippets.yml' diff --git a/.github/workflows/code_style.yml b/.github/workflows/code_style.yml index 3e6d9f2f20d004..dfe3d9e3de1b0f 100644 --- a/.github/workflows/code_style.yml +++ b/.github/workflows/code_style.yml @@ -1,5 +1,10 @@ name: Code Style -on: [push, pull_request] +on: + pull_request: + push: + branches: + - 'master' + - 'releases/**' concurrency: group: ${{ github.workflow }}-${{ github.ref }} diff --git a/.github/workflows/mo.yml b/.github/workflows/mo.yml index b36bad3eb8deb4..330a4e63573635 100644 --- a/.github/workflows/mo.yml +++ b/.github/workflows/mo.yml @@ -3,9 +3,14 @@ on: push: paths: - 'openvino/tools/mo/**' + - '.github/workflows/mo.py' + branches: + - 'master' + - 'releases/**' pull_request: paths: - 'openvino/tools/mo/**' + - '.github/workflows/mo.py' concurrency: group: ${{ github.workflow }}-${{ github.ref }} diff --git a/.github/workflows/py_checks.yml b/.github/workflows/py_checks.yml index 7e65c8febce20b..5010a6c75359c4 100644 --- a/.github/workflows/py_checks.yml +++ b/.github/workflows/py_checks.yml @@ -7,6 +7,9 @@ on: - 'src/bindings/python/**' - 'samples/python/**' - '.github/workflows/py_checks.yml' + branches: + - 'master' + - 'releases/**' pull_request: paths: - 'src/bindings/python/**' From 5d0013ade6599e1eff38a4221b644f65c2dc386e Mon Sep 17 00:00:00 2001 From: Ilya Lavrenov Date: Wed, 28 Dec 2022 20:10:05 +0400 Subject: [PATCH 5/9] Name documentation artifacts --- .github/workflows/build_doc.yml | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/.github/workflows/build_doc.yml b/.github/workflows/build_doc.yml index a22f411a848637..57a77806a9001d 100644 --- a/.github/workflows/build_doc.yml +++ b/.github/workflows/build_doc.yml @@ -7,7 +7,7 @@ on: - 'releases/**' env: - DOXY_VER: '1.9.6' + DOXY_VER: '1.9.3' concurrency: group: ${{ github.workflow }}-${{ github.ref }} @@ -79,19 +79,19 @@ jobs: - name: 'Upload doxygen.log' uses: actions/upload-artifact@v3 with: - name: doxygen_build_log + name: doxygen_build_log_${{ github.ref }}.log path: build/docs/doxygen.log - name: 'Upload sphinx.log' uses: actions/upload-artifact@v3 with: - name: sphinx_build_log + name: sphinx_build_log_${{ github.ref }}.log path: build/docs/sphinx.log - name: 'Upload docs html' uses: actions/upload-artifact@v3 with: - name: openvino_docs_html + name: openvino_docs_${{ github.ref }}_html.zip path: build/docs/openvino_docs_html.zip - name: Run Pytest From b7897c1d5dd6b9ea5978165e5678af370c53c2b3 Mon Sep 17 00:00:00 2001 From: Ilya Lavrenov Date: Wed, 28 Dec 2022 20:33:44 +0400 Subject: [PATCH 6/9] Moved doxyrest version to environment --- .github/workflows/build_doc.yml | 7 ++++--- 1 file changed, 4 insertions(+), 3 deletions(-) diff --git a/.github/workflows/build_doc.yml b/.github/workflows/build_doc.yml index 57a77806a9001d..a31d4fdbc566b8 100644 --- a/.github/workflows/build_doc.yml +++ b/.github/workflows/build_doc.yml @@ -8,6 +8,7 @@ on: env: DOXY_VER: '1.9.3' + DOXYREST_VER: '2.1.3' concurrency: group: ${{ github.workflow }}-${{ github.ref }} @@ -48,9 +49,9 @@ jobs: - name: Download and install doxygen && doxyrest run: | # 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 + 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://sourceforge.net/projects/doxygen/files/rel-$DOXY_VER/doxygen-$DOXY_VER.linux.bin.tar.gz tar -xzf doxygen-$DOXY_VER.linux.bin.tar.gz From c2a86a7628bbcb7cde1d94afc29eec9a0e977228 Mon Sep 17 00:00:00 2001 From: Ilya Lavrenov Date: Wed, 28 Dec 2022 21:08:00 +0400 Subject: [PATCH 7/9] Extract PR number --- .github/workflows/build_doc.yml | 11 ++++++++--- 1 file changed, 8 insertions(+), 3 deletions(-) diff --git a/.github/workflows/build_doc.yml b/.github/workflows/build_doc.yml index a31d4fdbc566b8..8937d230e85ecc 100644 --- a/.github/workflows/build_doc.yml +++ b/.github/workflows/build_doc.yml @@ -77,22 +77,27 @@ jobs: - name: Archive docs HTML run: zip -r openvino_docs_html.zip build/docs/_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_${{ github.ref }}.log + 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_${{ github.ref }}.log + 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_${{ github.ref }}_html.zip + name: openvino_docs_${{ env.PR_NUMBER }}_html.zip path: build/docs/openvino_docs_html.zip - name: Run Pytest From e80265b3cf398f363082e365aa88d12c47b7c549 Mon Sep 17 00:00:00 2001 From: Ilya Lavrenov Date: Wed, 28 Dec 2022 23:04:09 +0400 Subject: [PATCH 8/9] Properly upload documentation --- .github/workflows/build_doc.yml | 8 ++++---- docs/CMakeLists.txt | 4 ++-- docs/Documentation/model_introduction.md | 4 ---- 3 files changed, 6 insertions(+), 10 deletions(-) diff --git a/.github/workflows/build_doc.yml b/.github/workflows/build_doc.yml index 8937d230e85ecc..fc39754db0002f 100644 --- a/.github/workflows/build_doc.yml +++ b/.github/workflows/build_doc.yml @@ -7,7 +7,7 @@ on: - 'releases/**' env: - DOXY_VER: '1.9.3' + DOXY_VER: '1.9.2' DOXYREST_VER: '2.1.3' concurrency: @@ -16,7 +16,7 @@ concurrency: jobs: Build_Doc: - runs-on: ubuntu-22.04 + runs-on: ubuntu-20.04 steps: - name: Clone OpenVINO uses: actions/checkout@v3 @@ -27,7 +27,7 @@ jobs: - name: Install apt-get dependencies uses: awalsh128/cache-apt-pkgs-action@v1.1.3 with: - packages: graphviz texlive liblua5.2-0 + packages: graphviz texlive liblua5.2-0 libclang1-9 libclang-cpp9 version: 3.0 - uses: actions/setup-python@v4 @@ -98,7 +98,7 @@ jobs: uses: actions/upload-artifact@v3 with: name: openvino_docs_${{ env.PR_NUMBER }}_html.zip - path: build/docs/openvino_docs_html.zip + path: openvino_docs_html.zip - name: Run Pytest run: | diff --git a/docs/CMakeLists.txt b/docs/CMakeLists.txt index 509aeb11b66bd7..77b0bd16b2267e 100644 --- a/docs/CMakeLists.txt +++ b/docs/CMakeLists.txt @@ -126,8 +126,8 @@ function(build_docs) get_filename_component(OVMS_DOCS_DIR "${OVMS_DOCS_DIR}" ABSOLUTE) list(APPEND commands COMMAND ${PYTHON_EXECUTABLE} ${DOXY_MD_FILTER} - --input_dir=${OVMS_DOCS_DIR} - --output_dir=${DOCS_BUILD_DIR}/ovms) + --input_dir=${OVMS_DOCS_DIR} + --output_dir=${DOCS_BUILD_DIR}/ovms) endif() add_custom_target(preprocess_docs diff --git a/docs/Documentation/model_introduction.md b/docs/Documentation/model_introduction.md index c6f19ec10cd53e..bae1df2014b549 100644 --- a/docs/Documentation/model_introduction.md +++ b/docs/Documentation/model_introduction.md @@ -28,7 +28,3 @@ This section describes the how to obtain and prepare your model for work with Op * [Automate model-related tasks with Model Downloader and additional OMZ Tools](https://docs.openvino.ai/latest/omz_tools_downloader.html). To begin with, you may want to [browse a database of models for use in your projects](../model_zoo.md). - - - - From 9c0273a70effec35923ff58ee8fa491580df96ad Mon Sep 17 00:00:00 2001 From: Ilya Lavrenov Date: Wed, 28 Dec 2022 23:52:03 +0400 Subject: [PATCH 9/9] Updated github_org_control/config.json --- .github/github_org_control/config.json | 22 +++++++++++++++------- .github/workflows/build_doc.yml | 8 +++----- 2 files changed, 18 insertions(+), 12 deletions(-) diff --git a/.github/github_org_control/config.json b/.github/github_org_control/config.json index a0ddd443d9a894..5c07218fbd6209 100644 --- a/.github/github_org_control/config.json +++ b/.github/github_org_control/config.json @@ -19,26 +19,34 @@ }, "DRY_RUN": false, "TEAM_TO_LABEL": { - "openvino-admins": "category: CI", - "openvino-maintainers": "category: IE common", + "openvino-ci-maintainers": "category: CI", + "openvino-maintainers": "category: inference", "openvino-docs-maintainers": "category: docs", - "openvino-ie-maintainers": "category: IE common", + "openvino-ie-maintainers": "category: inference", "openvino-ie-cpu-maintainers": "category: CPU", "openvino-ie-gna-maintainers": "category: GNA", "openvino-ie-gpu-maintainers": "category: GPU", "openvino-ie-lpt-maintainers": "category: LP transformations", - "openvino-ie-auto-multi-maintainers": "category: MULTI", - "openvino-ie-python-api-maintainers": "category: python api", + "openvino-ie-transformations-maintainers": "category: transformations", + "openvino-ie-auto-multi-maintainers": "category: AUTO", + "openvino-auto-batch-maintainers": "category: AUTO BATCH", + "openvino-hetero-maintainers": "category: HETERO", + "openvino-ie-python-api-maintainers": "category: Python API", "openvino-ie-template-maintainers": "category: TEMPLATE", + "openvino-ir-frontend-maintainers": "category: IR FE", + "openvino-ie-paddle-maintainers": "category: PDPD FE", + "openvino-tf-frontend-maintainers": "category: TF FE", + "openvino-onnx-frontend-maintainers": "category: ONNX FE", "openvino-ie-tests-maintainers": "category: IE Tests", "openvino-ie-vpu-maintainers": "category: VPU", "openvino-mo-maintainers": "category: MO", - "openvino-ngraph-maintainers": "category: nGraph", + "openvino-ngraph-maintainers": "category: Core", "openvino-scripts-maintainers": "category: build", "openvino-tests-maintainers": "category: IE Tests", "openvino-tools-maintainers": "category: tools", "openvino-pot-maintainers": "category: POT", "openvino-configuration-mgmt": "category: dependency_changes", - "openvino-samples-maintainers": "category: samples" + "openvino-samples-maintainers": "category: samples", + "openvino-c-api-maintainers": "category: C API" } } diff --git a/.github/workflows/build_doc.yml b/.github/workflows/build_doc.yml index fc39754db0002f..72b2a4e7b984d5 100644 --- a/.github/workflows/build_doc.yml +++ b/.github/workflows/build_doc.yml @@ -39,8 +39,6 @@ jobs: docs/requirements.txt docs/openvino_sphinx_theme/setup.py - - run: echo '${{ steps.cp310.outputs.cache-hit }}' - - name: Install python dependencies run: | python3 -m pip install -r docs/requirements.txt @@ -75,7 +73,7 @@ jobs: run: cmake --build build --target sphinx_docs --parallel ${{ steps.cpu-cores.outputs.count }} - name: Archive docs HTML - run: zip -r openvino_docs_html.zip build/docs/_build + run: (cd build/docs && zip -r openvino_docs_html.zip _build) - name: Set PR number run: | @@ -97,8 +95,8 @@ jobs: - name: 'Upload docs html' uses: actions/upload-artifact@v3 with: - name: openvino_docs_${{ env.PR_NUMBER }}_html.zip - path: openvino_docs_html.zip + name: openvino_docs_html_${{ env.PR_NUMBER }}.zip + path: build/docs/openvino_docs_html.zip - name: Run Pytest run: |