[CI] [GHA] Transfer Linux and Windows workflows from Azure to GitHub Actions #5
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: | |
paths-ignore: | |
- 'modules/nvidia_plugin' | |
- 'modules/openvino_code' | |
push: | |
branches: | |
- master | |
- 'releases/**' | |
paths-ignore: | |
- 'modules/nvidia_plugin' | |
- 'modules/openvino_code' | |
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: | |
PIP_CACHE_PATH: /mount/caches/pip/linux | |
PYTHON_VERSION: '3.11' | |
jobs: | |
Build_and_test: | |
name: Build and Test | |
timeout-minutes: 150 | |
defaults: | |
run: | |
shell: bash | |
runs-on: aks-linux-16-cores-32gb | |
container: | |
image: openvinogithubactions.azurecr.io/dockerhub/ubuntu:20.04 | |
volumes: | |
- /mount:/mount | |
options: -e SCCACHE_AZURE_BLOB_CONTAINER -e SCCACHE_AZURE_CONNECTION_STRING | |
env: | |
DEBIAN_FRONTEND: noninteractive # to prevent apt-get from waiting user input | |
CMAKE_BUILD_TYPE: 'Release' | |
CMAKE_CXX_COMPILER_LAUNCHER: sccache | |
CMAKE_C_COMPILER_LAUNCHER: sccache | |
SCCACHE_IGNORE_SERVER_IO_ERROR: 1 | |
SCCACHE_SERVER_PORT: 35555 | |
SCCACHE_ERROR_LOG: /__w/openvino_contrib/sccache_log.txt | |
SCCACHE_LOG: warn | |
GITHUB_WORKSPACE: /__w/openvino_contrib/openvino_contrib | |
OPENVINO_REPO: /__w/openvino_contrib/openvino_contrib/openvino | |
OPENVINO_CONTRIB_REPO: /__w/openvino_contrib/openvino_contrib/openvino_contrib | |
TEST_DATA: /__w/openvino_contrib/openvino_contrib/testdata | |
INSTALL_DIR: /__w/openvino_contrib/openvino_contrib/openvino_install | |
INSTALL_DIR_JS: /__w/openvino_contrib/openvino_contrib/openvino_install/js | |
INSTALL_TEST_DIR: /__w/openvino_contrib/openvino_contrib/tests_install | |
DEVELOPER_PACKAGE_DIR: /__w/openvino_contrib/openvino_contrib/developer_package_install | |
BUILD_DIR: /__w/openvino_contrib/openvino_contrib/openvino_build | |
SCCACHE_AZURE_KEY_PREFIX: ubuntu20_x86_64_Release_Contrib | |
GRADLE_VER: '7.1.1' | |
steps: | |
- name: Set apt retries | |
run: echo 'Acquire::Retries "10";' > /etc/apt/apt.conf.d/80-retries | |
- name: Install git | |
run: | | |
apt-get update | |
apt-get install --assume-yes --no-install-recommends git git-lfs ca-certificates | |
- name: Clone OpenVINO | |
uses: actions/checkout@v4 | |
with: | |
repository: 'openvinotoolkit/openvino' | |
path: ${{ env.OPENVINO_REPO }} | |
submodules: 'true' | |
ref: 'master' | |
- name: Clone OpenVINO Contrib | |
uses: actions/checkout@v4 | |
with: | |
path: ${{ env.OPENVINO_CONTRIB_REPO }} | |
submodules: 'true' | |
- name: Clone Testdata | |
uses: actions/checkout@v4 | |
with: | |
repository: 'openvinotoolkit/testdata' | |
path: ${{ env.TEST_DATA }} | |
lfs: 'true' | |
submodules: 'true' | |
# | |
# Dependencies | |
# | |
- name: Install build dependencies | |
run: | | |
bash ${OPENVINO_REPO}/install_build_dependencies.sh | |
# default-jdk - Java API; unzip for gradle installation | |
apt install --assume-yes --no-install-recommends default-jdk libopencv-dev unzip | |
- name: Setup Gradle | |
uses: gradle/actions/setup-gradle@v3 | |
with: | |
gradle-version: ${{ env.GRADLE_VER }} | |
- name: Install sccache | |
uses: mozilla-actions/sccache-action@v0.0.4 | |
with: | |
version: "v0.7.5" | |
- name: Setup Python ${{ env.PYTHON_VERSION }} | |
uses: actions/setup-python@v5 | |
with: | |
python-version: ${{ env.PYTHON_VERSION }} | |
- name: Install python dependencies | |
run: python3 -m pip install -r ${OPENVINO_REPO}/src/bindings/python/wheel/requirements-dev.txt | |
# | |
# Build | |
# | |
- name: CMake configure - OpenVINO | |
run: | | |
cmake \ | |
-GNinja \ | |
-DCMAKE_VERBOSE_MAKEFILE=ON \ | |
-DCMAKE_BUILD_TYPE=${{ env.CMAKE_BUILD_TYPE }} \ | |
-DBUILD_nvidia_plugin=OFF \ | |
-DENABLE_INTEL_GPU=OFF \ | |
-DENABLE_OV_TF_FRONTEND=OFF \ | |
-DENABLE_OV_PADDLE_FRONTEND=OFF \ | |
-DENABLE_OV_TF_LITE_FRONTEND=OFF \ | |
-DENABLE_OV_PYTORCH_FRONTEND=OFF \ | |
-DOPENVINO_EXTRA_MODULES=${OPENVINO_CONTRIB_REPO}/modules \ | |
-DENABLE_PYTHON=ON \ | |
-DENABLE_WHEEL=ON \ | |
-DCMAKE_CXX_COMPILER_LAUNCHER=${{ env.CMAKE_CXX_COMPILER_LAUNCHER }} \ | |
-DCMAKE_C_COMPILER_LAUNCHER=${{ env.CMAKE_C_COMPILER_LAUNCHER }} \ | |
-S ${OPENVINO_REPO} \ | |
-B ${BUILD_DIR} | |
- name: Clean sccache stats | |
run: ${SCCACHE_PATH} --zero-stats | |
- name: Cmake build | |
run: cmake --build ${BUILD_DIR} --parallel | |
- name: Show sccache stats | |
run: ${SCCACHE_PATH} --show-stats | |
- name: Cmake install | |
run: cmake -DCMAKE_INSTALL_PREFIX=${INSTALL_DIR} -P ${BUILD_DIR}/cmake_install.cmake | |
- name: Java tests | |
working-directory: ${{ env.OPENVINO_CONTRIB_REPO }}/modules/java_api | |
run: | | |
source ${INSTALL_DIR}/setupvars.sh | |
gradle clean build --info | |
for d in CPU HETERO:CPU; do | |
gradle test -Prun_tests -DMODELS_PATH=${TEST_DATA} -Ddevice=$d --info; | |
done | |
- name: Install requirements for custom operations tests | |
run: | | |
python3 -m pip install -r ${OPENVINO_CONTRIB_REPO}/modules/custom_operations/tests/requirements.txt | |
python3 -m pip install ${INSTALL_DIR}/tools/openvino-*.whl | |
- name: Custom user operation tests | |
working-directory: ${{ env.OPENVINO_CONTRIB_REPO }}/modules/custom_operations | |
run: python3 -m pytest -k "not sparse_conv" tests/run_tests.py | |
env: | |
CUSTOM_OP_LIB: ${{ env.OPENVINO_REPO }}/bin/intel64/${{ env.CMAKE_BUILD_TYPE }}/libuser_ov_extensions.so |