forked from openvinotoolkit/openvino_notebooks
-
Notifications
You must be signed in to change notification settings - Fork 0
70 lines (67 loc) · 2.19 KB
/
install_requirements.yml
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
name: install_requirements
on:
workflow_dispatch:
pull_request:
branches:
- 'main'
paths:
- '.github/workflows/install_requirements.yml'
- 'check_install.py'
jobs:
build_install_requirements:
runs-on: ${{ matrix.os }}
strategy:
fail-fast: false
matrix:
os: [ubuntu-20.04, ubuntu-22.04, windows-2019, windows-2022, macos-11, macos-12]
python: ["3.7", "3.8", "3.9", "3.10"]
steps:
- name: Checkout repository
uses: actions/checkout@v2
- name: Dotenv Action
id: dotenv
uses: xom9ikk/[email protected]
with:
path: ./.github/workflows
- name: Set up Python
uses: actions/setup-python@v1
with:
python-version: ${{ matrix.python }}
- name: Cache OpenVINO Pip Packages
id: cachepip
uses: actions/cache@v2
with:
path: |
pipcache
key: ${{ env.PIP_CACHE_KEY }}-${{ matrix.os }}-${{ matrix.python }}
- name: Cache openvino packages
if: steps.cachepip.outputs.cache-hit != 'true'
run: |
python -m pip install --upgrade pip
mkdir pipcache
python -m pip install --cache-dir pipcache --no-deps openvino openvino-dev nncf
cp -r pipcache pipcache_openvino
python -m pip uninstall -y openvino openvino-dev nncf
- name: Install dependencies
run: |
python -m pip install --upgrade pip
python -m pip install -r .ci/dev-requirements.txt --cache-dir pipcache
python -m ipykernel install --user --name openvino_env
- name: Make pipcache directory with OpenVINO packages
# Only cache OpenVINO packages. mv works cross-platform
if: steps.cachepip.outputs.cache-hit != 'true'
run: |
mv pipcache pipcache_full
mv pipcache_openvino pipcache
- name: Pip freeze
run: |
python -m pip freeze
python -m pip freeze > pip-freeze-${{ github.sha }}-${{matrix.os}}-${{ matrix.python }}.txt
- name: Archive pip freeze
uses: actions/upload-artifact@v2
with:
name: pip-freeze
path: pip-freeze-${{ github.sha }}-${{matrix.os}}-${{ matrix.python }}.txt
- name: Check install
run: |
python check_install.py