Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[CI] [GHA] Fix openvino.test_utils imports for Mac and Win Python unittests #20786

Merged
Show file tree
Hide file tree
Changes from 21 commits
Commits
Show all changes
26 commits
Select commit Hold shift + click to select a range
3a25cc0
add platform-agnostic setup python action
akashchi Oct 26, 2023
793d5e1
use specific version
akashchi Oct 26, 2023
42e9e6b
rm debug message, checkout action
akashchi Oct 26, 2023
b52f57a
correct path
akashchi Oct 26, 2023
50c5db8
add checkout of the action, correct paths
akashchi Oct 26, 2023
7fe0927
correct path; enclose into brackets
akashchi Oct 26, 2023
43e335d
Merge commit 'fd88a6b4551da5fdb17064037b400dc130379f6f' into ci/gha/i…
akashchi Oct 27, 2023
bdf5d07
transfer linux pipelines to local setup-python action
akashchi Oct 27, 2023
7950b58
transfer pipelines
akashchi Oct 27, 2023
cb4e12e
use newer version
akashchi Oct 27, 2023
4bfbc98
account for fedora, add missing cache path
akashchi Oct 27, 2023
5c8d35e
correct name
akashchi Oct 27, 2023
6fb5c05
Merge branch 'ci/gha/introduce-linux-arm64-as-matrix' into ci/gha/tra…
akashchi Oct 27, 2023
b17aa61
use 3.9 for fedora
akashchi Oct 27, 2023
4c5d9e9
rm python install from fedora
akashchi Oct 27, 2023
009a110
Merge branch 'ci/gha/introduce-linux-arm64-as-matrix' into ci/gha/tra…
akashchi Oct 27, 2023
9989d95
mv fetch and setup together, set pip_cache_dir
akashchi Oct 27, 2023
d9fb7f6
correct order
akashchi Oct 27, 2023
565a992
rm triggers
akashchi Oct 27, 2023
adcce9b
Merge branch 'ci/gha/introduce-linux-arm64-as-matrix' into ci/gha/fix…
akashchi Oct 31, 2023
725f530
add missing pythonpaths
akashchi Oct 31, 2023
ab57992
correct path
akashchi Oct 31, 2023
9e0c328
add one more pythonpath
akashchi Oct 31, 2023
a775881
add paths to ov package libs
akashchi Oct 31, 2023
b39533b
Revert "add paths to ov package libs"
akashchi Oct 31, 2023
61af56d
merge and rm triggers for mac and win
akashchi Oct 31, 2023
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
63 changes: 63 additions & 0 deletions .github/actions/setup_python/action.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,63 @@
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 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/[email protected]
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 }}
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)
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
Loading
Loading