From 320187d4991730aedeed5fb5edcccac0f42055c2 Mon Sep 17 00:00:00 2001 From: Andrei Kashchikhin Date: Tue, 12 Nov 2024 09:48:45 +0000 Subject: [PATCH] use simpler inputs for install action --- .github/actions/install_ov_wheels/action.yml | 33 +++---------------- .github/workflows/job_pytorch_layer_tests.yml | 3 +- .../workflows/job_tensorflow_layer_tests.yml | 3 +- .github/workflows/job_tokenizers.yml | 3 +- .github/workflows/windows_vs2019_release.yml | 9 ++--- 5 files changed, 11 insertions(+), 40 deletions(-) diff --git a/.github/actions/install_ov_wheels/action.yml b/.github/actions/install_ov_wheels/action.yml index 429bda131d6539..dc07fc2373e2d6 100644 --- a/.github/actions/install_ov_wheels/action.yml +++ b/.github/actions/install_ov_wheels/action.yml @@ -4,11 +4,8 @@ inputs: wheels-dir-path: description: 'Path to the directory in which wheels are located' required: true - install-core-wheel: - description: 'Whether to install the OpenVINO Core wheel (openvino-*.whl)' - required: true - install-tokenizers-wheel: - description: 'Whether to install the OpenVINO Dev wheel (openvino_tokenizes*.whl)' + wheels-to-install: + description: 'List of wheel names to install in the form of "openvino openvino-dev openvino-tokenizers"' required: true runs: using: 'composite' @@ -16,29 +13,9 @@ runs: - name: Install OpenVINO Python wheels (Windows) shell: pwsh if: runner.os == 'Windows' - run: | - if ( "${{ inputs.install-core-wheel }}" -eq "true" ) - { - $pyVersion = python3 -c "import sys; print(f'{sys.version_info.major}{sys.version_info.minor}')" - $ovCoreWheelPath = Get-ChildItem -Path ${{ inputs.wheels-dir-path }} -Filter "openvino-*cp$pyVersion*.whl" | % { $_.FullName } - python3 -m pip install $ovCoreWheelPath - } - - if ( "${{ inputs.install-tokenizers-wheel }}" -eq "true" ) - { - $ovTokenizersWheelPath = Get-ChildItem -Path ${{ inputs.wheels-dir-path }} -Filter openvino_tokenizers-*.whl | % { $_.FullName } - python3 -m pip install "$ovTokenizersWheelPath" - } + run: python3 -m pip install ${{ inputs.wheels-to-install }} --find-links ${{ inputs.wheels-dir-path }} --no-index --no-cache + - name: Install OpenVINO Python wheels (Linux and macOS) shell: bash if: runner.os != 'Windows' - run: | - if [[ "${{ inputs.install-core-wheel }}" == "true" ]]; then - py_version=$(python3 -c "import sys; print(f'{sys.version_info.major}{sys.version_info.minor}')") - ov_wheel_path=$(find ${{ inputs.wheels-dir-path }} -name "openvino-*cp$py_version*.whl") - python3 -m pip install $ov_wheel_path - fi - - if [[ "${{ inputs.install-tokenizers-wheel }}" == "true" ]]; then - python3 -m pip install ${{ inputs.wheels-dir-path }}/openvino_tokenizers-*.whl - fi + run: python3 -m pip install ${{ inputs.wheels-to-install }} --find-links ${{ inputs.wheels-dir-path }} --no-index --no-cache diff --git a/.github/workflows/job_pytorch_layer_tests.yml b/.github/workflows/job_pytorch_layer_tests.yml index f9b5988a3cba81..271b7948d435dc 100644 --- a/.github/workflows/job_pytorch_layer_tests.yml +++ b/.github/workflows/job_pytorch_layer_tests.yml @@ -105,8 +105,7 @@ jobs: uses: ./openvino/.github/actions/install_ov_wheels with: wheels-dir-path: ${{ env.INSTALL_WHEELS_DIR }} - install-core-wheel: true - install-tokenizers-wheel: false + wheels-to-install: 'openvino' - name: Install Pytorch Layer tests dependencies run: | diff --git a/.github/workflows/job_tensorflow_layer_tests.yml b/.github/workflows/job_tensorflow_layer_tests.yml index 6207906646abff..1be1046e603b74 100644 --- a/.github/workflows/job_tensorflow_layer_tests.yml +++ b/.github/workflows/job_tensorflow_layer_tests.yml @@ -105,8 +105,7 @@ jobs: uses: ./openvino/.github/actions/install_ov_wheels with: wheels-dir-path: ${{ env.INSTALL_WHEELS_DIR }} - install-core-wheel: true - install-tokenizers-wheel: true + wheels-to-install: 'openvino openvino-tokenizers' - name: Install Python Layer tests dependencies run: | diff --git a/.github/workflows/job_tokenizers.yml b/.github/workflows/job_tokenizers.yml index f3b1f3f72fe60c..1068ec550d1752 100644 --- a/.github/workflows/job_tokenizers.yml +++ b/.github/workflows/job_tokenizers.yml @@ -99,8 +99,7 @@ jobs: uses: ./.github/actions/install_ov_wheels with: wheels-dir-path: ${{ env.INSTALL_WHEELS_DIR }} - install-core-wheel: true - install-tokenizers-wheel: false + wheels-to-install: 'openvino' # # Build diff --git a/.github/workflows/windows_vs2019_release.yml b/.github/workflows/windows_vs2019_release.yml index 159e213fc2a0ae..18b49f9fc6a8fe 100644 --- a/.github/workflows/windows_vs2019_release.yml +++ b/.github/workflows/windows_vs2019_release.yml @@ -142,8 +142,7 @@ jobs: uses: ./openvino/.github/actions/install_ov_wheels with: wheels-dir-path: ${{ env.INSTALL_WHEELS_DIR }} - install-core-wheel: true - install-tokenizers-wheel: false + wheels-to-install: 'openvino' - name: Samples tests run: | @@ -302,8 +301,7 @@ jobs: uses: ./openvino/.github/actions/install_ov_wheels with: wheels-dir-path: ${{ env.INSTALL_WHEELS_DIR }} - install-core-wheel: true - install-tokenizers-wheel: false + wheels-to-install: 'openvino' - name: Install Python API tests dependencies run: | @@ -464,8 +462,7 @@ jobs: uses: ./openvino/.github/actions/install_ov_wheels with: wheels-dir-path: ${{ env.INSTALL_WHEELS_DIR }} - install-core-wheel: true - install-tokenizers-wheel: false + wheels-to-install: 'openvino' - name: Install Python API tests dependencies run: python3 -m pip install -r ${{ env.INSTALL_TEST_DIR }}/bindings/python/requirements_test.txt