[CI][GHA] Manylinux x86 build #64
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: Manylinux 2014 | |
on: | |
workflow_dispatch: | |
pull_request: | |
merge_group: | |
push: | |
branches: | |
- master | |
- 'releases/**' | |
concurrency: | |
# github.ref is not unique in post-commit | |
group: ${{ github.event_name == 'push' && github.run_id || github.ref }}-manylinux-2014 | |
cancel-in-progress: true | |
permissions: read-all | |
jobs: | |
Smart_CI: | |
runs-on: ubuntu-latest | |
outputs: | |
affected_components: "${{ steps.smart_ci.outputs.affected_components }}" | |
changed_components: "${{ steps.smart_ci.outputs.changed_components }}" | |
skip_workflow: "${{ steps.smart_ci.outputs.skip_workflow }}" | |
steps: | |
- name: checkout action | |
uses: actions/checkout@11bd71901bbe5b1630ceea73d27597364c9af683 # v4.2.2 | |
with: | |
sparse-checkout: .github/actions/smart-ci | |
- name: Get affected components | |
id: smart_ci | |
uses: ./.github/actions/smart-ci | |
with: | |
repository: ${{ github.repository }} | |
pr: ${{ github.event.number }} | |
commit_sha: ${{ github.sha }} | |
ref_name: ${{ github.ref_name }} | |
component_pattern: "category: (.*)" | |
repo_token: ${{ secrets.GITHUB_TOKEN }} | |
skip_when_only_listed_labels_set: 'docs' | |
skip_when_only_listed_files_changed: '*.md,*.rst,*.png,*.jpg,*.svg' | |
- name: Show affected components | |
run: | | |
echo "${{ toJSON(steps.smart_ci.outputs.affected_components) }}" | |
shell: bash | |
Docker: | |
needs: Smart_CI | |
if: "!needs.smart_ci.outputs.skip_workflow" | |
runs-on: aks-linux-4-cores-16gb-docker-build | |
container: | |
image: openvinogithubactions.azurecr.io/docker_build:0.2 | |
volumes: | |
- /mount:/mount | |
outputs: | |
images: "${{ steps.handle_docker.outputs.images }}" | |
steps: | |
- name: Checkout | |
uses: actions/checkout@11bd71901bbe5b1630ceea73d27597364c9af683 # v4.2.2 | |
- uses: ./.github/actions/handle_docker | |
id: handle_docker | |
with: | |
images: | | |
ov_build/ubuntu_22_04_x64_docker | |
ov_build/manylinux2014_x86_64 | |
registry: 'openvinogithubactions.azurecr.io' | |
dockerfiles_root_dir: '.github/dockerfiles' | |
changed_components: ${{ needs.smart_ci.outputs.changed_components }} | |
Build: | |
needs: [Docker] | |
timeout-minutes: 120 | |
defaults: | |
run: | |
shell: bash | |
runs-on: aks-linux-16-cores-32gb-manylinux | |
if: ${{ github.repository_owner == 'openvinotoolkit' }} | |
container: | |
image: ${{ fromJSON(needs.docker.outputs.images).ov_build.ubuntu_22_04_x64_docker }} | |
volumes: | |
- /mount:/mount | |
options: -e SCCACHE_AZURE_BLOB_CONTAINER -e SCCACHE_AZURE_CONNECTION_STRING -e DOCKER_CONFIG | |
env: | |
CMAKE_BUILD_TYPE: 'Release' | |
GITHUB_WORKSPACE: '/__w/openvino/openvino' | |
OPENVINO_REPO: /__w/openvino/openvino/openvino | |
OPENVINO_CONTRIB_REPO: /__w/openvino/openvino/openvino_contrib | |
INSTALL_DIR: /__w/openvino/openvino/install/openvino | |
INSTALL_WHEELS_DIR: /__w/openvino/install/wheels | |
INSTALL_TEST_DIR: /__w/openvino/openvino/tests_install | |
BUILD_DIR: /__w/openvino/openvino/openvino_build | |
DOCKER_CONFIG: "/mount/.docker" | |
CMAKE_CXX_COMPILER_LAUNCHER: sccache | |
CMAKE_C_COMPILER_LAUNCHER: sccache | |
SCCACHE_IGNORE_SERVER_IO_ERROR: 1 | |
SCCACHE_SERVER_PORT: 35555 | |
SCCACHE_CACHE_SIZE: 50G | |
SCCACHE_AZURE_KEY_PREFIX: manylinux_2014 | |
steps: | |
- name: Clone OpenVINO | |
uses: actions/checkout@11bd71901bbe5b1630ceea73d27597364c9af683 # v4.2.2 | |
with: | |
path: ${{ env.OPENVINO_REPO }} | |
submodules: 'true' | |
- name: System info | |
uses: ./openvino/.github/actions/system_info | |
# - 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 | |
- name: Create docker build cache | |
run: | | |
docker volume create ov_build_cache | |
- name: Build OpenVINO | |
run: | | |
docker run --rm \ | |
-v ${{ github.workspace }}/openvino:/work/src \ | |
-v ov_build_cache:/work/build \ | |
-v ${INSTALL_DIR}:/work/install \ | |
-e SCCACHE_AZURE_BLOB_CONTAINER \ | |
-e SCCACHE_AZURE_CONNECTION_STRING \ | |
-e SCCACHE_SERVER_PORT \ | |
-e SCCACHE_IGNORE_SERVER_IO_ERROR \ | |
-e SCCACHE_CACHE_SIZE \ | |
-e SCCACHE_AZURE_KEY_PREFIX \ | |
-e CMAKE_CXX_COMPILER_LAUNCHER \ | |
-e CMAKE_C_COMPILER_LAUNCHER \ | |
-w /work/src \ | |
${{ fromJSON(needs.docker.outputs.images).ov_build.manylinux2014_x86_64 }} \ | |
/bin/bash -c " | |
cmake -DENABLE_CPPLINT=OFF -DENABLE_NCC_STYLE=OFF -DCMAKE_VERBOSE_MAKEFILE=ON -DBUILD_SHARED_LIBS=ON -DENABLE_PYTHON=OFF -DENABLE_WHEEL=OFF -S /work/src -B /work/build && | |
cmake --build /work/build --parallel $(nproc) --config ${{ env.CMAKE_BUILD_TYPE }} && | |
cmake --install /work/build --config ${{ env.CMAKE_BUILD_TYPE }} --prefix /work/install | |
" | |
- name: Build Python API(Python 3.9) | |
run: | | |
docker run --rm \ | |
-v ${{ github.workspace }}/openvino:/work/src \ | |
-v ov_build_cache:/work/build \ | |
-v ${INSTALL_DIR}:/work/wheels \ | |
-e SCCACHE_AZURE_BLOB_CONTAINER \ | |
-e SCCACHE_AZURE_CONNECTION_STRING \ | |
-e SCCACHE_SERVER_PORT \ | |
-e SCCACHE_IGNORE_SERVER_IO_ERROR \ | |
-e SCCACHE_CACHE_SIZE \ | |
-e SCCACHE_AZURE_KEY_PREFIX \ | |
-e CMAKE_CXX_COMPILER_LAUNCHER \ | |
-e CMAKE_C_COMPILER_LAUNCHER \ | |
-w /work/src \ | |
${{ fromJSON(needs.docker.outputs.images).ov_build.manylinux2014_x86_64 }} \ | |
/bin/bash -c " | |
export PATH=${{ env.PYTHON}}:\$PATH | |
python3 -m pip install -r /work/src/src/bindings/python/wheel/requirements-dev.txt --force-reinstall && | |
cmake -DENABLE_CPPLINT=OFF -DENABLE_NCC_STYLE=OFF -DCMAKE_VERBOSE_MAKEFILE=ON -DBUILD_SHARED_LIBS=ON -DENABLE_WHEEL=ON -S /work/src -B /work/build && | |
cmake --build /work/build --parallel $(nproc) --config ${{ env.CMAKE_BUILD_TYPE }} && | |
cmake --install /work/build --config ${{ env.CMAKE_BUILD_TYPE }} --prefix /work/wheels --component python_wheels | |
" | |
env: | |
PYTHON: /opt/python/cp39-cp39/bin | |
# - name: Dump build cache | |
# run: | | |
# docker run --rm -v ov_build_cache:/mnt -v $(pwd):/backup busybox tar -czf /backup/volume_backup.tar.gz -C /mnt . | |
# | |
# Build | |
# | |
# - name: Clean sccache stats | |
# run: ${SCCACHE_PATH} --zero-stats | |
# - name: CMake configure - OpenVINO | |
# run: | | |
# cmake \ | |
# -G "${{ env.CMAKE_GENERATOR }}" \ | |
# -DENABLE_CPPLINT=OFF \ | |
# -DENABLE_NCC_STYLE=OFF \ | |
# -DCMAKE_VERBOSE_MAKEFILE=ON \ | |
# -DBUILD_SHARED_LIBS=ON \ | |
# -DENABLE_WHEEL=ON \ | |
# -S ${OPENVINO_REPO} \ | |
# -B ${BUILD_DIR} | |
# - name: Cmake build - OpenVINO | |
# run: | | |
# cmake --build ${BUILD_DIR} --parallel $(nproc) --config ${{ env.CMAKE_BUILD_TYPE }} | |
# - name: Show sccache stats | |
# run: ${SCCACHE_PATH} --show-stats | |
# - name: Cmake install - OpenVINO | |
# run: | | |
# cmake -DCMAKE_INSTALL_PREFIX=${INSTALL_DIR} -P ${BUILD_DIR}/cmake_install.cmake --config ${{ env.CMAKE_BUILD_TYPE }} | |
- name: Pack Artifacts | |
run: tar -cvf - * | pigz > ${BUILD_DIR}/openvino_package.tar.gz | |
working-directory: ${{ env.INSTALL_DIR }} | |
# | |
# Upload build artifacts | |
# | |
- name: Upload openvino package | |
if: ${{ always() }} | |
uses: actions/upload-artifact@b4b15b8c7c6ac21ea08fcf65892d2ee8f75cf882 # v4.4.3 | |
with: | |
name: openvino_package | |
path: ${{ env.BUILD_DIR }}/openvino_package.tar.gz | |
if-no-files-found: 'error' | |
- name: Upload openvino wheels | |
uses: actions/upload-artifact@b4b15b8c7c6ac21ea08fcf65892d2ee8f75cf882 # v4.4.3 | |
with: | |
name: openvino_wheels | |
path: ${{ env.INSTALL_WHEELS_DIR }}/wheels/*.whl | |
if-no-files-found: 'error' |