From 3a25cc0d04a3ae14874c7ab869bc2e6dbf20705a Mon Sep 17 00:00:00 2001 From: Andrei Kashchikhin Date: Thu, 26 Oct 2023 15:29:35 +0100 Subject: [PATCH 01/21] add platform-agnostic setup python action --- .github/actions/setup_python/action.yml | 61 +++++++++++++ .github/workflows/linux.yml | 111 ++++++++++-------------- 2 files changed, 106 insertions(+), 66 deletions(-) create mode 100644 .github/actions/setup_python/action.yml diff --git a/.github/actions/setup_python/action.yml b/.github/actions/setup_python/action.yml new file mode 100644 index 00000000000000..7eea39bca68475 --- /dev/null +++ b/.github/actions/setup_python/action.yml @@ -0,0 +1,61 @@ +name: 'Setup Python and pip cache' +description: 'Setups Python with the provided version and sets up the pip cache' +inputs: + version: + description: 'Python version to install' + required: true + pip-cache-path: + description: 'Path on share where the pip cache is stored' + required: false + should-setup-pip-paths: + description: 'If the action should setup `PIP_CACHE_DIR` & `PIP_INSTALL_PATH` env variables' + required: false + default: 'false' + self-hosted-runner: + description: 'If the runner is self-hosted' + required: false + default: 'true' +runs: + using: 'composite' + steps: + + - if: runner.os == 'Linux' && ${{ inputs.self-hosted-runner == 'true' }} + name: Install 'actions/setup-python@v4' dependencies + shell: bash + run: apt-get update && apt-get install -y libssl1.1 ca-certificates + + - if: runner.os == 'Linux' && runner.arch == 'ARM64' + name: Setup sudo + shell: bash + run: apt-get update && apt-get install -y sudo # Needed for the deadsnakes action + + - if: runner.os == 'Linux' && runner.arch == 'ARM64' + name: Setup Python ${{ inputs.version }} + uses: deadsnakes/action@v3 + with: + python-version: ${{ inputs.version }} + + - if: runner.os == 'macOS' || runner.os == 'Windows' || (runner.os == 'Linux' && runner.arch != 'ARM64') + name: Setup Python ${{ inputs.version }} + uses: actions/setup-python@v4 + with: + python-version: ${{ inputs.version }} + + - if: ${{ inputs.should-setup-pip-paths == 'true' }} + name: Setup pip variables (cache and install path) + shell: bash + run: | + PIP_VER=$(python3 -c "import pip; print(pip.__version__)") + echo "Using pip version: ${PIP_VER}" + echo "PIP_CACHE_DIR=${{ inputs.pip-cache-path }}/${PIP_VER}" >> $GITHUB_ENV + echo "PIP_INSTALL_PATH=$(python3 -c 'import sysconfig; print(sysconfig.get_paths()["purelib"])')" >> $GITHUB_ENV + + - if: ${{ inputs.should-setup-pip-paths == 'true' }} + name: Get pip cache info + shell: bash + run: | + echo "Cache size: " + du -h -d2 ${{ env.PIP_CACHE_DIR }} + echo "Cache info: " + python3 -m pip cache info + continue-on-error: true diff --git a/.github/workflows/linux.yml b/.github/workflows/linux.yml index ae512a64393a19..580ad3d441f954 100644 --- a/.github/workflows/linux.yml +++ b/.github/workflows/linux.yml @@ -89,30 +89,27 @@ jobs: run: | bash ${OPENVINO_REPO}/install_build_dependencies.sh # default-jdk - Java API - # libssl1.1 - 'python3 -m pip' in self-hosted runner - apt install --assume-yes --no-install-recommends default-jdk libssl1.1 + apt install --assume-yes --no-install-recommends default-jdk - name: Install sccache uses: mozilla-actions/sccache-action@v0.0.3 with: version: "v0.5.4" - - uses: actions/setup-python@v4 + - name: Setup Python ${{ env.PYTHON_VERSION }} + uses: ./openvino/.github/actions/setup_python with: - python-version: ${{ env.PYTHON_VERSION }} + version: ${{ env.PYTHON_VERSION }} + pip-cache-path: ${{ env.PIP_CACHE_PATH }} + should-setup-pip-paths: 'true' - - name: Setup pip cache dir - run: | - PIP_VER=$(python3 -c "import pip; print(pip.__version__)") - echo "Using pip version: ${PIP_VER}" - echo "PIP_CACHE_DIR=${PIP_CACHE_PATH}/${PIP_VER}" >> $GITHUB_ENV - - name: Get pip cache info + - name: Check pip vars set by setup action run: | - echo "Cache size: " - du -h -d2 ${PIP_CACHE_DIR} - echo "Cache info: " - python -m pip cache info - continue-on-error: true + echo ${{ env.PIP_CACHE_DIR }} + echo ${{ env.PIP_INSTALL_PATH }} + echo + echo ${PIP_CACHE_DIR} + echo ${PIP_INSTALL_PATH} - name: Install python dependencies run: | @@ -345,15 +342,12 @@ jobs: - name: Install 'actions/setup-python@v4' dependencies run: apt-get update && apt-get install -y libssl1.1 - - uses: actions/setup-python@v4 + - name: Setup Python ${{ env.PYTHON_VERSION }} + uses: ./openvino/.github/actions/setup_python with: - python-version: ${{ env.PYTHON_VERSION }} - - - name: Setup pip cache dir - run: | - PIP_VER=$(python3 -c "import pip; print(pip.__version__)") - echo "Using pip version: ${PIP_VER}" - echo "PIP_CACHE_DIR=${PIP_CACHE_PATH}/${PIP_VER}" >> $GITHUB_ENV + version: ${{ env.PYTHON_VERSION }} + should-setup-pip-paths: 'false' + self-hosted-runner: 'false' - name: Install OpenVINO dependencies run: ${INSTALL_DIR}/install_dependencies/install_openvino_dependencies.sh -c=core -c=dev -y @@ -421,7 +415,6 @@ jobs: - TEST_TYPE: 'OP' - TEST_TYPE: 'API' env: - DEBIAN_FRONTEND: noninteractive # to prevent apt-get from waiting user input INSTALL_DIR: ${{ github.workspace }}/install INSTALL_TEST_DIR: ${{ github.workspace }}/install/tests CONFORMANCE_TOOLS_DIR: ${{ github.workspace }}/install/tests/functional_test_utils/layer_tests_summary @@ -459,17 +452,17 @@ jobs: tar -xzf openvino_tests.tar.gz -C ${INSTALL_DIR} popd - - uses: actions/setup-python@v4 + - name: Setup Python ${{ env.PYTHON_VERSION }} + uses: ./openvino/.github/actions/setup_python with: - python-version: ${{ env.PYTHON_VERSION }} + version: ${{ env.PYTHON_VERSION }} + should-setup-pip-paths: 'false' + self-hosted-runner: 'false' - name: Install Dependencies run: | sudo -E ${INSTALL_DIR}/install_dependencies/install_openvino_dependencies.sh -c=core -y - # Needed for downloading IRs from storage.openvinotoolkit with Python urllib - sudo apt-get update && sudo apt-get install --assume-yes --no-install-recommends ca-certificates - python3 -m pip install -r ${CONFORMANCE_TOOLS_DIR}/requirements.txt # @@ -541,9 +534,11 @@ jobs: apt-get update apt-get install --assume-yes --no-install-recommends git ca-certificates - - uses: actions/setup-python@v4 + - name: Setup Python ${{ env.PYTHON_VERSION }} + uses: ./openvino/.github/actions/setup_python with: - python-version: ${{ env.PYTHON_VERSION }} + version: ${{ env.PYTHON_VERSION }} + should-setup-pip-paths: 'false' # # Initialize OpenVINO @@ -904,19 +899,12 @@ jobs: tar -xzf openvino_tests.tar.gz -C ${INSTALL_DIR} popd - - name: Install 'actions/setup-python@v4' dependencies - run: apt-get update && apt-get install -y libssl1.1 ca-certificates - - uses: actions/setup-python@v4 + - name: Setup Python ${{ env.PYTHON_VERSION }} + uses: ./openvino/.github/actions/setup_python with: - python-version: ${{ env.PYTHON_VERSION }} - env: - PIP_CACHE_DIR: ${{ env.PIP_CACHE_PATH }} - - name: Setup pip cache dir - run: | - PIP_VER=$(python3 -c "import pip; print(pip.__version__)") - echo "Using pip version: ${PIP_VER}" - echo "PIP_CACHE_DIR=${PIP_CACHE_PATH}/${PIP_VER}" >> $GITHUB_ENV - echo "PIP_INSTALL_PATH=${Python_ROOT_DIR}/lib/python${PYTHON_VERSION}/site-packages" >> $GITHUB_ENV + version: ${{ env.PYTHON_VERSION }} + pip-cache-path: ${{ env.PIP_CACHE_PATH }} + should-setup-pip-paths: 'true' - name: Install OpenVINO Python wheels run: | @@ -1126,12 +1114,11 @@ jobs: - name: Install OpenVINO dependencies run: bash ${INSTALL_DIR}/install_dependencies/install_openvino_dependencies.sh -c=core -y - - name: Install 'actions/setup-python@v4' dependencies - run: apt-get update && apt-get install -y libssl1.1 - - - uses: actions/setup-python@v4 + - name: Setup Python ${{ env.PYTHON_VERSION }} + uses: ./openvino/.github/actions/setup_python with: - python-version: ${{ env.PYTHON_VERSION }} + version: ${{ env.PYTHON_VERSION }} + should-setup-pip-paths: 'false' - name: Install python dependencies for run_parallel.py run: python3 -m pip install -r ${INSTALL_TEST_DIR}/functional_test_utils/layer_tests_summary/requirements.txt @@ -1195,18 +1182,12 @@ jobs: - name: Check sudo run: if [ "$(id -u)" -eq 0 ]; then apt update && apt --assume-yes install sudo; fi - - name: Install 'actions/setup-python@v4' dependencies - run: sudo apt-get update && sudo apt-get install -y libssl1.1 ca-certificates - - - uses: actions/setup-python@v4 + - name: Setup Python ${{ env.PYTHON_VERSION }} + uses: ./openvino/.github/actions/setup_python with: - python-version: ${{ env.PYTHON_VERSION }} - - - name: Setup pip cache dir - run: | - PIP_VER=$(python3 -c "import pip; print(pip.__version__)") - echo "Using pip version: ${PIP_VER}" - echo "PIP_CACHE_DIR=${PIP_CACHE_PATH}/${PIP_VER}" >> $GITHUB_ENV + version: ${{ env.PYTHON_VERSION }} + should-setup-pip-paths: 'false' + self-hosted-runner: 'false' - name: Download OpenVINO package uses: actions/download-artifact@v3 @@ -1305,14 +1286,12 @@ jobs: tar -xzf openvino_tests.tar.gz -C ${INSTALL_DIR} popd - - uses: actions/setup-python@v4 + - name: Setup Python ${{ env.PYTHON_VERSION }} + uses: ./openvino/.github/actions/setup_python with: - python-version: ${{ env.PYTHON_VERSION }} - - name: Setup pip cache dir - run: | - PIP_VER=$(python3 -c "import pip; print(pip.__version__)") - echo "Using pip version: ${PIP_VER}" - echo "PIP_CACHE_DIR=${PIP_CACHE_PATH}/${PIP_VER}" >> $GITHUB_ENV + version: ${{ env.PYTHON_VERSION }} + should-setup-pip-paths: 'false' + self-hosted-runner: 'false' - name: Install OpenVINO Python wheels run: python3 -m pip install ${INSTALL_DIR}/tools/openvino-* From 793d5e1c2ffdf8888bd8208e8cc9d6068df03c3c Mon Sep 17 00:00:00 2001 From: Andrei Kashchikhin Date: Thu, 26 Oct 2023 15:41:39 +0100 Subject: [PATCH 02/21] use specific version --- .github/actions/setup_python/action.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/actions/setup_python/action.yml b/.github/actions/setup_python/action.yml index 7eea39bca68475..fa7e7d3ff28896 100644 --- a/.github/actions/setup_python/action.yml +++ b/.github/actions/setup_python/action.yml @@ -31,7 +31,7 @@ runs: - if: runner.os == 'Linux' && runner.arch == 'ARM64' name: Setup Python ${{ inputs.version }} - uses: deadsnakes/action@v3 + uses: deadsnakes/action@v3.0.1 with: python-version: ${{ inputs.version }} From 42e9e6bfaba3008e674f3d1e9f2904c7413b43f1 Mon Sep 17 00:00:00 2001 From: Andrei Kashchikhin Date: Thu, 26 Oct 2023 15:51:20 +0100 Subject: [PATCH 03/21] rm debug message, checkout action --- .github/workflows/linux.yml | 22 +++++----------------- 1 file changed, 5 insertions(+), 17 deletions(-) diff --git a/.github/workflows/linux.yml b/.github/workflows/linux.yml index 580ad3d441f954..92b915555d0522 100644 --- a/.github/workflows/linux.yml +++ b/.github/workflows/linux.yml @@ -103,14 +103,6 @@ jobs: pip-cache-path: ${{ env.PIP_CACHE_PATH }} should-setup-pip-paths: 'true' - - name: Check pip vars set by setup action - run: | - echo ${{ env.PIP_CACHE_DIR }} - echo ${{ env.PIP_INSTALL_PATH }} - echo - echo ${PIP_CACHE_DIR} - echo ${PIP_INSTALL_PATH} - - name: Install python dependencies run: | # For Python API: build and wheel packaging @@ -520,11 +512,12 @@ jobs: ONNX_RUNTIME_BUILD_DIR: /__w/openvino/openvino/onnxruntime/build steps: - - name: Fetch install_build_dependencies.sh + - name: Fetch install_build_dependencies.sh and setup_python action uses: actions/checkout@v4 with: sparse-checkout: | install_build_dependencies.sh + .github/actions/setup_python/.yml sparse-checkout-cone-mode: false path: ${{ env.OPENVINO_REPO }} ref: 'master' @@ -1380,20 +1373,15 @@ jobs: tar -xzf openvino_developer_package.tar.gz -C ${INSTALL_DIR} popd - # TODO: replace with sparse checkout below - - name: Clone OpenVINO - uses: actions/checkout@v4 - with: - path: ${{ env.OPENVINO_REPO }} - - - name: Fetch install_build_dependencies.sh - if: ${{ 'false' }} + - name: Fetch install_build_dependencies.sh and setup_python action uses: actions/checkout@v4 with: sparse-checkout: | install_build_dependencies.sh + .github/actions/setup_python/.yml sparse-checkout-cone-mode: false path: ${{ env.OPENVINO_REPO }} + ref: 'master' - name: Clone OpenVINO Contrib uses: actions/checkout@v4 From b52f57a6a8d3cfb011bafa3e2fbed15974a0f9e4 Mon Sep 17 00:00:00 2001 From: Andrei Kashchikhin Date: Thu, 26 Oct 2023 16:04:49 +0100 Subject: [PATCH 04/21] correct path --- .github/workflows/linux.yml | 6 ++---- 1 file changed, 2 insertions(+), 4 deletions(-) diff --git a/.github/workflows/linux.yml b/.github/workflows/linux.yml index 92b915555d0522..caa44ebcb596a4 100644 --- a/.github/workflows/linux.yml +++ b/.github/workflows/linux.yml @@ -517,10 +517,9 @@ jobs: with: sparse-checkout: | install_build_dependencies.sh - .github/actions/setup_python/.yml + .github/actions/setup_python/action.yml sparse-checkout-cone-mode: false path: ${{ env.OPENVINO_REPO }} - ref: 'master' - name: Install git run: | @@ -1378,10 +1377,9 @@ jobs: with: sparse-checkout: | install_build_dependencies.sh - .github/actions/setup_python/.yml + .github/actions/setup_python/action.yml sparse-checkout-cone-mode: false path: ${{ env.OPENVINO_REPO }} - ref: 'master' - name: Clone OpenVINO Contrib uses: actions/checkout@v4 From 50c5db885e08913a09f7a0491c41cb2260943adb Mon Sep 17 00:00:00 2001 From: Andrei Kashchikhin Date: Thu, 26 Oct 2023 17:29:31 +0100 Subject: [PATCH 05/21] add checkout of the action, correct paths --- .github/workflows/linux.yml | 79 ++++++++++++++++++++++++++++++------- 1 file changed, 65 insertions(+), 14 deletions(-) diff --git a/.github/workflows/linux.yml b/.github/workflows/linux.yml index caa44ebcb596a4..70756358b71c75 100644 --- a/.github/workflows/linux.yml +++ b/.github/workflows/linux.yml @@ -310,6 +310,15 @@ jobs: BUILD_DIR: /__w/openvino/openvino/build steps: + + - name: Fetch setup_python action + uses: actions/checkout@v4 + with: + sparse-checkout: | + .github/actions/setup_python/action.yml + sparse-checkout-cone-mode: false + path: ${{ env.OPENVINO_REPO }} + - name: Download OpenVINO package uses: actions/download-artifact@v3 with: @@ -331,9 +340,6 @@ jobs: tar -xzf openvino_tests.tar.gz -C ${INSTALL_DIR} popd - - name: Install 'actions/setup-python@v4' dependencies - run: apt-get update && apt-get install -y libssl1.1 - - name: Setup Python ${{ env.PYTHON_VERSION }} uses: ./openvino/.github/actions/setup_python with: @@ -415,6 +421,14 @@ jobs: steps: + - name: Fetch setup_python action + uses: actions/checkout@v4 + with: + sparse-checkout: | + .github/actions/setup_python/action.yml + sparse-checkout-cone-mode: false + path: 'openvino' + - name: Create Directories run: | mkdir -p ${CONFORMANCE_ARTIFACTS_DIR} @@ -866,6 +880,15 @@ jobs: LAYER_TESTS_INSTALL_DIR: /__w/openvino/openvino/install/tests/layer_tests steps: + + - name: Fetch setup_python action + uses: actions/checkout@v4 + with: + sparse-checkout: | + .github/actions/setup_python/action.yml + sparse-checkout-cone-mode: false + path: ${{ env.OPENVINO_REPO }} + # # Initialize OpenVINO # @@ -1076,12 +1099,22 @@ jobs: container: image: openvinogithubactions.azurecr.io/dockerhub/ubuntu:20.04 env: + OPENVINO_REPO: /__w/openvino/openvino/openvino INSTALL_DIR: /__w/openvino/openvino/install INSTALL_TEST_DIR: /__w/openvino/openvino/install/tests PARALLEL_TEST_SCRIPT: /__w/openvino/openvino/install/tests/functional_test_utils/layer_tests_summary/run_parallel.py PARALLEL_TEST_CACHE: /__w/openvino/openvino/install/tests/test_cache.lst steps: + + - name: Fetch setup_python action + uses: actions/checkout@v4 + with: + sparse-checkout: | + .github/actions/setup_python/action.yml + sparse-checkout-cone-mode: false + path: ${{ env.OPENVINO_REPO }} + - name: Download OpenVINO package uses: actions/download-artifact@v3 with: @@ -1166,11 +1199,21 @@ jobs: # volumes: # - /mount/caches:/mount/caches env: + OPENVINO_REPO: ${{ github.workspace }}/openvino INSTALL_DIR: ${{ github.workspace }}/install INSTALL_TEST_DIR: ${{ github.workspace }}/install/tests MODEL_HUB_TESTS_INSTALL_DIR: ${{ github.workspace }}/install/tests/model_hub_tests steps: + + - name: Fetch setup_python action + uses: actions/checkout@v4 + with: + sparse-checkout: | + .github/actions/setup_python/action.yml + sparse-checkout-cone-mode: false + path: 'openvino' + - name: Check sudo run: if [ "$(id -u)" -eq 0 ]; then apt update && apt --assume-yes install sudo; fi @@ -1241,18 +1284,25 @@ jobs: # volumes: # - /mount/caches:/mount/caches env: + OPENVINO_REPO: ${{ github.workspace }}/openvino INSTALL_DIR: ${{ github.workspace }}/install INSTALL_TEST_DIR: ${{ github.workspace }}/install/tests MODEL_HUB_TESTS_INSTALL_DIR: ${{ github.workspace }}/install/tests/model_hub_tests steps: + - name: Fetch setup_python action + uses: actions/checkout@v4 + with: + sparse-checkout: | + .github/actions/setup_python/action.yml + sparse-checkout-cone-mode: false + path: 'openvino' + - name: Check sudo run: if [ "$(id -u)" -eq 0 ]; then apt update && apt --assume-yes install sudo; fi - name: Install dependencies run: | - # libssl1.1 - 'python3 -m pip' in self-hosted runner - sudo apt install --assume-yes --no-install-recommends libssl1.1 # install git (required to build pip deps from the sources) # install 'g++' to build 'detectron2' and 'natten' wheels sudo apt-get install --assume-yes --no-install-recommends g++ git ca-certificates @@ -1347,6 +1397,16 @@ jobs: SCCACHE_AZURE_KEY_PREFIX: ubuntu20_x86_64_Release steps: + + - name: Fetch install_build_dependencies.sh and setup_python action + uses: actions/checkout@v4 + with: + sparse-checkout: | + install_build_dependencies.sh + .github/actions/setup_python/action.yml + sparse-checkout-cone-mode: false + path: ${{ env.OPENVINO_REPO }} + - name: Install Prerequisites run: apt update && apt install -y git ca-certificates @@ -1372,15 +1432,6 @@ jobs: tar -xzf openvino_developer_package.tar.gz -C ${INSTALL_DIR} popd - - name: Fetch install_build_dependencies.sh and setup_python action - uses: actions/checkout@v4 - with: - sparse-checkout: | - install_build_dependencies.sh - .github/actions/setup_python/action.yml - sparse-checkout-cone-mode: false - path: ${{ env.OPENVINO_REPO }} - - name: Clone OpenVINO Contrib uses: actions/checkout@v4 with: From 7fe09276db4fe25ddae44da5369a9c0a9362004b Mon Sep 17 00:00:00 2001 From: Andrei Kashchikhin Date: Thu, 26 Oct 2023 18:15:27 +0100 Subject: [PATCH 06/21] correct path; enclose into brackets --- .github/actions/setup_python/action.yml | 8 ++++---- .github/workflows/linux.yml | 2 +- 2 files changed, 5 insertions(+), 5 deletions(-) diff --git a/.github/actions/setup_python/action.yml b/.github/actions/setup_python/action.yml index fa7e7d3ff28896..2dc011f25d2bbe 100644 --- a/.github/actions/setup_python/action.yml +++ b/.github/actions/setup_python/action.yml @@ -19,23 +19,23 @@ runs: using: 'composite' steps: - - if: runner.os == 'Linux' && ${{ inputs.self-hosted-runner == 'true' }} + - if: ${{ runner.os == 'Linux' && inputs.self-hosted-runner == 'true' }} name: Install 'actions/setup-python@v4' dependencies shell: bash run: apt-get update && apt-get install -y libssl1.1 ca-certificates - - if: runner.os == 'Linux' && runner.arch == 'ARM64' + - if: ${{ runner.os == 'Linux' && runner.arch == 'ARM64' }} name: Setup sudo shell: bash run: apt-get update && apt-get install -y sudo # Needed for the deadsnakes action - - if: runner.os == 'Linux' && runner.arch == 'ARM64' + - if: ${{ runner.os == 'Linux' && runner.arch == 'ARM64' }} name: Setup Python ${{ inputs.version }} uses: deadsnakes/action@v3.0.1 with: python-version: ${{ inputs.version }} - - if: runner.os == 'macOS' || runner.os == 'Windows' || (runner.os == 'Linux' && runner.arch != 'ARM64') + - if: ${{ runner.os == 'macOS' || runner.os == 'Windows' || (runner.os == 'Linux' && runner.arch != 'ARM64') }} name: Setup Python ${{ inputs.version }} uses: actions/setup-python@v4 with: diff --git a/.github/workflows/linux.yml b/.github/workflows/linux.yml index 70756358b71c75..291e68d5a6c352 100644 --- a/.github/workflows/linux.yml +++ b/.github/workflows/linux.yml @@ -317,7 +317,7 @@ jobs: sparse-checkout: | .github/actions/setup_python/action.yml sparse-checkout-cone-mode: false - path: ${{ env.OPENVINO_REPO }} + path: 'openvino' - name: Download OpenVINO package uses: actions/download-artifact@v3 From bdf5d077dba858418f8b8561e79c9f931c485fdb Mon Sep 17 00:00:00 2001 From: Andrei Kashchikhin Date: Fri, 27 Oct 2023 09:02:34 +0100 Subject: [PATCH 07/21] transfer linux pipelines to local setup-python action --- .github/workflows/fedora.yml | 11 +++++++++++ .github/workflows/linux_conditional_compilation.yml | 13 +++++-------- 2 files changed, 16 insertions(+), 8 deletions(-) diff --git a/.github/workflows/fedora.yml b/.github/workflows/fedora.yml index 3bb6b69c76d1f1..559aae2bef9223 100644 --- a/.github/workflows/fedora.yml +++ b/.github/workflows/fedora.yml @@ -26,6 +26,10 @@ concurrency: group: ${{ github.event_name == 'push' && github.run_id || github.ref }}-fedora33 cancel-in-progress: true +env: + PIP_CACHE_PATH: /mount/caches/pip/linux + PYTHON_VERSION: '3.11' + jobs: Build: timeout-minutes: 150 @@ -59,6 +63,13 @@ jobs: path: ${{ env.OPENVINO_REPO }} submodules: 'true' + - name: Setup Python ${{ env.PYTHON_VERSION }} + uses: ./openvino/.github/actions/setup_python + with: + version: ${{ env.PYTHON_VERSION }} + should-setup-pip-paths: 'true' + self-hosted-runner: 'true' + # # Dependencies # diff --git a/.github/workflows/linux_conditional_compilation.yml b/.github/workflows/linux_conditional_compilation.yml index 74bfd4e2e203ce..60f30016828d23 100644 --- a/.github/workflows/linux_conditional_compilation.yml +++ b/.github/workflows/linux_conditional_compilation.yml @@ -93,15 +93,12 @@ jobs: with: version: "v0.5.4" - - uses: actions/setup-python@v4 + - name: Setup Python ${{ env.PYTHON_VERSION }} + uses: ./openvino/.github/actions/setup_python with: - python-version: ${{ env.PYTHON_VERSION }} - - - name: Setup pip cache dir - run: | - PIP_VER=$(python3 -c "import pip; print(pip.__version__)") - echo "Using pip version: ${PIP_VER}" - echo "PIP_CACHE_DIR=${PIP_CACHE_PATH}/${PIP_VER}" >> $GITHUB_ENV + version: ${{ env.PYTHON_VERSION }} + should-setup-pip-paths: 'true' + self-hosted-runner: 'true' - name: Install python dependencies run: | From 7950b58773609e82102e55906d0a81352b41a08b Mon Sep 17 00:00:00 2001 From: Andrei Kashchikhin Date: Fri, 27 Oct 2023 09:13:56 +0100 Subject: [PATCH 08/21] transfer pipelines --- .github/workflows/linux.yml | 1 + .github/workflows/mac.yml | 47 +++++++++++++------ .github/workflows/windows.yml | 23 +++++---- .../windows_conditional_compilation.yml | 44 ++++++++++++----- 4 files changed, 79 insertions(+), 36 deletions(-) diff --git a/.github/workflows/linux.yml b/.github/workflows/linux.yml index 291e68d5a6c352..5a90887cead72a 100644 --- a/.github/workflows/linux.yml +++ b/.github/workflows/linux.yml @@ -102,6 +102,7 @@ jobs: version: ${{ env.PYTHON_VERSION }} pip-cache-path: ${{ env.PIP_CACHE_PATH }} should-setup-pip-paths: 'true' + self-hosted-runner: 'true' - name: Install python dependencies run: | diff --git a/.github/workflows/mac.yml b/.github/workflows/mac.yml index c39df9691fd78b..53a838ce02dbbb 100644 --- a/.github/workflows/mac.yml +++ b/.github/workflows/mac.yml @@ -4,14 +4,14 @@ on: schedule: # at 00:00 on workdays - cron: '0 0 * * 1,2,3,4,5' -# pull_request: -# paths-ignore: -# - '**/docs/**' -# - 'docs/**' -# - '**/**.md' -# - '**.md' -# - '**/layer_tests_summary/**' -# - '**/conformance/**' + pull_request: + paths-ignore: + - '**/docs/**' + - 'docs/**' + - '**/**.md' + - '**.md' + - '**/layer_tests_summary/**' + - '**/conformance/**' # push: # paths-ignore: # - '**/docs/**' @@ -81,9 +81,12 @@ jobs: - name: Install build dependencies run: brew install coreutils ninja scons - - uses: actions/setup-python@v4 + - name: Setup Python ${{ env.PYTHON_VERSION }} + uses: ./openvino/.github/actions/setup_python with: - python-version: ${{ env.PYTHON_VERSION }} + version: ${{ env.PYTHON_VERSION }} + should-setup-pip-paths: 'false' + self-hosted-runner: 'false' - name: Install python dependencies run: | @@ -203,11 +206,21 @@ jobs: machine: 'macos-13-xlarge' runs-on: ${{ matrix.machine }} env: + OPENVINO_REPO: ${{ github.workspace }}/openvino INSTALL_DIR: ${{ github.workspace }}/install INSTALL_TEST_DIR: ${{ github.workspace }}/install/tests BUILD_DIR: ${{ github.workspace }}/build steps: + + - name: Fetch setup_python action + uses: actions/checkout@v4 + with: + sparse-checkout: | + .github/actions/setup_python/action.yml + sparse-checkout-cone-mode: false + path: 'openvino' + # # Initialize OpenVINO # @@ -237,9 +250,12 @@ jobs: - name: Install dependencies run: brew install coreutils - - uses: actions/setup-python@v4 + - name: Setup Python ${{ env.PYTHON_VERSION }} + uses: ./openvino/.github/actions/setup_python with: - python-version: ${{ env.PYTHON_VERSION }} + version: ${{ env.PYTHON_VERSION }} + should-setup-pip-paths: 'false' + self-hosted-runner: 'false' - name: Build cpp samples run: ${INSTALL_DIR}/samples/cpp/build_samples.sh -i ${INSTALL_DIR} -b ${BUILD_DIR}/cpp_samples @@ -544,9 +560,12 @@ jobs: # Dependencies # - - uses: actions/setup-python@v4 + - name: Setup Python ${{ env.PYTHON_VERSION }} + uses: ./openvino/.github/actions/setup_python with: - python-version: ${{ env.PYTHON_VERSION }} + version: ${{ env.PYTHON_VERSION }} + should-setup-pip-paths: 'false' + self-hosted-runner: 'false' - name: Download OpenVINO package uses: actions/download-artifact@v3 diff --git a/.github/workflows/windows.yml b/.github/workflows/windows.yml index 84e9209aecb092..0082c69abb9be5 100644 --- a/.github/workflows/windows.yml +++ b/.github/workflows/windows.yml @@ -4,14 +4,14 @@ on: schedule: # at 00:00 on workdays - cron: '0 0 * * 1,2,3,4,5' -# pull_request: -# paths-ignore: -# - '**/docs/**' -# - 'docs/**' -# - '**/**.md' -# - '**.md' -# - '**/layer_tests_summary/**' -# - '**/conformance/**' + pull_request: + paths-ignore: + - '**/docs/**' + - 'docs/**' + - '**/**.md' + - '**.md' + - '**/layer_tests_summary/**' + - '**/conformance/**' # push: # paths-ignore: # - '**/docs/**' @@ -66,9 +66,12 @@ jobs: # Dependencies # - - uses: actions/setup-python@v4 + - name: Setup Python ${{ env.PYTHON_VERSION }} + uses: ./openvino/.github/actions/setup_python with: - python-version: ${{ env.PYTHON_VERSION }} + version: ${{ env.PYTHON_VERSION }} + should-setup-pip-paths: 'false' + self-hosted-runner: 'false' - name: Install python dependencies run: | diff --git a/.github/workflows/windows_conditional_compilation.yml b/.github/workflows/windows_conditional_compilation.yml index d506272d0ad510..6bccab52720333 100644 --- a/.github/workflows/windows_conditional_compilation.yml +++ b/.github/workflows/windows_conditional_compilation.yml @@ -4,14 +4,14 @@ on: schedule: # run daily at 00:00 - cron: '0 0 * * *' -# pull_request: -# paths-ignore: -# - '**/docs/**' -# - 'docs/**' -# - '**/**.md' -# - '**.md' -# - '**/layer_tests_summary/**' -# - '**/conformance/**' + pull_request: + paths-ignore: + - '**/docs/**' + - 'docs/**' + - '**/**.md' + - '**.md' + - '**/layer_tests_summary/**' + - '**/conformance/**' # push: # paths-ignore: # - '**/docs/**' @@ -68,13 +68,30 @@ jobs: # Dependencies # - - uses: actions/setup-python@v4 + - name: Setup Python ${{ env.PYTHON_VERSION }} + uses: ./openvino/.github/actions/setup_python with: - python-version: ${{ env.PYTHON_VERSION }} + version: ${{ env.PYTHON_VERSION }} + should-setup-pip-paths: 'false' + self-hosted-runner: 'false' - name: Install build dependencies run: choco install --no-progress ninja + - name: Install python dependencies + run: | + # For running ONNX frontend unit tests + python3 -m pip install --force-reinstall -r ${{ env.OPENVINO_REPO }}/src/frontends/onnx/tests/requirements.txt + + # For running TensorFlow frontend unit tests + python3 -m pip install -r ${{ env.OPENVINO_REPO }}/src/frontends/tensorflow/tests/requirements.txt + + # For running TensorFlow Lite frontend unit tests + python3 -m pip install -r ${{ env.OPENVINO_REPO }}/src/frontends/tensorflow_lite/tests/requirements.txt + + # For running Paddle frontend unit tests + python3 -m pip install -r ${{ env.OPENVINO_REPO }}/src/frontends/paddle/tests/requirements.txt + # # Build # @@ -278,9 +295,12 @@ jobs: - name: Extract OpenVINO tests package run: Expand-Archive ${{ env.INSTALL_TEST_DIR }}/openvino_tests.zip -DestinationPath "${{ env.INSTALL_TEST_DIR }}" - - uses: actions/setup-python@v4 + - name: Setup Python ${{ env.PYTHON_VERSION }} + uses: ./openvino/.github/actions/setup_python with: - python-version: ${{ env.PYTHON_VERSION }} + version: ${{ env.PYTHON_VERSION }} + should-setup-pip-paths: 'false' + self-hosted-runner: 'false' - name: Install python dependencies for run_parallel.py run: python3 -m pip install -r ${{ env.INSTALL_TEST_DIR }}/layer_tests_summary/requirements.txt From cb4e12e67558c4d8721add26d050d2e74e99d6b1 Mon Sep 17 00:00:00 2001 From: Andrei Kashchikhin Date: Fri, 27 Oct 2023 09:28:14 +0100 Subject: [PATCH 09/21] use newer version --- .github/actions/setup_python/action.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/actions/setup_python/action.yml b/.github/actions/setup_python/action.yml index 2dc011f25d2bbe..b55b6cc68b5dc4 100644 --- a/.github/actions/setup_python/action.yml +++ b/.github/actions/setup_python/action.yml @@ -22,7 +22,7 @@ runs: - if: ${{ runner.os == 'Linux' && inputs.self-hosted-runner == 'true' }} name: Install 'actions/setup-python@v4' dependencies shell: bash - run: apt-get update && apt-get install -y libssl1.1 ca-certificates + run: apt-get update && apt-get install -y libssl3 ca-certificates - if: ${{ runner.os == 'Linux' && runner.arch == 'ARM64' }} name: Setup sudo From 4bfbc985fde84f584b0ea73f68f89f12924b2a54 Mon Sep 17 00:00:00 2001 From: Andrei Kashchikhin Date: Fri, 27 Oct 2023 09:35:52 +0100 Subject: [PATCH 10/21] account for fedora, add missing cache path --- .github/actions/setup_python/action.yml | 8 +++++++- .github/workflows/fedora.yml | 1 + .github/workflows/linux_conditional_compilation.yml | 1 + 3 files changed, 9 insertions(+), 1 deletion(-) diff --git a/.github/actions/setup_python/action.yml b/.github/actions/setup_python/action.yml index b55b6cc68b5dc4..5de56501a54338 100644 --- a/.github/actions/setup_python/action.yml +++ b/.github/actions/setup_python/action.yml @@ -22,7 +22,13 @@ runs: - if: ${{ runner.os == 'Linux' && inputs.self-hosted-runner == 'true' }} name: Install 'actions/setup-python@v4' dependencies shell: bash - run: apt-get update && apt-get install -y libssl3 ca-certificates + run: | + # Fedora + if [[ -e /etc/fedora-release ]]; then + echo "Inside a Fedora container, no need to install dependencies." + else + apt-get update && apt-get install -y ca-certificates + fi - if: ${{ runner.os == 'Linux' && runner.arch == 'ARM64' }} name: Setup sudo diff --git a/.github/workflows/fedora.yml b/.github/workflows/fedora.yml index 559aae2bef9223..20ccc59e9ead02 100644 --- a/.github/workflows/fedora.yml +++ b/.github/workflows/fedora.yml @@ -67,6 +67,7 @@ jobs: uses: ./openvino/.github/actions/setup_python with: version: ${{ env.PYTHON_VERSION }} + pip-cache-path: ${{ env.PIP_CACHE_PATH }} should-setup-pip-paths: 'true' self-hosted-runner: 'true' diff --git a/.github/workflows/linux_conditional_compilation.yml b/.github/workflows/linux_conditional_compilation.yml index 60f30016828d23..9c1f955a6604ea 100644 --- a/.github/workflows/linux_conditional_compilation.yml +++ b/.github/workflows/linux_conditional_compilation.yml @@ -97,6 +97,7 @@ jobs: uses: ./openvino/.github/actions/setup_python with: version: ${{ env.PYTHON_VERSION }} + pip-cache-path: ${{ env.PIP_CACHE_PATH }} should-setup-pip-paths: 'true' self-hosted-runner: 'true' From 5c8d35e16151d3efafc7691978372bb424ee2ed9 Mon Sep 17 00:00:00 2001 From: Andrei Kashchikhin Date: Fri, 27 Oct 2023 09:43:04 +0100 Subject: [PATCH 11/21] correct name --- .github/workflows/fedora.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/fedora.yml b/.github/workflows/fedora.yml index 20ccc59e9ead02..088f4198a35f91 100644 --- a/.github/workflows/fedora.yml +++ b/.github/workflows/fedora.yml @@ -1,4 +1,4 @@ -name: Fedora (RHEL), Python 3.9 +name: Fedora (RHEL), Python 3.11 on: workflow_dispatch: pull_request: From b17aa613a4dfce02bbad6c8b830d1b5ebe490167 Mon Sep 17 00:00:00 2001 From: Andrei Kashchikhin Date: Fri, 27 Oct 2023 09:46:47 +0100 Subject: [PATCH 12/21] use 3.9 for fedora --- .github/workflows/fedora.yml | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/.github/workflows/fedora.yml b/.github/workflows/fedora.yml index 088f4198a35f91..327f8633a1261b 100644 --- a/.github/workflows/fedora.yml +++ b/.github/workflows/fedora.yml @@ -1,4 +1,4 @@ -name: Fedora (RHEL), Python 3.11 +name: Fedora (RHEL), Python 3.9 on: workflow_dispatch: pull_request: @@ -28,7 +28,7 @@ concurrency: env: PIP_CACHE_PATH: /mount/caches/pip/linux - PYTHON_VERSION: '3.11' + PYTHON_VERSION: '3.9' jobs: Build: From 4c5d9e977584fa207fd02e2917d5ebbc9f26bbbe Mon Sep 17 00:00:00 2001 From: Andrei Kashchikhin Date: Fri, 27 Oct 2023 09:54:08 +0100 Subject: [PATCH 13/21] rm python install from fedora --- .github/workflows/fedora.yml | 12 ------------ 1 file changed, 12 deletions(-) diff --git a/.github/workflows/fedora.yml b/.github/workflows/fedora.yml index 327f8633a1261b..3bb6b69c76d1f1 100644 --- a/.github/workflows/fedora.yml +++ b/.github/workflows/fedora.yml @@ -26,10 +26,6 @@ concurrency: group: ${{ github.event_name == 'push' && github.run_id || github.ref }}-fedora33 cancel-in-progress: true -env: - PIP_CACHE_PATH: /mount/caches/pip/linux - PYTHON_VERSION: '3.9' - jobs: Build: timeout-minutes: 150 @@ -63,14 +59,6 @@ jobs: path: ${{ env.OPENVINO_REPO }} submodules: 'true' - - name: Setup Python ${{ env.PYTHON_VERSION }} - uses: ./openvino/.github/actions/setup_python - with: - version: ${{ env.PYTHON_VERSION }} - pip-cache-path: ${{ env.PIP_CACHE_PATH }} - should-setup-pip-paths: 'true' - self-hosted-runner: 'true' - # # Dependencies # From 9989d957fbaa1d26df2aaf4c5a30d5c0e9ac6978 Mon Sep 17 00:00:00 2001 From: Andrei Kashchikhin Date: Fri, 27 Oct 2023 10:47:55 +0100 Subject: [PATCH 14/21] mv fetch and setup together, set pip_cache_dir --- .github/actions/setup_python/action.yml | 10 +- .github/workflows/linux.yml | 136 +++++++++++------------- .github/workflows/mac.yml | 16 +-- 3 files changed, 76 insertions(+), 86 deletions(-) diff --git a/.github/actions/setup_python/action.yml b/.github/actions/setup_python/action.yml index 5de56501a54338..5c26561cac3ca2 100644 --- a/.github/actions/setup_python/action.yml +++ b/.github/actions/setup_python/action.yml @@ -22,13 +22,7 @@ runs: - if: ${{ runner.os == 'Linux' && inputs.self-hosted-runner == 'true' }} name: Install 'actions/setup-python@v4' dependencies shell: bash - run: | - # Fedora - if [[ -e /etc/fedora-release ]]; then - echo "Inside a Fedora container, no need to install dependencies." - else - apt-get update && apt-get install -y ca-certificates - fi + run: apt-get update && apt-get install -y ca-certificates - if: ${{ runner.os == 'Linux' && runner.arch == 'ARM64' }} name: Setup sudo @@ -46,6 +40,8 @@ runs: uses: actions/setup-python@v4 with: python-version: ${{ inputs.version }} + env: + PIP_CACHE_DIR: ${{ inputs.self-hosted-runner == 'true' && inputs.pip-cache-path || '' }} - if: ${{ inputs.should-setup-pip-paths == 'true' }} name: Setup pip variables (cache and install path) diff --git a/.github/workflows/linux.yml b/.github/workflows/linux.yml index 5a90887cead72a..c639b1273ed876 100644 --- a/.github/workflows/linux.yml +++ b/.github/workflows/linux.yml @@ -311,15 +311,6 @@ jobs: BUILD_DIR: /__w/openvino/openvino/build steps: - - - name: Fetch setup_python action - uses: actions/checkout@v4 - with: - sparse-checkout: | - .github/actions/setup_python/action.yml - sparse-checkout-cone-mode: false - path: 'openvino' - - name: Download OpenVINO package uses: actions/download-artifact@v3 with: @@ -341,6 +332,17 @@ jobs: tar -xzf openvino_tests.tar.gz -C ${INSTALL_DIR} popd + - name: Install OpenVINO dependencies + run: ${INSTALL_DIR}/install_dependencies/install_openvino_dependencies.sh -c=core -c=dev -y + + - name: Fetch setup_python action + uses: actions/checkout@v4 + with: + sparse-checkout: | + .github/actions/setup_python/action.yml + sparse-checkout-cone-mode: false + path: 'openvino' + - name: Setup Python ${{ env.PYTHON_VERSION }} uses: ./openvino/.github/actions/setup_python with: @@ -348,9 +350,6 @@ jobs: should-setup-pip-paths: 'false' self-hosted-runner: 'false' - - name: Install OpenVINO dependencies - run: ${INSTALL_DIR}/install_dependencies/install_openvino_dependencies.sh -c=core -c=dev -y - - name: Build cpp samples - GCC run: ${INSTALL_DIR}/samples/cpp/build_samples.sh -i ${INSTALL_DIR} -b ${BUILD_DIR}/cpp_samples env: @@ -421,15 +420,6 @@ jobs: TEST_DEVICE: 'CPU' steps: - - - name: Fetch setup_python action - uses: actions/checkout@v4 - with: - sparse-checkout: | - .github/actions/setup_python/action.yml - sparse-checkout-cone-mode: false - path: 'openvino' - - name: Create Directories run: | mkdir -p ${CONFORMANCE_ARTIFACTS_DIR} @@ -459,6 +449,20 @@ jobs: tar -xzf openvino_tests.tar.gz -C ${INSTALL_DIR} popd + - name: Install Dependencies + run: | + sudo -E ${INSTALL_DIR}/install_dependencies/install_openvino_dependencies.sh -c=core -y + + python3 -m pip install -r ${CONFORMANCE_TOOLS_DIR}/requirements.txt + + - name: Fetch setup_python action + uses: actions/checkout@v4 + with: + sparse-checkout: | + .github/actions/setup_python/action.yml + sparse-checkout-cone-mode: false + path: 'openvino' + - name: Setup Python ${{ env.PYTHON_VERSION }} uses: ./openvino/.github/actions/setup_python with: @@ -466,12 +470,6 @@ jobs: should-setup-pip-paths: 'false' self-hosted-runner: 'false' - - name: Install Dependencies - run: | - sudo -E ${INSTALL_DIR}/install_dependencies/install_openvino_dependencies.sh -c=core -y - - python3 -m pip install -r ${CONFORMANCE_TOOLS_DIR}/requirements.txt - # # Tests # @@ -881,15 +879,6 @@ jobs: LAYER_TESTS_INSTALL_DIR: /__w/openvino/openvino/install/tests/layer_tests steps: - - - name: Fetch setup_python action - uses: actions/checkout@v4 - with: - sparse-checkout: | - .github/actions/setup_python/action.yml - sparse-checkout-cone-mode: false - path: ${{ env.OPENVINO_REPO }} - # # Initialize OpenVINO # @@ -915,6 +904,14 @@ jobs: tar -xzf openvino_tests.tar.gz -C ${INSTALL_DIR} popd + - name: Fetch setup_python action + uses: actions/checkout@v4 + with: + sparse-checkout: | + .github/actions/setup_python/action.yml + sparse-checkout-cone-mode: false + path: ${{ env.OPENVINO_REPO }} + - name: Setup Python ${{ env.PYTHON_VERSION }} uses: ./openvino/.github/actions/setup_python with: @@ -1107,15 +1104,6 @@ jobs: PARALLEL_TEST_CACHE: /__w/openvino/openvino/install/tests/test_cache.lst steps: - - - name: Fetch setup_python action - uses: actions/checkout@v4 - with: - sparse-checkout: | - .github/actions/setup_python/action.yml - sparse-checkout-cone-mode: false - path: ${{ env.OPENVINO_REPO }} - - name: Download OpenVINO package uses: actions/download-artifact@v3 with: @@ -1140,6 +1128,14 @@ jobs: - name: Install OpenVINO dependencies run: bash ${INSTALL_DIR}/install_dependencies/install_openvino_dependencies.sh -c=core -y + - name: Fetch setup_python action + uses: actions/checkout@v4 + with: + sparse-checkout: | + .github/actions/setup_python/action.yml + sparse-checkout-cone-mode: false + path: ${{ env.OPENVINO_REPO }} + - name: Setup Python ${{ env.PYTHON_VERSION }} uses: ./openvino/.github/actions/setup_python with: @@ -1206,25 +1202,9 @@ jobs: MODEL_HUB_TESTS_INSTALL_DIR: ${{ github.workspace }}/install/tests/model_hub_tests steps: - - - name: Fetch setup_python action - uses: actions/checkout@v4 - with: - sparse-checkout: | - .github/actions/setup_python/action.yml - sparse-checkout-cone-mode: false - path: 'openvino' - - name: Check sudo run: if [ "$(id -u)" -eq 0 ]; then apt update && apt --assume-yes install sudo; fi - - name: Setup Python ${{ env.PYTHON_VERSION }} - uses: ./openvino/.github/actions/setup_python - with: - version: ${{ env.PYTHON_VERSION }} - should-setup-pip-paths: 'false' - self-hosted-runner: 'false' - - name: Download OpenVINO package uses: actions/download-artifact@v3 with: @@ -1247,6 +1227,21 @@ jobs: tar -xzf openvino_tests.tar.gz -C ${INSTALL_DIR} popd + - name: Fetch setup_python action + uses: actions/checkout@v4 + with: + sparse-checkout: | + .github/actions/setup_python/action.yml + sparse-checkout-cone-mode: false + path: 'openvino' + + - name: Setup Python ${{ env.PYTHON_VERSION }} + uses: ./openvino/.github/actions/setup_python + with: + version: ${{ env.PYTHON_VERSION }} + should-setup-pip-paths: 'false' + self-hosted-runner: 'false' + - name: Install OpenVINO Python wheels run: python3 -m pip install ${INSTALL_DIR}/tools/openvino-* @@ -1291,14 +1286,6 @@ jobs: MODEL_HUB_TESTS_INSTALL_DIR: ${{ github.workspace }}/install/tests/model_hub_tests steps: - - name: Fetch setup_python action - uses: actions/checkout@v4 - with: - sparse-checkout: | - .github/actions/setup_python/action.yml - sparse-checkout-cone-mode: false - path: 'openvino' - - name: Check sudo run: if [ "$(id -u)" -eq 0 ]; then apt update && apt --assume-yes install sudo; fi @@ -1329,6 +1316,14 @@ jobs: tar -xzf openvino_tests.tar.gz -C ${INSTALL_DIR} popd + - name: Fetch setup_python action + uses: actions/checkout@v4 + with: + sparse-checkout: | + .github/actions/setup_python/action.yml + sparse-checkout-cone-mode: false + path: 'openvino' + - name: Setup Python ${{ env.PYTHON_VERSION }} uses: ./openvino/.github/actions/setup_python with: @@ -1399,12 +1394,11 @@ jobs: steps: - - name: Fetch install_build_dependencies.sh and setup_python action + - name: Fetch install_build_dependencies.sh uses: actions/checkout@v4 with: sparse-checkout: | install_build_dependencies.sh - .github/actions/setup_python/action.yml sparse-checkout-cone-mode: false path: ${{ env.OPENVINO_REPO }} diff --git a/.github/workflows/mac.yml b/.github/workflows/mac.yml index 53a838ce02dbbb..55985ca8f4c9eb 100644 --- a/.github/workflows/mac.yml +++ b/.github/workflows/mac.yml @@ -213,14 +213,6 @@ jobs: steps: - - name: Fetch setup_python action - uses: actions/checkout@v4 - with: - sparse-checkout: | - .github/actions/setup_python/action.yml - sparse-checkout-cone-mode: false - path: 'openvino' - # # Initialize OpenVINO # @@ -250,6 +242,14 @@ jobs: - name: Install dependencies run: brew install coreutils + - name: Fetch setup_python action + uses: actions/checkout@v4 + with: + sparse-checkout: | + .github/actions/setup_python/action.yml + sparse-checkout-cone-mode: false + path: 'openvino' + - name: Setup Python ${{ env.PYTHON_VERSION }} uses: ./openvino/.github/actions/setup_python with: From d9fb7f60ad15e7d9be51b66b181532ee427e69b6 Mon Sep 17 00:00:00 2001 From: Andrei Kashchikhin Date: Fri, 27 Oct 2023 11:21:11 +0100 Subject: [PATCH 15/21] correct order --- .github/workflows/linux.yml | 12 ++++++------ 1 file changed, 6 insertions(+), 6 deletions(-) diff --git a/.github/workflows/linux.yml b/.github/workflows/linux.yml index c639b1273ed876..309383082bcf68 100644 --- a/.github/workflows/linux.yml +++ b/.github/workflows/linux.yml @@ -449,12 +449,6 @@ jobs: tar -xzf openvino_tests.tar.gz -C ${INSTALL_DIR} popd - - name: Install Dependencies - run: | - sudo -E ${INSTALL_DIR}/install_dependencies/install_openvino_dependencies.sh -c=core -y - - python3 -m pip install -r ${CONFORMANCE_TOOLS_DIR}/requirements.txt - - name: Fetch setup_python action uses: actions/checkout@v4 with: @@ -470,6 +464,12 @@ jobs: should-setup-pip-paths: 'false' self-hosted-runner: 'false' + - name: Install Dependencies + run: | + sudo -E ${INSTALL_DIR}/install_dependencies/install_openvino_dependencies.sh -c=core -y + + python3 -m pip install -r ${CONFORMANCE_TOOLS_DIR}/requirements.txt + # # Tests # From 565a992cc9ec6caab6d0409d0f6360c747c2238b Mon Sep 17 00:00:00 2001 From: Andrei Kashchikhin Date: Fri, 27 Oct 2023 13:05:01 +0100 Subject: [PATCH 16/21] rm triggers --- .github/workflows/mac.yml | 16 ++++++++-------- .github/workflows/windows.yml | 16 ++++++++-------- .../windows_conditional_compilation.yml | 16 ++++++++-------- 3 files changed, 24 insertions(+), 24 deletions(-) diff --git a/.github/workflows/mac.yml b/.github/workflows/mac.yml index 55985ca8f4c9eb..5360bf41177fbf 100644 --- a/.github/workflows/mac.yml +++ b/.github/workflows/mac.yml @@ -4,14 +4,14 @@ on: schedule: # at 00:00 on workdays - cron: '0 0 * * 1,2,3,4,5' - pull_request: - paths-ignore: - - '**/docs/**' - - 'docs/**' - - '**/**.md' - - '**.md' - - '**/layer_tests_summary/**' - - '**/conformance/**' +# pull_request: +# paths-ignore: +# - '**/docs/**' +# - 'docs/**' +# - '**/**.md' +# - '**.md' +# - '**/layer_tests_summary/**' +# - '**/conformance/**' # push: # paths-ignore: # - '**/docs/**' diff --git a/.github/workflows/windows.yml b/.github/workflows/windows.yml index 0082c69abb9be5..25945bd7e16a9b 100644 --- a/.github/workflows/windows.yml +++ b/.github/workflows/windows.yml @@ -4,14 +4,14 @@ on: schedule: # at 00:00 on workdays - cron: '0 0 * * 1,2,3,4,5' - pull_request: - paths-ignore: - - '**/docs/**' - - 'docs/**' - - '**/**.md' - - '**.md' - - '**/layer_tests_summary/**' - - '**/conformance/**' +# pull_request: +# paths-ignore: +# - '**/docs/**' +# - 'docs/**' +# - '**/**.md' +# - '**.md' +# - '**/layer_tests_summary/**' +# - '**/conformance/**' # push: # paths-ignore: # - '**/docs/**' diff --git a/.github/workflows/windows_conditional_compilation.yml b/.github/workflows/windows_conditional_compilation.yml index 6bccab52720333..2307d9903b0334 100644 --- a/.github/workflows/windows_conditional_compilation.yml +++ b/.github/workflows/windows_conditional_compilation.yml @@ -4,14 +4,14 @@ on: schedule: # run daily at 00:00 - cron: '0 0 * * *' - pull_request: - paths-ignore: - - '**/docs/**' - - 'docs/**' - - '**/**.md' - - '**.md' - - '**/layer_tests_summary/**' - - '**/conformance/**' +# pull_request: +# paths-ignore: +# - '**/docs/**' +# - 'docs/**' +# - '**/**.md' +# - '**.md' +# - '**/layer_tests_summary/**' +# - '**/conformance/**' # push: # paths-ignore: # - '**/docs/**' From 725f5302e7ae1748b17fe1304607c8aaae19eb2a Mon Sep 17 00:00:00 2001 From: Andrei Kashchikhin Date: Tue, 31 Oct 2023 09:22:08 +0000 Subject: [PATCH 17/21] add missing pythonpaths --- .github/workflows/mac.yml | 27 ++++++++++++++------------- .github/workflows/windows.yml | 28 ++++++++++++++++------------ 2 files changed, 30 insertions(+), 25 deletions(-) diff --git a/.github/workflows/mac.yml b/.github/workflows/mac.yml index d96593f45fd4ea..8f58465c39878c 100644 --- a/.github/workflows/mac.yml +++ b/.github/workflows/mac.yml @@ -4,14 +4,14 @@ on: schedule: # at 00:00 on workdays - cron: '0 0 * * 1,2,3,4,5' -# pull_request: -# paths-ignore: -# - '**/docs/**' -# - 'docs/**' -# - '**/**.md' -# - '**.md' -# - '**/layer_tests_summary/**' -# - '**/conformance/**' + pull_request: + paths-ignore: + - '**/docs/**' + - 'docs/**' + - '**/**.md' + - '**.md' + - '**/layer_tests_summary/**' + - '**/conformance/**' # push: # paths-ignore: # - '**/docs/**' @@ -642,9 +642,9 @@ jobs: - name: MO Python API Tests run: | python3 -m pip install -r ${{ env.LAYER_TESTS_INSTALL_DIR }}/requirements.txt - export PYTHONPATH=${{ env.LAYER_TESTS_INSTALL_DIR }}:$PYTHONPATH - # TODO: remove setupvars.sh from here; currently, it's used for 'test_utils' installed in '/python/openvino' - source ${INSTALL_DIR}/setupvars.sh + + # Used for 'test_utils' installed in '/tests/python/openvino/test_utils' + export PYTHONPATH=${{ env.INSTALL_TEST_DIR }}/tests/python/openvino/test_utils:$PYTHONPATH python3 -m pytest ${{ env.LAYER_TESTS_INSTALL_DIR }}/mo_python_api_tests/ --junitxml=${{ env.INSTALL_TEST_DIR }}/TEST-test_mo_convert.xml env: @@ -654,8 +654,9 @@ jobs: - name: OVC Python API Tests run: | python3 -m pip install -r ${{ env.LAYER_TESTS_INSTALL_DIR }}/requirements.txt - # TODO: remove setupvars.sh from here; currently, it's used for 'test_utils' installed in '/python/openvino' - source ${{ env.INSTALL_DIR }}/setupvars.sh + + # Used for 'test_utils' installed in '/tests/python/openvino/test_utils' + export PYTHONPATH=${{ env.INSTALL_TEST_DIR }}/tests/python/openvino/test_utils:$PYTHONPATH python3 -m pytest ${{ env.LAYER_TESTS_INSTALL_DIR }}/ovc_python_api_tests --junitxml=${{ env.INSTALL_TEST_DIR }}/TEST-test_ovc_convert.xml env: diff --git a/.github/workflows/windows.yml b/.github/workflows/windows.yml index ad171aea071144..c4da9c03c1acac 100644 --- a/.github/workflows/windows.yml +++ b/.github/workflows/windows.yml @@ -4,14 +4,14 @@ on: schedule: # at 00:00 on workdays - cron: '0 0 * * 1,2,3,4,5' -# pull_request: -# paths-ignore: -# - '**/docs/**' -# - 'docs/**' -# - '**/**.md' -# - '**.md' -# - '**/layer_tests_summary/**' -# - '**/conformance/**' + pull_request: + paths-ignore: + - '**/docs/**' + - 'docs/**' + - '**/**.md' + - '**.md' + - '**/layer_tests_summary/**' + - '**/conformance/**' # push: # paths-ignore: # - '**/docs/**' @@ -421,8 +421,10 @@ jobs: run: | python3 -m pip install -r ${{ env.LAYER_TESTS_INSTALL_DIR }}/requirements.txt - :: TODO: remove setupvars.bat from here; currently, it's used for 'test_utils' installed in '/python/openvino' - call "${{ env.INSTALL_DIR }}\\setupvars.bat" && python3 -m pytest ${{ env.LAYER_TESTS_INSTALL_DIR }}/mo_python_api_tests --junitxml=${{ env.INSTALL_TEST_DIR }}/TEST-test_mo_convert.xml + :: Used for 'test_utils' installed in '\tests\python\openvino\test_utils' + set PYTHONPATH=${{ env.INSTALL_TEST_DIR }}\tests\python\openvino\test_utils;%PYTHONPATH% + + python3 -m pytest ${{ env.LAYER_TESTS_INSTALL_DIR }}/mo_python_api_tests --junitxml=${{ env.INSTALL_TEST_DIR }}/TEST-test_mo_convert.xml env: TEST_DEVICE: CPU TEST_PRECISION: FP16 @@ -432,8 +434,10 @@ jobs: run: | python3 -m pip install -r ${{ env.LAYER_TESTS_INSTALL_DIR }}/requirements.txt - :: TODO: remove setupvars.sh from here; currently, it's used for 'test_utils' installed in '/python/openvino' - call "${{ env.INSTALL_DIR }}\\setupvars.bat" && python3 -m pytest ${{ env.LAYER_TESTS_INSTALL_DIR }}/ovc_python_api_tests --junitxml=${{ env.INSTALL_TEST_DIR }}/TEST-test_ovc_convert.xml + :: Used for 'test_utils' installed in '\tests\python\openvino\test_utils' + set PYTHONPATH=${{ env.INSTALL_TEST_DIR }}\tests\python\openvino\test_utils;%PYTHONPATH% + + python3 -m pytest ${{ env.LAYER_TESTS_INSTALL_DIR }}/ovc_python_api_tests --junitxml=${{ env.INSTALL_TEST_DIR }}/TEST-test_ovc_convert.xml env: TEST_DEVICE: CPU TEST_PRECISION: FP16 From ab579924d5f6f8bf158c3adde208cb507bf0f583 Mon Sep 17 00:00:00 2001 From: Andrei Kashchikhin Date: Tue, 31 Oct 2023 10:36:29 +0000 Subject: [PATCH 18/21] correct path --- .github/workflows/mac.yml | 8 ++++---- .github/workflows/windows.yml | 10 +++++----- 2 files changed, 9 insertions(+), 9 deletions(-) diff --git a/.github/workflows/mac.yml b/.github/workflows/mac.yml index 8f58465c39878c..09709dab7fd017 100644 --- a/.github/workflows/mac.yml +++ b/.github/workflows/mac.yml @@ -643,8 +643,8 @@ jobs: run: | python3 -m pip install -r ${{ env.LAYER_TESTS_INSTALL_DIR }}/requirements.txt - # Used for 'test_utils' installed in '/tests/python/openvino/test_utils' - export PYTHONPATH=${{ env.INSTALL_TEST_DIR }}/tests/python/openvino/test_utils:$PYTHONPATH + # Used for 'test_utils' installed in '/python/openvino/test_utils' + export PYTHONPATH=${{ env.INSTALL_TEST_DIR }}/python/openvino/test_utils:$PYTHONPATH python3 -m pytest ${{ env.LAYER_TESTS_INSTALL_DIR }}/mo_python_api_tests/ --junitxml=${{ env.INSTALL_TEST_DIR }}/TEST-test_mo_convert.xml env: @@ -655,8 +655,8 @@ jobs: run: | python3 -m pip install -r ${{ env.LAYER_TESTS_INSTALL_DIR }}/requirements.txt - # Used for 'test_utils' installed in '/tests/python/openvino/test_utils' - export PYTHONPATH=${{ env.INSTALL_TEST_DIR }}/tests/python/openvino/test_utils:$PYTHONPATH + # Used for 'test_utils' installed in '/python/openvino/test_utils' + export PYTHONPATH=${{ env.INSTALL_TEST_DIR }}/python/openvino/test_utils:$PYTHONPATH python3 -m pytest ${{ env.LAYER_TESTS_INSTALL_DIR }}/ovc_python_api_tests --junitxml=${{ env.INSTALL_TEST_DIR }}/TEST-test_ovc_convert.xml env: diff --git a/.github/workflows/windows.yml b/.github/workflows/windows.yml index c4da9c03c1acac..81de64f45f56a0 100644 --- a/.github/workflows/windows.yml +++ b/.github/workflows/windows.yml @@ -191,7 +191,7 @@ jobs: Samples: needs: Build - timeout-minutes: 10 + timeout-minutes: 15 defaults: run: shell: pwsh @@ -421,8 +421,8 @@ jobs: run: | python3 -m pip install -r ${{ env.LAYER_TESTS_INSTALL_DIR }}/requirements.txt - :: Used for 'test_utils' installed in '\tests\python\openvino\test_utils' - set PYTHONPATH=${{ env.INSTALL_TEST_DIR }}\tests\python\openvino\test_utils;%PYTHONPATH% + :: Used for 'test_utils' installed in '\python\openvino\test_utils' + set PYTHONPATH=${{ env.INSTALL_TEST_DIR }}\python\openvino\test_utils;%PYTHONPATH% python3 -m pytest ${{ env.LAYER_TESTS_INSTALL_DIR }}/mo_python_api_tests --junitxml=${{ env.INSTALL_TEST_DIR }}/TEST-test_mo_convert.xml env: @@ -434,8 +434,8 @@ jobs: run: | python3 -m pip install -r ${{ env.LAYER_TESTS_INSTALL_DIR }}/requirements.txt - :: Used for 'test_utils' installed in '\tests\python\openvino\test_utils' - set PYTHONPATH=${{ env.INSTALL_TEST_DIR }}\tests\python\openvino\test_utils;%PYTHONPATH% + :: Used for 'test_utils' installed in '\python\openvino\test_utils' + set PYTHONPATH=${{ env.INSTALL_TEST_DIR }}\python\openvino\test_utils;%PYTHONPATH% python3 -m pytest ${{ env.LAYER_TESTS_INSTALL_DIR }}/ovc_python_api_tests --junitxml=${{ env.INSTALL_TEST_DIR }}/TEST-test_ovc_convert.xml env: From 9e0c32873b6744102e5c82e56ad1e2ea9a6e4a7d Mon Sep 17 00:00:00 2001 From: Andrei Kashchikhin Date: Tue, 31 Oct 2023 11:51:08 +0000 Subject: [PATCH 19/21] add one more pythonpath --- .github/workflows/mac.yml | 4 ++-- .github/workflows/windows.yml | 4 ++-- 2 files changed, 4 insertions(+), 4 deletions(-) diff --git a/.github/workflows/mac.yml b/.github/workflows/mac.yml index 09709dab7fd017..86853c88a438ba 100644 --- a/.github/workflows/mac.yml +++ b/.github/workflows/mac.yml @@ -644,7 +644,7 @@ jobs: python3 -m pip install -r ${{ env.LAYER_TESTS_INSTALL_DIR }}/requirements.txt # Used for 'test_utils' installed in '/python/openvino/test_utils' - export PYTHONPATH=${{ env.INSTALL_TEST_DIR }}/python/openvino/test_utils:$PYTHONPATH + export PYTHONPATH=${{ env.INSTALL_TEST_DIR }}/python/openvino/test_utils:${{ env.INSTALL_TEST_DIR }}/python:$PYTHONPATH python3 -m pytest ${{ env.LAYER_TESTS_INSTALL_DIR }}/mo_python_api_tests/ --junitxml=${{ env.INSTALL_TEST_DIR }}/TEST-test_mo_convert.xml env: @@ -656,7 +656,7 @@ jobs: python3 -m pip install -r ${{ env.LAYER_TESTS_INSTALL_DIR }}/requirements.txt # Used for 'test_utils' installed in '/python/openvino/test_utils' - export PYTHONPATH=${{ env.INSTALL_TEST_DIR }}/python/openvino/test_utils:$PYTHONPATH + export PYTHONPATH=${{ env.INSTALL_TEST_DIR }}/python/openvino/test_utils:${{ env.INSTALL_TEST_DIR }}/python:$PYTHONPATH python3 -m pytest ${{ env.LAYER_TESTS_INSTALL_DIR }}/ovc_python_api_tests --junitxml=${{ env.INSTALL_TEST_DIR }}/TEST-test_ovc_convert.xml env: diff --git a/.github/workflows/windows.yml b/.github/workflows/windows.yml index 81de64f45f56a0..2b57d73076904a 100644 --- a/.github/workflows/windows.yml +++ b/.github/workflows/windows.yml @@ -422,7 +422,7 @@ jobs: python3 -m pip install -r ${{ env.LAYER_TESTS_INSTALL_DIR }}/requirements.txt :: Used for 'test_utils' installed in '\python\openvino\test_utils' - set PYTHONPATH=${{ env.INSTALL_TEST_DIR }}\python\openvino\test_utils;%PYTHONPATH% + set PYTHONPATH=${{ env.INSTALL_TEST_DIR }}\python\openvino\test_utils;${{ env.INSTALL_TEST_DIR }}\python;%PYTHONPATH% python3 -m pytest ${{ env.LAYER_TESTS_INSTALL_DIR }}/mo_python_api_tests --junitxml=${{ env.INSTALL_TEST_DIR }}/TEST-test_mo_convert.xml env: @@ -435,7 +435,7 @@ jobs: python3 -m pip install -r ${{ env.LAYER_TESTS_INSTALL_DIR }}/requirements.txt :: Used for 'test_utils' installed in '\python\openvino\test_utils' - set PYTHONPATH=${{ env.INSTALL_TEST_DIR }}\python\openvino\test_utils;%PYTHONPATH% + set PYTHONPATH=${{ env.INSTALL_TEST_DIR }}\python\openvino\test_utils;${{ env.INSTALL_TEST_DIR }}\python;%PYTHONPATH% python3 -m pytest ${{ env.LAYER_TESTS_INSTALL_DIR }}/ovc_python_api_tests --junitxml=${{ env.INSTALL_TEST_DIR }}/TEST-test_ovc_convert.xml env: From a775881f3e097fd3ef58806e78b3943df794a746 Mon Sep 17 00:00:00 2001 From: Andrei Kashchikhin Date: Tue, 31 Oct 2023 14:18:23 +0000 Subject: [PATCH 20/21] add paths to ov package libs --- .github/workflows/mac.yml | 10 ++++++---- .github/workflows/windows.yml | 14 ++++++++------ 2 files changed, 14 insertions(+), 10 deletions(-) diff --git a/.github/workflows/mac.yml b/.github/workflows/mac.yml index 86853c88a438ba..d3b52ccef856fb 100644 --- a/.github/workflows/mac.yml +++ b/.github/workflows/mac.yml @@ -643,8 +643,9 @@ jobs: run: | python3 -m pip install -r ${{ env.LAYER_TESTS_INSTALL_DIR }}/requirements.txt - # Used for 'test_utils' installed in '/python/openvino/test_utils' - export PYTHONPATH=${{ env.INSTALL_TEST_DIR }}/python/openvino/test_utils:${{ env.INSTALL_TEST_DIR }}/python:$PYTHONPATH + # Used for 'test_utils' installed in '\python\openvino\test_utils' + PY_PACKAGES_PATH=$(python3 -c "from distutils.sysconfig import get_python_lib; print(get_python_lib())") + export PYTHONPATH=$PY_PACKAGES_PATH/openvino:$PY_PACKAGES_PATH/openvino/libs:${{ env.INSTALL_TEST_DIR }}/python:$PYTHONPATH python3 -m pytest ${{ env.LAYER_TESTS_INSTALL_DIR }}/mo_python_api_tests/ --junitxml=${{ env.INSTALL_TEST_DIR }}/TEST-test_mo_convert.xml env: @@ -655,8 +656,9 @@ jobs: run: | python3 -m pip install -r ${{ env.LAYER_TESTS_INSTALL_DIR }}/requirements.txt - # Used for 'test_utils' installed in '/python/openvino/test_utils' - export PYTHONPATH=${{ env.INSTALL_TEST_DIR }}/python/openvino/test_utils:${{ env.INSTALL_TEST_DIR }}/python:$PYTHONPATH + # Used for 'test_utils' installed in '\python\openvino\test_utils' + PY_PACKAGES_PATH=$(python3 -c "from distutils.sysconfig import get_python_lib; print(get_python_lib())") + export PYTHONPATH=$PY_PACKAGES_PATH/openvino:$PY_PACKAGES_PATH/openvino/libs:${{ env.INSTALL_TEST_DIR }}/python:$PYTHONPATH python3 -m pytest ${{ env.LAYER_TESTS_INSTALL_DIR }}/ovc_python_api_tests --junitxml=${{ env.INSTALL_TEST_DIR }}/TEST-test_ovc_convert.xml env: diff --git a/.github/workflows/windows.yml b/.github/workflows/windows.yml index 2b57d73076904a..3f030796d82640 100644 --- a/.github/workflows/windows.yml +++ b/.github/workflows/windows.yml @@ -417,12 +417,13 @@ jobs: --ignore=${{ env.OPENVINO_REPO }}/src/frontends/onnx/tests/test_python/test_zoo_models.py - name: MO Python API Tests - shell: cmd + shell: pwsh run: | python3 -m pip install -r ${{ env.LAYER_TESTS_INSTALL_DIR }}/requirements.txt - :: Used for 'test_utils' installed in '\python\openvino\test_utils' - set PYTHONPATH=${{ env.INSTALL_TEST_DIR }}\python\openvino\test_utils;${{ env.INSTALL_TEST_DIR }}\python;%PYTHONPATH% + # Used for 'test_utils' installed in '\python\openvino\test_utils' + $env:PY_PACKAGES_PATH=$(python3 -c "from distutils.sysconfig import get_python_lib; print(get_python_lib())") + $env:PYTHONPATH="$env:PY_PACKAGES_PATH/openvino;$env:PY_PACKAGES_PATH/openvino/libs;${{ env.INSTALL_TEST_DIR }}/python;$env:PYTHONPATH" python3 -m pytest ${{ env.LAYER_TESTS_INSTALL_DIR }}/mo_python_api_tests --junitxml=${{ env.INSTALL_TEST_DIR }}/TEST-test_mo_convert.xml env: @@ -430,12 +431,13 @@ jobs: TEST_PRECISION: FP16 - name: OVC Python API Tests - shell: cmd + shell: pwsh run: | python3 -m pip install -r ${{ env.LAYER_TESTS_INSTALL_DIR }}/requirements.txt - :: Used for 'test_utils' installed in '\python\openvino\test_utils' - set PYTHONPATH=${{ env.INSTALL_TEST_DIR }}\python\openvino\test_utils;${{ env.INSTALL_TEST_DIR }}\python;%PYTHONPATH% + # Used for 'test_utils' installed in '\python\openvino\test_utils' + $env:PY_PACKAGES_PATH=$(python -c "from distutils.sysconfig import get_python_lib; print(get_python_lib())") + $env:PYTHONPATH="$env:PY_PACKAGES_PATH/openvino;$env:PY_PACKAGES_PATH/openvino/libs;${{ env.INSTALL_TEST_DIR }}/python;$env:PYTHONPATH" python3 -m pytest ${{ env.LAYER_TESTS_INSTALL_DIR }}/ovc_python_api_tests --junitxml=${{ env.INSTALL_TEST_DIR }}/TEST-test_ovc_convert.xml env: From b39533b9e2c540432d134c374fd7257d9b332216 Mon Sep 17 00:00:00 2001 From: Andrei Kashchikhin Date: Tue, 31 Oct 2023 14:20:04 +0000 Subject: [PATCH 21/21] Revert "add paths to ov package libs" This reverts commit a775881f3e097fd3ef58806e78b3943df794a746. --- .github/workflows/mac.yml | 10 ++++------ .github/workflows/windows.yml | 14 ++++++-------- 2 files changed, 10 insertions(+), 14 deletions(-) diff --git a/.github/workflows/mac.yml b/.github/workflows/mac.yml index d3b52ccef856fb..86853c88a438ba 100644 --- a/.github/workflows/mac.yml +++ b/.github/workflows/mac.yml @@ -643,9 +643,8 @@ jobs: run: | python3 -m pip install -r ${{ env.LAYER_TESTS_INSTALL_DIR }}/requirements.txt - # Used for 'test_utils' installed in '\python\openvino\test_utils' - PY_PACKAGES_PATH=$(python3 -c "from distutils.sysconfig import get_python_lib; print(get_python_lib())") - export PYTHONPATH=$PY_PACKAGES_PATH/openvino:$PY_PACKAGES_PATH/openvino/libs:${{ env.INSTALL_TEST_DIR }}/python:$PYTHONPATH + # Used for 'test_utils' installed in '/python/openvino/test_utils' + export PYTHONPATH=${{ env.INSTALL_TEST_DIR }}/python/openvino/test_utils:${{ env.INSTALL_TEST_DIR }}/python:$PYTHONPATH python3 -m pytest ${{ env.LAYER_TESTS_INSTALL_DIR }}/mo_python_api_tests/ --junitxml=${{ env.INSTALL_TEST_DIR }}/TEST-test_mo_convert.xml env: @@ -656,9 +655,8 @@ jobs: run: | python3 -m pip install -r ${{ env.LAYER_TESTS_INSTALL_DIR }}/requirements.txt - # Used for 'test_utils' installed in '\python\openvino\test_utils' - PY_PACKAGES_PATH=$(python3 -c "from distutils.sysconfig import get_python_lib; print(get_python_lib())") - export PYTHONPATH=$PY_PACKAGES_PATH/openvino:$PY_PACKAGES_PATH/openvino/libs:${{ env.INSTALL_TEST_DIR }}/python:$PYTHONPATH + # Used for 'test_utils' installed in '/python/openvino/test_utils' + export PYTHONPATH=${{ env.INSTALL_TEST_DIR }}/python/openvino/test_utils:${{ env.INSTALL_TEST_DIR }}/python:$PYTHONPATH python3 -m pytest ${{ env.LAYER_TESTS_INSTALL_DIR }}/ovc_python_api_tests --junitxml=${{ env.INSTALL_TEST_DIR }}/TEST-test_ovc_convert.xml env: diff --git a/.github/workflows/windows.yml b/.github/workflows/windows.yml index 3f030796d82640..2b57d73076904a 100644 --- a/.github/workflows/windows.yml +++ b/.github/workflows/windows.yml @@ -417,13 +417,12 @@ jobs: --ignore=${{ env.OPENVINO_REPO }}/src/frontends/onnx/tests/test_python/test_zoo_models.py - name: MO Python API Tests - shell: pwsh + shell: cmd run: | python3 -m pip install -r ${{ env.LAYER_TESTS_INSTALL_DIR }}/requirements.txt - # Used for 'test_utils' installed in '\python\openvino\test_utils' - $env:PY_PACKAGES_PATH=$(python3 -c "from distutils.sysconfig import get_python_lib; print(get_python_lib())") - $env:PYTHONPATH="$env:PY_PACKAGES_PATH/openvino;$env:PY_PACKAGES_PATH/openvino/libs;${{ env.INSTALL_TEST_DIR }}/python;$env:PYTHONPATH" + :: Used for 'test_utils' installed in '\python\openvino\test_utils' + set PYTHONPATH=${{ env.INSTALL_TEST_DIR }}\python\openvino\test_utils;${{ env.INSTALL_TEST_DIR }}\python;%PYTHONPATH% python3 -m pytest ${{ env.LAYER_TESTS_INSTALL_DIR }}/mo_python_api_tests --junitxml=${{ env.INSTALL_TEST_DIR }}/TEST-test_mo_convert.xml env: @@ -431,13 +430,12 @@ jobs: TEST_PRECISION: FP16 - name: OVC Python API Tests - shell: pwsh + shell: cmd run: | python3 -m pip install -r ${{ env.LAYER_TESTS_INSTALL_DIR }}/requirements.txt - # Used for 'test_utils' installed in '\python\openvino\test_utils' - $env:PY_PACKAGES_PATH=$(python -c "from distutils.sysconfig import get_python_lib; print(get_python_lib())") - $env:PYTHONPATH="$env:PY_PACKAGES_PATH/openvino;$env:PY_PACKAGES_PATH/openvino/libs;${{ env.INSTALL_TEST_DIR }}/python;$env:PYTHONPATH" + :: Used for 'test_utils' installed in '\python\openvino\test_utils' + set PYTHONPATH=${{ env.INSTALL_TEST_DIR }}\python\openvino\test_utils;${{ env.INSTALL_TEST_DIR }}\python;%PYTHONPATH% python3 -m pytest ${{ env.LAYER_TESTS_INSTALL_DIR }}/ovc_python_api_tests --junitxml=${{ env.INSTALL_TEST_DIR }}/TEST-test_ovc_convert.xml env: