Skip to content

Commit

Permalink
[CI] [GHA] Add missing setup-python action checkout; use custom act…
Browse files Browse the repository at this point in the history
…ion across all pipelines (openvinotoolkit#20863)

* use unified setup-python actions across all pipelines

* rm triggers
  • Loading branch information
akashchi authored Nov 4, 2023
1 parent cc389c2 commit fda1fd9
Show file tree
Hide file tree
Showing 3 changed files with 62 additions and 10 deletions.
16 changes: 12 additions & 4 deletions .github/workflows/linux_conditional_compilation.yml
Original file line number Diff line number Diff line change
Expand Up @@ -308,6 +308,7 @@ jobs:
container:
image: openvinogithubactions.azurecr.io/dockerhub/ubuntu:22.04
env:
OPENVINO_REPO: /__w/openvino/openvino/openvino
DEBIAN_FRONTEND: noninteractive # to prevent apt-get from waiting user input
INSTALL_TEST_DIR: /__w/openvino/openvino/install/tests
PARALLEL_TEST_SCRIPT: /__w/openvino/openvino/install/tests/src/tests/test_utils/functional_test_utils/layer_tests_summary/run_parallel.py
Expand All @@ -326,12 +327,19 @@ jobs:
- name: Install OpenVINO dependencies
run: bash ${INSTALL_TEST_DIR}/scripts/install_dependencies/install_openvino_dependencies.sh -c=core -c=gpu -y

- name: Install 'actions/setup-python@v4' dependencies
run: apt-get install -y libssl3
- 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 }}

- 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}/src/tests/test_utils/functional_test_utils/layer_tests_summary/requirements.txt
Expand Down
47 changes: 41 additions & 6 deletions .github/workflows/windows.yml
Original file line number Diff line number Diff line change
Expand Up @@ -197,6 +197,7 @@ jobs:
shell: pwsh
runs-on: windows-2019
env:
OPENVINO_REPO: "${{ github.workspace }}\\openvino"
INSTALL_DIR: "${{ github.workspace }}\\install"
INSTALL_TEST_DIR: "${{ github.workspace }}\\install\\tests"
SAMPLES_INSTALL_DIR: "${{ github.workspace }}\\install\\samples"
Expand Down Expand Up @@ -224,9 +225,20 @@ jobs:
Expand-Archive openvino_tests.zip -DestinationPath "${{ env.INSTALL_DIR }}"
popd
- uses: actions/setup-python@v4
- name: Fetch setup_python action
uses: actions/checkout@v4
with:
python-version: ${{ env.PYTHON_VERSION }}
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: Build cpp samples
run: |
Expand Down Expand Up @@ -295,9 +307,20 @@ jobs:
Expand-Archive openvino_tests.zip -DestinationPath "${{ env.INSTALL_DIR }}"
popd
- uses: actions/setup-python@v4
- name: Fetch setup_python action
uses: actions/checkout@v4
with:
python-version: ${{ env.PYTHON_VERSION }}
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: |
Expand Down Expand Up @@ -660,6 +683,7 @@ jobs:
shell: pwsh
runs-on: windows-2019-8-core
env:
OPENVINO_REPO: "${{ github.workspace }}\\openvino"
INSTALL_DIR: "${{ github.workspace }}\\install"
INSTALL_TEST_DIR: "${{ github.workspace }}\\install\\tests"
PARALLEL_TEST_SCRIPT: "${{ github.workspace }}\\install\\tests\\functional_test_utils\\layer_tests_summary\\run_parallel.py"
Expand Down Expand Up @@ -687,9 +711,20 @@ jobs:
Expand-Archive openvino_tests.zip -DestinationPath "${{ env.INSTALL_DIR }}"
popd
- uses: actions/setup-python@v4
- 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:
python-version: ${{ env.PYTHON_VERSION }}
version: ${{ env.PYTHON_VERSION }}
should-setup-pip-paths: 'false'
self-hosted-runner: 'false'

- name: Install python dependencies
shell: cmd
Expand Down
9 changes: 9 additions & 0 deletions .github/workflows/windows_conditional_compilation.yml
Original file line number Diff line number Diff line change
Expand Up @@ -288,6 +288,7 @@ jobs:
shell: pwsh
runs-on: windows-latest-8-cores
env:
OPENVINO_REPO: "${{ github.workspace }}\\openvino"
INSTALL_TEST_DIR: "${{ github.workspace }}\\tests_install"
PARALLEL_TEST_SCRIPT: "${{ github.workspace }}\\tests_install\\layer_tests_summary\\run_parallel.py"
PARALLEL_TEST_CACHE: "${{ github.workspace }}\\tests_install\\test_cache.lst"
Expand All @@ -302,6 +303,14 @@ jobs:
- name: Extract OpenVINO tests package
run: Expand-Archive ${{ env.INSTALL_TEST_DIR }}/openvino_tests.zip -DestinationPath "${{ env.INSTALL_TEST_DIR }}"

- 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:
Expand Down

0 comments on commit fda1fd9

Please sign in to comment.