[CI] Test commit #10
Workflow file for this run
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: Linux (Ubuntu 20.04, Python 3.11) | |
on: | |
workflow_dispatch: | |
pull_request: | |
push: | |
branches: | |
- master | |
- 'releases/**' | |
concurrency: | |
# github.ref is not unique in post-commit | |
group: ${{ github.event_name == 'push' && github.run_id || github.ref }}-linux | |
cancel-in-progress: true | |
env: | |
PYTHON_VERSION: '3.11' | |
jobs: | |
openvino_build: | |
timeout-minutes: 150 | |
defaults: | |
run: | |
shell: bash | |
runs-on: ubuntu-20.04-16-cores | |
env: | |
DEBIAN_FRONTEND: noninteractive # to prevent apt-get from waiting user input | |
CMAKE_BUILD_TYPE: 'Release' | |
CMAKE_GENERATOR: 'Ninja Multi-Config' | |
OPENVINO_REPO: ${{ github.workspace }}/openvino | |
INSTALL_DIR: ${{ github.workspace }}/openvino/install | |
BUILD_DIR: ${{ github.workspace }}/openvino/build | |
steps: | |
- name: Set apt retries | |
run: echo 'Acquire::Retries "10";' | sudo tee -a /etc/apt/apt.conf.d/80-retries > /dev/null | |
- name: Install git | |
run: | | |
sudo apt-get update | |
sudo apt-get install --assume-yes --no-install-recommends git ca-certificates | |
- name: Clone OpenVINO | |
uses: actions/checkout@v4 | |
with: | |
repository: 'openvinotoolkit/openvino' | |
path: ${{ env.OPENVINO_REPO }} | |
submodules: 'true' | |
ref: 'master' | |
# | |
# Dependencies | |
# | |
- name: Install build dependencies | |
run: | | |
bash ${OPENVINO_REPO}/install_build_dependencies.sh | |
- name: Install sccache | |
uses: mozilla-actions/[email protected] | |
with: | |
version: "v0.7.5" | |
- name: Setup Python ${{ env.PYTHON_VERSION }} | |
uses: ./openvino/.github/actions/setup_python | |
with: | |
version: ${{ env.PYTHON_VERSION }} | |
pip-cache-path: ${{ env.PIP_CACHE_PATH }} | |
should-setup-pip-paths: 'true' | |
self-hosted-runner: 'true' | |
show-cache-info: 'true' | |
- name: Install python dependencies | |
run: | | |
# For Python API: build and wheel packaging | |
python3 -m pip install -r ${OPENVINO_REPO}/src/bindings/python/wheel/requirements-dev.txt | |
# | |
# Build | |
# | |
- name: CMake configure - OpenVINO | |
run: | | |
cmake \ | |
-G "${{ env.CMAKE_GENERATOR }}" \ | |
-DENABLE_CPPLINT=OFF \ | |
-DENABLE_NCC_STYLE=OFF \ | |
-DENABLE_TESTS=ON \ | |
-DENABLE_STRICT_DEPENDENCIES=OFF \ | |
-DENABLE_SYSTEM_TBB=ON \ | |
-DENABLE_SYSTEM_OPENCL=ON \ | |
-DCMAKE_VERBOSE_MAKEFILE=ON \ | |
-DCPACK_GENERATOR=TGZ \ | |
-DCMAKE_COMPILE_WARNING_AS_ERROR=ON \ | |
-S ${OPENVINO_REPO} \ | |
-B ${BUILD_DIR} | |
- name: Cmake build - OpenVINO | |
run: cmake --build ${BUILD_DIR} --parallel --config ${{ env.CMAKE_BUILD_TYPE }} | |
- name: Cmake install - OpenVINO | |
run: | | |
cmake -DCMAKE_INSTALL_PREFIX=${INSTALL_DIR} -P ${BUILD_DIR}/cmake_install.cmake | |
cmake -DCMAKE_INSTALL_PREFIX=${INSTALL_DIR} -DCOMPONENT=python_wheels -P ${BUILD_DIR}/cmake_install.cmake | |
- name: Pack Artifacts | |
run: | | |
pushd ${INSTALL_DIR} | |
tar -czvf ${BUILD_DIR}/openvino_package.tar.gz * | |
popd | |
# | |
# Upload build artifacts and logs | |
# | |
- name: Upload openvino package | |
if: ${{ always() }} | |
uses: actions/upload-artifact@v3 | |
with: | |
name: openvino_package | |
path: ${{ env.BUILD_DIR }}/openvino_package.tar.gz | |
if-no-files-found: 'error' | |
openvino_tokenizers: | |
name: OpenVINO tokenizers extension | |
needs: [ openvino_build ] | |
timeout-minutes: 25 | |
defaults: | |
run: | |
shell: bash | |
runs-on: ubuntu-20.04-4-cores | |
env: | |
OPENVINO_REPO: ${{ github.workspace }}/openvino | |
INSTALL_DIR: ${{ github.workspace }}/openvino/install | |
OPENVINO_TOKENIZERS_REPO: ${{ github.workspace }}/openvino_tokenizers | |
BUILD_DIR: ${{ github.workspace }}/openvino_tokenizers/build | |
steps: | |
- name: checkout action | |
uses: actions/checkout@v4 | |
with: | |
repository: 'openvinotoolkit/openvino' | |
sparse-checkout: | | |
.github/actions/setup_python | |
install_build_dependencies.sh | |
- name: Setup Python ${{ env.PYTHON_VERSION }} | |
uses: ./.github/actions/setup_python | |
with: | |
version: ${{ env.PYTHON_VERSION }} | |
pip-cache-path: ${{ env.PIP_CACHE_PATH }} | |
should-setup-pip-paths: 'true' | |
self-hosted-runner: 'true' | |
show-cache-info: 'false' | |
- name: Clone Openvino tokenizers | |
uses: actions/checkout@v4 | |
with: | |
path: ${{ env.OPENVINO_TOKENIZERS_REPO }} | |
submodules: 'true' | |
- name: Download OpenVINO package | |
uses: actions/download-artifact@v3 | |
with: | |
name: openvino_package | |
path: ${{ env.INSTALL_DIR }} | |
- name: Extract OpenVINO packages | |
run: | | |
pushd ${INSTALL_DIR} | |
tar -xzf openvino_package.tar.gz -C ${INSTALL_DIR} | |
popd | |
# | |
# Dependencies | |
# | |
- name: Install build dependencies | |
run: ./install_build_dependencies.sh | |
- name: Install python dependencies | |
run: | | |
# wheel packaging | |
python3 -m pip install -r ${OPENVINO_TOKENIZERS_REPO}/requirements-build.txt | |
# | |
# Build | |
# | |
- name: Build tokenizers wheel | |
run: | | |
source ${INSTALL_DIR}/setupvars.sh | |
python -m build --wheel --outdir ${EXTENSION_BUILD_DIR} ${OPENVINO_TOKENIZERS_REPO} | |
env: | |
CMAKE_ARGS: '-DBUILD_FAST_TOKENIZERS=OFF' | |
CMAKE_BUILD_PARALLEL_LEVEL: '4' | |
CMAKE_GENERATOR: 'Unix Makefiles' | |
# | |
# Upload build artifacts | |
# | |
- name: Upload openvino tokenizers wheel | |
if: ${{ always() }} | |
uses: actions/upload-artifact@v3 | |
with: | |
name: openvino_tokenizers_wheel | |
path: ${{ env.EXTENSION_BUILD_DIR }}/*.whl | |
if-no-files-found: 'error' |