Build OpenVINO wheels #23
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
name: Build OpenVINO wheels | |
on: | |
workflow_dispatch: | |
inputs: | |
repository: | |
description: 'Repository' | |
required: true | |
default: 'openvinotoolkit/openvino' | |
branch: | |
description: 'Branch' | |
required: true | |
default: 'master' | |
os: | |
# only ubuntu-20.04 and 22.04 are tested. Change Python version or dependencies for other OSs | |
description: 'OS' | |
required: true | |
default: 'ubuntu-22.04' | |
concurrency: | |
group: ${{ github.workflow }}-${{ github.event.pull_request.number || github.run_id }} | |
cancel-in-progress: true | |
jobs: | |
build_wheel: | |
runs-on: ${{ matrix.os }} | |
strategy: | |
fail-fast: false | |
matrix: | |
os: ["${{github.event.inputs.os}}",] | |
python: ["3.8", "3.10"] | |
exclude: | |
- os: ubuntu-20.04 | |
python: "3.10" | |
- os: ubuntu-22.04 | |
python: "3.8" | |
steps: | |
- name: Checkout repository | |
uses: actions/checkout@v3 | |
with: | |
repository: ${{ github.event.inputs.repository }} | |
ref: ${{ github.event.inputs.branch }} | |
submodules: recursive | |
- name: Set up Python | |
uses: actions/setup-python@v4 | |
with: | |
python-version: ${{ matrix.python }} | |
- name: Install Linux build dependencies | |
run: | | |
sudo -E ./install_build_dependencies.sh | |
sudo apt install intel-opencl-icd opencl-headers | |
if: runner.os == 'Linux' | |
- name: Install Python dependencies | |
run: | | |
python -m pip install --upgrade pip | |
python -m pip install -r src/bindings/python/src/compatibility/openvino/requirements-dev.txt | |
python -m pip install -r src/bindings/python/wheel/requirements-dev.txt | |
mkdir build | |
- name: Build wheel | |
run: | | |
# python setup.py bdist_wheel | |
cmake -DCMAKE_BUILD_TYPE=Release -DENABLE_INTEL_GPU=ON -DENABLE_OPENCV=OFF -DENABLE_OV_ONNX_FRONTEND=ON -DENABLE_DOCS=OFF -DENABLE_SAMPLES=OFF -DENABLE_INTEL_MYRIAD=OFF -DENABLE_INTEL_GNA=OFF -DENABLE_PYTHON=ON -DENABLE_WHEEL=ON .. && make --jobs=$(nproc --all) | |
working-directory: build | |
- name: Add info | |
run: | | |
git log -n 10 > build/wheels/info.txt | |
- name: Create wheel artifacts | |
uses: actions/upload-artifact@v2 | |
with: | |
name: wheels-${{ matrix.os }} | |
path: build/wheels | |