From 276ddc821a65157f31d94aa96829740d3d359db5 Mon Sep 17 00:00:00 2001 From: Andrei Kashchikhin Date: Mon, 15 Apr 2024 13:22:28 +0100 Subject: [PATCH 01/39] transfer linux workflow --- .github/workflows/linux.yml | 172 ++++++++++++++++++++++++++++++++++++ 1 file changed, 172 insertions(+) create mode 100644 .github/workflows/linux.yml diff --git a/.github/workflows/linux.yml b/.github/workflows/linux.yml new file mode 100644 index 000000000..fb5e98aa4 --- /dev/null +++ b/.github/workflows/linux.yml @@ -0,0 +1,172 @@ +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: + 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/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 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: + 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 + apt install --assume-yes --no-install-recommends default-jdk libopencv-dev + + - 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 From 9fb3bd6f3807855a83043046cd7c340e29f98954 Mon Sep 17 00:00:00 2001 From: Andrei Kashchikhin Date: Mon, 15 Apr 2024 13:33:31 +0100 Subject: [PATCH 02/39] provide ref --- .github/workflows/linux.yml | 1 + 1 file changed, 1 insertion(+) diff --git a/.github/workflows/linux.yml b/.github/workflows/linux.yml index fb5e98aa4..95b56b78b 100644 --- a/.github/workflows/linux.yml +++ b/.github/workflows/linux.yml @@ -81,6 +81,7 @@ jobs: - name: Clone Testdata uses: actions/checkout@v4 with: + repository: 'openvinotoolkit/testdata' path: ${{ env.TEST_DATA }} lfs: 'true' submodules: 'true' From 1b56f83be0acd1c93d417df1e44faffcfc52f3c9 Mon Sep 17 00:00:00 2001 From: Andrei Kashchikhin Date: Mon, 15 Apr 2024 13:35:35 +0100 Subject: [PATCH 03/39] install git-lfs --- .github/workflows/linux.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/linux.yml b/.github/workflows/linux.yml index 95b56b78b..a7831c553 100644 --- a/.github/workflows/linux.yml +++ b/.github/workflows/linux.yml @@ -62,7 +62,7 @@ jobs: - name: Install git run: | apt-get update - apt-get install --assume-yes --no-install-recommends git ca-certificates + apt-get install --assume-yes --no-install-recommends git git-lfs ca-certificates - name: Clone OpenVINO uses: actions/checkout@v4 From f62d34769013609605cfba56362d938ceee2695f Mon Sep 17 00:00:00 2001 From: Andrei Kashchikhin Date: Mon, 15 Apr 2024 13:43:24 +0100 Subject: [PATCH 04/39] install unzip --- .github/workflows/linux.yml | 9 +++++---- 1 file changed, 5 insertions(+), 4 deletions(-) diff --git a/.github/workflows/linux.yml b/.github/workflows/linux.yml index a7831c553..5e876b36e 100644 --- a/.github/workflows/linux.yml +++ b/.github/workflows/linux.yml @@ -23,7 +23,8 @@ env: PYTHON_VERSION: '3.11' jobs: - Build: + Build_and_test: + name: Build and Test timeout-minutes: 150 defaults: run: @@ -93,13 +94,13 @@ jobs: - name: Install build dependencies run: | bash ${OPENVINO_REPO}/install_build_dependencies.sh - # default-jdk - Java API - apt install --assume-yes --no-install-recommends default-jdk libopencv-dev + # 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 }} + gradle-version: ${{ env.GRADLE_VER }} - name: Install sccache uses: mozilla-actions/sccache-action@v0.0.4 From b4de031f7c5c99ce1d99cb784aa709adbc74c2de Mon Sep 17 00:00:00 2001 From: Andrei Kashchikhin Date: Mon, 15 Apr 2024 13:49:18 +0100 Subject: [PATCH 05/39] correct path for log --- .github/workflows/linux.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/linux.yml b/.github/workflows/linux.yml index 5e876b36e..6440b8851 100644 --- a/.github/workflows/linux.yml +++ b/.github/workflows/linux.yml @@ -42,7 +42,7 @@ jobs: CMAKE_C_COMPILER_LAUNCHER: sccache SCCACHE_IGNORE_SERVER_IO_ERROR: 1 SCCACHE_SERVER_PORT: 35555 - SCCACHE_ERROR_LOG: /__w/openvino/sccache_log.txt + 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 From eceb039a70fbb7faf93241b478d17b872372b276 Mon Sep 17 00:00:00 2001 From: Andrei Kashchikhin Date: Mon, 15 Apr 2024 14:21:20 +0100 Subject: [PATCH 06/39] upload test results --- .github/workflows/linux.yml | 8 ++++++++ 1 file changed, 8 insertions(+) diff --git a/.github/workflows/linux.yml b/.github/workflows/linux.yml index 6440b8851..0183558fd 100644 --- a/.github/workflows/linux.yml +++ b/.github/workflows/linux.yml @@ -172,3 +172,11 @@ jobs: 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 + + - name: Upload Test Results + uses: actions/upload-artifact@v4 + if: ${{ !cancelled() }} + with: + name: test-results-java + path: ${{ env.OPENVINO_CONTRIB_REPO }}/modules/java_api/build/test-results + if-no-files-found: 'warn' From 715be12e3bc5699f18f96e2dda5a32d3071575e4 Mon Sep 17 00:00:00 2001 From: Andrei Kashchikhin Date: Wed, 17 Apr 2024 14:09:32 +0100 Subject: [PATCH 07/39] use gha runner --- .github/workflows/linux.yml | 49 +++++++++++++++++-------------------- 1 file changed, 23 insertions(+), 26 deletions(-) diff --git a/.github/workflows/linux.yml b/.github/workflows/linux.yml index 0183558fd..225d8803e 100644 --- a/.github/workflows/linux.yml +++ b/.github/workflows/linux.yml @@ -19,7 +19,6 @@ concurrency: cancel-in-progress: true env: - PIP_CACHE_PATH: /mount/caches/pip/linux PYTHON_VERSION: '3.11' jobs: @@ -29,21 +28,14 @@ jobs: defaults: run: shell: bash - runs-on: aks-linux-16-cores-32gb + runs-on: ubuntu-20.04-16-cores container: - image: openvinogithubactions.azurecr.io/dockerhub/ubuntu:20.04 - volumes: - - /mount:/mount - options: -e SCCACHE_AZURE_BLOB_CONTAINER -e SCCACHE_AZURE_CONNECTION_STRING + image: ubuntu:20.04 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 + CMAKE_CXX_COMPILER_LAUNCHER: ccache + CMAKE_C_COMPILER_LAUNCHER: ccache 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 @@ -53,7 +45,6 @@ jobs: 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: @@ -62,8 +53,8 @@ jobs: - name: Install git run: | - apt-get update - apt-get install --assume-yes --no-install-recommends git git-lfs ca-certificates + sudo apt-get update + sudo apt-get install --assume-yes --no-install-recommends git git-lfs ca-certificates - name: Clone OpenVINO uses: actions/checkout@v4 @@ -93,19 +84,14 @@ jobs: - name: Install build dependencies run: | - bash ${OPENVINO_REPO}/install_build_dependencies.sh + sudo -E ${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 + sudo 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 @@ -115,6 +101,17 @@ jobs: - name: Install python dependencies run: python3 -m pip install -r ${OPENVINO_REPO}/src/bindings/python/wheel/requirements-dev.txt + - name: Setup ccache + uses: hendrikmuhs/ccache-action@v1.2 + with: + max-size: "2000M" + # Should save cache only if run in the master branch of the base repo + # github.ref_name is 'ref/PR_#' in case of the PR, and 'branch_name' when executed on push + save: ${{ github.ref_name == 'master' && 'true' || 'false' }} + verbose: 2 + key: linux-ubuntu + restore-keys: | + linux-ubuntu # # Build @@ -140,14 +137,14 @@ jobs: -S ${OPENVINO_REPO} \ -B ${BUILD_DIR} - - name: Clean sccache stats - run: ${SCCACHE_PATH} --zero-stats + - name: Clean ccache stats + run: ccache --zero-stats --show-config - name: Cmake build run: cmake --build ${BUILD_DIR} --parallel - - name: Show sccache stats - run: ${SCCACHE_PATH} --show-stats + - name: Show ccache stats + run: ccache --show-stats - name: Cmake install run: cmake -DCMAKE_INSTALL_PREFIX=${INSTALL_DIR} -P ${BUILD_DIR}/cmake_install.cmake From f46dfb8867be15c92f435168d6c5dfcda1dd2909 Mon Sep 17 00:00:00 2001 From: Andrei Kashchikhin Date: Wed, 17 Apr 2024 14:14:08 +0100 Subject: [PATCH 08/39] rm sudo --- .github/workflows/linux.yml | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/.github/workflows/linux.yml b/.github/workflows/linux.yml index 225d8803e..7b66cdbef 100644 --- a/.github/workflows/linux.yml +++ b/.github/workflows/linux.yml @@ -53,8 +53,8 @@ jobs: - name: Install git run: | - sudo apt-get update - sudo apt-get install --assume-yes --no-install-recommends git git-lfs ca-certificates + apt-get update + apt-get install --assume-yes --no-install-recommends git git-lfs ca-certificates - name: Clone OpenVINO uses: actions/checkout@v4 @@ -84,9 +84,9 @@ jobs: - name: Install build dependencies run: | - sudo -E ${OPENVINO_REPO}/install_build_dependencies.sh + bash ${OPENVINO_REPO}/install_build_dependencies.sh # default-jdk - Java API; unzip for gradle installation - sudo apt install --assume-yes --no-install-recommends default-jdk libopencv-dev unzip + apt install --assume-yes --no-install-recommends default-jdk libopencv-dev unzip - name: Setup Gradle uses: gradle/actions/setup-gradle@v3 From f64b8ae2d733b9a5c5060b43dcfc7ddd1ad5c64b Mon Sep 17 00:00:00 2001 From: Andrei Kashchikhin Date: Fri, 19 Apr 2024 09:04:17 +0100 Subject: [PATCH 09/39] skip test --- .../src/test/java/org/intel/openvino/PrePostProcessorTests.java | 1 + 1 file changed, 1 insertion(+) diff --git a/modules/java_api/src/test/java/org/intel/openvino/PrePostProcessorTests.java b/modules/java_api/src/test/java/org/intel/openvino/PrePostProcessorTests.java index 63405797c..361a46b91 100644 --- a/modules/java_api/src/test/java/org/intel/openvino/PrePostProcessorTests.java +++ b/modules/java_api/src/test/java/org/intel/openvino/PrePostProcessorTests.java @@ -52,6 +52,7 @@ public void testWrongLayout() { + " input")); } + @Ignore // Ticket: 138994 @Test public void testWrongElementType() { String exceptionMessage = ""; From 5799a966cbaf2d42ed8ab3f66145d69f8b623db9 Mon Sep 17 00:00:00 2001 From: Andrei Kashchikhin Date: Mon, 22 Apr 2024 12:13:55 +0100 Subject: [PATCH 10/39] rm unused env vars from linux; add win workflow --- .github/workflows/linux.yml | 3 - .github/workflows/windows.yml | 164 ++++++++++++++++++++++++++++++++++ 2 files changed, 164 insertions(+), 3 deletions(-) create mode 100644 .github/workflows/windows.yml diff --git a/.github/workflows/linux.yml b/.github/workflows/linux.yml index 7b66cdbef..85c467f4e 100644 --- a/.github/workflows/linux.yml +++ b/.github/workflows/linux.yml @@ -41,9 +41,6 @@ jobs: 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 GRADLE_VER: '7.1.1' diff --git a/.github/workflows/windows.yml b/.github/workflows/windows.yml new file mode 100644 index 000000000..f11f7ec51 --- /dev/null +++ b/.github/workflows/windows.yml @@ -0,0 +1,164 @@ +name: Windows (VS 2019, Python 3.11) +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 }}-windows + cancel-in-progress: true + +env: + PYTHON_VERSION: '3.11' + +jobs: + Build_and_test: + name: Build and Test + timeout-minutes: 150 + defaults: + run: + shell: pwsh + runs-on: windows-2019-16-core + env: + CMAKE_BUILD_TYPE: 'Release' + CMAKE_GENERATOR: 'Ninja Multi-Config' + CMAKE_CXX_COMPILER_LAUNCHER: ccache + CMAKE_C_COMPILER_LAUNCHER: ccache + OPENVINO_REPO: ${{ github.workspace }}\\openvino + OPENVINO_CONTRIB_REPO: ${{ github.workspace }}\\openvino_contrib + TEST_DATA: ${{ github.workspace }}\\testdata + INSTALL_DIR: ${{ github.workspace }}\\openvino\\install + BUILD_DIR: ${{ github.workspace }}\\openvino\\build + GRADLE_VER: '7.1.1' + + steps: + - name: git configuration + run: git config --system core.longpaths true + + - 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: Setup Gradle + uses: gradle/actions/setup-gradle@v3 + with: + gradle-version: ${{ env.GRADLE_VER }} + + - name: Setup Python ${{ env.PYTHON_VERSION }} + uses: actions/setup-python@v5 + with: + python-version: ${{ env.PYTHON_VERSION }} + cache: 'pip' + + - name: Install python dependencies + run: | + # For Python API: build and wheel packaging + python3 -m pip install -r ${env:OPENVINO_REPO}/src/bindings/python/wheel/requirements-dev.txt + + - name: Install build dependencies + run: | + Invoke-WebRequest https://github.com/ninja-build/ninja/releases/download/v1.11.1/ninja-win.zip -OutFile ninja-win.zip -MaximumRetryCount 10 + Expand-Archive -Force ninja-win.zip + # Add it to the GitHub Path so it would be available in the subsequent steps + Add-Content -Path $env:GITHUB_PATH -Value "${{ github.workspace }}/ninja-win" + + # + # Build + # + + - name: Setup ccache + uses: hendrikmuhs/ccache-action@v1.2 + with: + max-size: "2000M" + # Should save cache only if run in the master branch of the base repo + # github.ref_name is 'ref/PR_#' in case of the PR, and 'branch_name' when executed on push + save: ${{ github.ref_name == 'master' && 'true' || 'false' }} + verbose: 2 + key: ccache-windows + restore-keys: | + ccache-windows + + - name: CMake configure - OpenVINO + run: | + cmake -G "${{ env.CMAKE_GENERATOR }}" ` + -DCMAKE_BUILD_TYPE=${{ env.CMAKE_BUILD_TYPE }} ` + -DBUILD_nvidia_plugin=OFF ` + -DENABLE_OV_TF_FRONTEND=OFF ` + -DENABLE_OV_PADDLE_FRONTEND=OFF ` + -DENABLE_OV_TF_LITE_FRONTEND=OFF ` + -DENABLE_OV_PYTORCH_FRONTEND=OFF ` + -DENABLE_INTEL_GPU=OFF ` + -DENABLE_CPPLINT=OFF ` + -DENABLE_SAMPLES=OFF ` + -DENABLE_PYTHON=ON ` + -DENABLE_JS=OFF ` + -DOPENVINO_EXTRA_MODULES=${{ env.OPENVINO_CONTRIB_REPO }}/modules ` + -DCMAKE_CXX_COMPILER_LAUNCHER=${{ env.CMAKE_CXX_COMPILER_LAUNCHER }} ` + -DCMAKE_C_COMPILER_LAUNCHER=${{ env.CMAKE_C_COMPILER_LAUNCHER }} ` + -S ${{ env.OPENVINO_REPO }} ` + -B ${{ env.BUILD_DIR }} + + - name: Clean ccache stats + run: ccache --zero-stats --show-config + + - name: Cmake build - OpenVINO + run: cmake --build ${{ env.BUILD_DIR }} --parallel --config ${{ env.CMAKE_BUILD_TYPE }} --verbose + + - name: Show ccache stats + run: ccache --show-stats + + - name: Cmake install - OpenVINO + run: cmake -DCMAKE_INSTALL_PREFIX=${{ env.INSTALL_DIR }} -P ${{ env.BUILD_DIR }}/cmake_install.cmake + + - name: Java tests + working-directory: ${{ env.OPENVINO_CONTRIB_REPO }}/modules/java_api + run: | + . "${{ env.INSTALL_DIR }}/setupvars.ps1" + gradle clean build --info + gradle test -Prun_tests -DMODELS_PATH=${{ env.TEST_DATA }} -Ddevice=CPU --info + + - name: Custom user operation tests + working-directory: ${{ env.OPENVINO_CONTRIB_REPO }}/modules/custom_operations + run: | + ls ${{ env.OPENVINO_REPO }}/bin/intel64/${{ env.CMAKE_BUILD_TYPE }} + . "${{ env.INSTALL_DIR }}/setupvars.ps1" + python3 -m pip install -r ${{ env.OPENVINO_REPO }}/modules/custom_operations/tests/requirements.txt + + python3 -m pytest -k "not sparse_conv" tests/run_tests.py + env: + CUSTOM_OP_LIB: ${{ env.OPENVINO_REPO }}/bin/intel64/${{ env.CMAKE_BUILD_TYPE }}/user_ie_extensions.dll + + - name: Upload Test Results + uses: actions/upload-artifact@v4 + if: ${{ !cancelled() }} + with: + name: test-results-java + path: ${{ env.OPENVINO_CONTRIB_REPO }}/modules/java_api/build/test-results + if-no-files-found: 'warn' \ No newline at end of file From 0ee16699d766485bc0699efe4faa6c4a17d54431 Mon Sep 17 00:00:00 2001 From: Andrei Kashchikhin Date: Mon, 22 Apr 2024 12:31:06 +0100 Subject: [PATCH 11/39] configure msvc --- .github/workflows/windows.yml | 3 +++ 1 file changed, 3 insertions(+) diff --git a/.github/workflows/windows.yml b/.github/workflows/windows.yml index f11f7ec51..b805273e0 100644 --- a/.github/workflows/windows.yml +++ b/.github/workflows/windows.yml @@ -93,6 +93,9 @@ jobs: # Build # + - name: Configure Developer Command Prompt for Microsoft Visual C++ + uses: ilammy/msvc-dev-cmd@v1 + - name: Setup ccache uses: hendrikmuhs/ccache-action@v1.2 with: From 1ac87a3b70243d1492425815d362a09a45a76bfb Mon Sep 17 00:00:00 2001 From: Andrei Kashchikhin Date: Mon, 22 Apr 2024 13:18:42 +0100 Subject: [PATCH 12/39] add build of ov_contrib --- .github/workflows/windows.yml | 19 +++++++++++++++---- 1 file changed, 15 insertions(+), 4 deletions(-) diff --git a/.github/workflows/windows.yml b/.github/workflows/windows.yml index b805273e0..731a8aa7d 100644 --- a/.github/workflows/windows.yml +++ b/.github/workflows/windows.yml @@ -26,7 +26,6 @@ jobs: runs-on: windows-2019-16-core env: CMAKE_BUILD_TYPE: 'Release' - CMAKE_GENERATOR: 'Ninja Multi-Config' CMAKE_CXX_COMPILER_LAUNCHER: ccache CMAKE_C_COMPILER_LAUNCHER: ccache OPENVINO_REPO: ${{ github.workspace }}\\openvino @@ -34,6 +33,7 @@ jobs: TEST_DATA: ${{ github.workspace }}\\testdata INSTALL_DIR: ${{ github.workspace }}\\openvino\\install BUILD_DIR: ${{ github.workspace }}\\openvino\\build + BUILD_DIR_CONTRIB: ${{ github.workspace }}\\openvino\\build_contrib GRADLE_VER: '7.1.1' steps: @@ -88,6 +88,7 @@ jobs: Expand-Archive -Force ninja-win.zip # Add it to the GitHub Path so it would be available in the subsequent steps Add-Content -Path $env:GITHUB_PATH -Value "${{ github.workspace }}/ninja-win" + choco install opencv -y # # Build @@ -110,7 +111,7 @@ jobs: - name: CMake configure - OpenVINO run: | - cmake -G "${{ env.CMAKE_GENERATOR }}" ` + cmake -GNinja ` -DCMAKE_BUILD_TYPE=${{ env.CMAKE_BUILD_TYPE }} ` -DBUILD_nvidia_plugin=OFF ` -DENABLE_OV_TF_FRONTEND=OFF ` @@ -140,6 +141,16 @@ jobs: - name: Cmake install - OpenVINO run: cmake -DCMAKE_INSTALL_PREFIX=${{ env.INSTALL_DIR }} -P ${{ env.BUILD_DIR }}/cmake_install.cmake + - name: CMake configure - OpenVINO Contrib + run: | + cmake -GNinja ` + -DCMAKE_BUILD_TYPE=${{ env.CMAKE_BUILD_TYPE }} ` + -S ${{ env.OPENVINO_CONTRIB_REPO }}/modules/custom_operations ` + -B ${{ env.BUILD_DIR_CONTRIB }} + + - name: Cmake build - OpenVINO Contrib + run: cmake --build ${{ env.BUILD_DIR_CONTRIB }} --parallel --config ${{ env.CMAKE_BUILD_TYPE }} --verbose + - name: Java tests working-directory: ${{ env.OPENVINO_CONTRIB_REPO }}/modules/java_api run: | @@ -152,11 +163,11 @@ jobs: run: | ls ${{ env.OPENVINO_REPO }}/bin/intel64/${{ env.CMAKE_BUILD_TYPE }} . "${{ env.INSTALL_DIR }}/setupvars.ps1" - python3 -m pip install -r ${{ env.OPENVINO_REPO }}/modules/custom_operations/tests/requirements.txt + python3 -m pip install -r ${{ env.OPENVINO_CONTRIB_REPO }}/modules/custom_operations/tests/requirements.txt python3 -m pytest -k "not sparse_conv" tests/run_tests.py env: - CUSTOM_OP_LIB: ${{ env.OPENVINO_REPO }}/bin/intel64/${{ env.CMAKE_BUILD_TYPE }}/user_ie_extensions.dll + CUSTOM_OP_LIB: ${{ env.BUILD_DIR_CONTRIB }}/user_ie_extensions/user_ov_extensions.dll - name: Upload Test Results uses: actions/upload-artifact@v4 From 838d87a613ba2b3a6f3cb857b01607a40e04975d Mon Sep 17 00:00:00 2001 From: Andrei Kashchikhin Date: Mon, 22 Apr 2024 13:50:01 +0100 Subject: [PATCH 13/39] use setupvars --- .github/workflows/windows.yml | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/.github/workflows/windows.yml b/.github/workflows/windows.yml index 731a8aa7d..b46c73a6e 100644 --- a/.github/workflows/windows.yml +++ b/.github/workflows/windows.yml @@ -143,6 +143,8 @@ jobs: - name: CMake configure - OpenVINO Contrib run: | + $env:OpenCV_DIR=C:/tools/opencv/build + . "${{ env.INSTALL_DIR }}/setupvars.ps1" cmake -GNinja ` -DCMAKE_BUILD_TYPE=${{ env.CMAKE_BUILD_TYPE }} ` -S ${{ env.OPENVINO_CONTRIB_REPO }}/modules/custom_operations ` @@ -161,7 +163,6 @@ jobs: - name: Custom user operation tests working-directory: ${{ env.OPENVINO_CONTRIB_REPO }}/modules/custom_operations run: | - ls ${{ env.OPENVINO_REPO }}/bin/intel64/${{ env.CMAKE_BUILD_TYPE }} . "${{ env.INSTALL_DIR }}/setupvars.ps1" python3 -m pip install -r ${{ env.OPENVINO_CONTRIB_REPO }}/modules/custom_operations/tests/requirements.txt From 371de19dc9596650ef721f1e809bcafc49566630 Mon Sep 17 00:00:00 2001 From: Andrei Kashchikhin Date: Mon, 22 Apr 2024 14:25:59 +0100 Subject: [PATCH 14/39] use quotes --- .github/workflows/windows.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/windows.yml b/.github/workflows/windows.yml index b46c73a6e..2c2523ac1 100644 --- a/.github/workflows/windows.yml +++ b/.github/workflows/windows.yml @@ -143,7 +143,7 @@ jobs: - name: CMake configure - OpenVINO Contrib run: | - $env:OpenCV_DIR=C:/tools/opencv/build + $env:OpenCV_DIR="C:/tools/opencv/build" . "${{ env.INSTALL_DIR }}/setupvars.ps1" cmake -GNinja ` -DCMAKE_BUILD_TYPE=${{ env.CMAKE_BUILD_TYPE }} ` From ee7a6fa7a22d60ca650ac09b70d59e5020c603cf Mon Sep 17 00:00:00 2001 From: Andrei Kashchikhin Date: Mon, 22 Apr 2024 15:02:19 +0100 Subject: [PATCH 15/39] use ov repo --- .github/workflows/windows.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/windows.yml b/.github/workflows/windows.yml index 2c2523ac1..7ccb637fa 100644 --- a/.github/workflows/windows.yml +++ b/.github/workflows/windows.yml @@ -168,7 +168,7 @@ jobs: python3 -m pytest -k "not sparse_conv" tests/run_tests.py env: - CUSTOM_OP_LIB: ${{ env.BUILD_DIR_CONTRIB }}/user_ie_extensions/user_ov_extensions.dll + CUSTOM_OP_LIB: ${{ env.OPENVINO_REPO }}/bin/intel64/${{ env.CMAKE_BUILD_TYPE }}/user_ov_extensions.dll - name: Upload Test Results uses: actions/upload-artifact@v4 From 52883c33d399d27c146598cb0c5c4a1b9acca501 Mon Sep 17 00:00:00 2001 From: Andrei Kashchikhin Date: Mon, 22 Apr 2024 16:01:42 +0100 Subject: [PATCH 16/39] use cmd --- .github/workflows/windows.yml | 20 ++++++++++++++++---- 1 file changed, 16 insertions(+), 4 deletions(-) diff --git a/.github/workflows/windows.yml b/.github/workflows/windows.yml index 7ccb637fa..ec2fdb4e7 100644 --- a/.github/workflows/windows.yml +++ b/.github/workflows/windows.yml @@ -160,16 +160,28 @@ jobs: gradle clean build --info gradle test -Prun_tests -DMODELS_PATH=${{ env.TEST_DATA }} -Ddevice=CPU --info - - name: Custom user operation tests + - name: Custom user operation tests (CMD) working-directory: ${{ env.OPENVINO_CONTRIB_REPO }}/modules/custom_operations + shell: cmd run: | - . "${{ env.INSTALL_DIR }}/setupvars.ps1" - python3 -m pip install -r ${{ env.OPENVINO_CONTRIB_REPO }}/modules/custom_operations/tests/requirements.txt + call C:\tools\opencv\build\setup_vars_opencv4.cmd + call ${{ env.INSTALL_DIR }}\setupvars.bat + python3 -m pip install -r ${{ env.OPENVINO_CONTRIB_REPO }}\modules\custom_operations\tests\requirements.txt - python3 -m pytest -k "not sparse_conv" tests/run_tests.py + python3 -m pytest -k "not sparse_conv" tests\run_tests.py env: CUSTOM_OP_LIB: ${{ env.OPENVINO_REPO }}/bin/intel64/${{ env.CMAKE_BUILD_TYPE }}/user_ov_extensions.dll +# - name: Custom user operation tests +# working-directory: ${{ env.OPENVINO_CONTRIB_REPO }}/modules/custom_operations +# run: | +# . "${{ env.INSTALL_DIR }}/setupvars.ps1" +# python3 -m pip install -r ${{ env.OPENVINO_CONTRIB_REPO }}/modules/custom_operations/tests/requirements.txt +# +# python3 -m pytest -k "not sparse_conv" tests/run_tests.py +# env: +# CUSTOM_OP_LIB: ${{ env.OPENVINO_REPO }}/bin/intel64/${{ env.CMAKE_BUILD_TYPE }}/user_ov_extensions.dll + - name: Upload Test Results uses: actions/upload-artifact@v4 if: ${{ !cancelled() }} From f04b96eea37695ddf9d15f6b49e491e93599e472 Mon Sep 17 00:00:00 2001 From: Andrei Kashchikhin Date: Tue, 23 Apr 2024 16:22:19 +0100 Subject: [PATCH 17/39] call cmd setupvars --- .github/workflows/windows.yml | 2 ++ 1 file changed, 2 insertions(+) diff --git a/.github/workflows/windows.yml b/.github/workflows/windows.yml index ec2fdb4e7..7e7051994 100644 --- a/.github/workflows/windows.yml +++ b/.github/workflows/windows.yml @@ -111,6 +111,8 @@ jobs: - name: CMake configure - OpenVINO run: | + $env:OpenCV_DIR="C:/tools/opencv/build" + & "C:\tools\opencv\build\setup_vars_opencv4.cmd" cmake -GNinja ` -DCMAKE_BUILD_TYPE=${{ env.CMAKE_BUILD_TYPE }} ` -DBUILD_nvidia_plugin=OFF ` From c2e081d6d6c8ae596380fd7cef8bd3e3791b6d2f Mon Sep 17 00:00:00 2001 From: Andrei Kashchikhin Date: Wed, 24 Apr 2024 13:03:52 +0100 Subject: [PATCH 18/39] add nvidia job --- .github/workflows/linux.yml | 152 +++++++++++++++++++++++++++++++++++- 1 file changed, 151 insertions(+), 1 deletion(-) diff --git a/.github/workflows/linux.yml b/.github/workflows/linux.yml index 85c467f4e..abe6bad91 100644 --- a/.github/workflows/linux.yml +++ b/.github/workflows/linux.yml @@ -42,6 +42,7 @@ jobs: TEST_DATA: /__w/openvino_contrib/openvino_contrib/testdata INSTALL_DIR: /__w/openvino_contrib/openvino_contrib/openvino_install BUILD_DIR: /__w/openvino_contrib/openvino_contrib/openvino_build + DEVELOPER_PACKAGE_DIR: /__w/openvino_contrib/openvino_contrib/developer_package_install GRADLE_VER: '7.1.1' steps: @@ -144,7 +145,9 @@ jobs: run: ccache --show-stats - name: Cmake install - run: cmake -DCMAKE_INSTALL_PREFIX=${INSTALL_DIR} -P ${BUILD_DIR}/cmake_install.cmake + run: | + cmake -DCMAKE_INSTALL_PREFIX=${INSTALL_DIR} -P ${BUILD_DIR}/cmake_install.cmake + cmake -DCMAKE_INSTALL_PREFIX=${DEVELOPER_PACKAGE_DIR} -DCOMPONENT=developer_package -P ${BUILD_DIR}/cmake_install.cmake - name: Java tests working-directory: ${{ env.OPENVINO_CONTRIB_REPO }}/modules/java_api @@ -167,6 +170,16 @@ jobs: env: CUSTOM_OP_LIB: ${{ env.OPENVINO_REPO }}/bin/intel64/${{ env.CMAKE_BUILD_TYPE }}/libuser_ov_extensions.so + - name: Pack Artifacts + run: | + pushd ${INSTALL_DIR} + tar -czvf ${BUILD_DIR}/openvino_package.tar.gz * + popd + + pushd ${DEVELOPER_PACKAGE_DIR} + tar -czvf ${BUILD_DIR}/openvino_developer_package.tar.gz * + popd + - name: Upload Test Results uses: actions/upload-artifact@v4 if: ${{ !cancelled() }} @@ -174,3 +187,140 @@ jobs: name: test-results-java path: ${{ env.OPENVINO_CONTRIB_REPO }}/modules/java_api/build/test-results if-no-files-found: 'warn' + + - name: Upload openvino package + if: ${{ always() }} + uses: actions/upload-artifact@v4 + with: + name: openvino_package + path: ${{ env.BUILD_DIR }}/openvino_package.tar.gz + if-no-files-found: 'error' + + - name: Upload openvino developer package + if: ${{ always() }} + uses: actions/upload-artifact@v4 + with: + name: openvino_developer_package + path: ${{ env.BUILD_DIR }}/openvino_developer_package.tar.gz + if-no-files-found: 'error' + + NVIDIA_Plugin: + name: NVIDIA plugin + needs: Build_and_test + timeout-minutes: 40 + defaults: + run: + shell: bash + runs-on: ubuntu-20.04-16-cores + container: + image: nvidia/cuda:11.8.0-cudnn8-runtime-ubuntu20.04 + env: + CMAKE_BUILD_TYPE: 'Release' + CMAKE_GENERATOR: 'Ninja Multi-Config' + CMAKE_CUDA_COMPILER_LAUNCHER: ccache + CMAKE_CXX_COMPILER_LAUNCHER: ccache + CMAKE_C_COMPILER_LAUNCHER: ccache + INSTALL_DIR: /__w/openvino_contrib/openvino_contrib/install + OPENVINO_DEVELOPER_PACKAGE: /__w/openvino_contrib/openvino_contrib/install/developer_package + OPENVINO_REPO: /__w/openvino_contrib/openvino_contrib/openvino + OPENVINO_CONTRIB_REPO: /__w/openvino_contrib/openvino_contrib/openvino_contrib + NVIDIA_BUILD_DIR: /__w/openvino_contrib/openvino_contrib/nvidia_plugin_build + DEBIAN_FRONTEND: 'noninteractive' + + steps: + - name: Set apt retries + run: echo 'Acquire::Retries "10";' > /etc/apt/apt.conf.d/80-retries + + - name: Fetch install_build_dependencies.sh + uses: actions/checkout@v4 + with: + sparse-checkout: | + install_build_dependencies.sh + sparse-checkout-cone-mode: false + path: ${{ env.OPENVINO_REPO }} + + - name: Install Prerequisites + run: apt update && apt install -y git ca-certificates + + - name: Download OpenVINO package + uses: actions/download-artifact@v4 + with: + name: openvino_package + path: ${{ env.INSTALL_DIR }} + + - name: Download OpenVINO Developer package + uses: actions/download-artifact@v4 + with: + name: openvino_developer_package + path: ${{ env.INSTALL_DIR }} + + - name: Extract OpenVINO packages + run: | + pushd ${INSTALL_DIR} + tar -xzf openvino_package.tar.gz -C ${INSTALL_DIR} + popd + + pushd ${INSTALL_DIR} + tar -xzf openvino_developer_package.tar.gz -C ${INSTALL_DIR} + popd + + - name: Clone OpenVINO Contrib + uses: actions/checkout@v4 + with: + path: ${{ env.OPENVINO_CONTRIB_REPO }} + + # + # Dependencies + # + + - name: Install build dependencies + run: | + ${OPENVINO_REPO}/install_build_dependencies.sh + apt -y --no-install-recommends install software-properties-common curl + + - name: Setup ccache + uses: hendrikmuhs/ccache-action@v1.2 + with: + max-size: "2000M" + # Should save cache only if run in the master branch of the base repo + # github.ref_name is 'ref/PR_#' in case of the PR, and 'branch_name' when executed on push + save: ${{ github.ref_name == 'master' && 'true' || 'false' }} + verbose: 2 + key: linux-ubuntu-nvidia + restore-keys: | + linux-ubuntu-nvidia + + - name: Install CUDA + run: | + wget https://developer.download.nvidia.com/compute/cuda/repos/ubuntu2004/x86_64/cuda-ubuntu2004.pin + mv cuda-ubuntu2004.pin /etc/apt/preferences.d/cuda-repository-pin-600 + + apt-key adv --fetch-keys https://developer.download.nvidia.com/compute/cuda/repos/ubuntu2004/x86_64/3bf863cc.pub + add-apt-repository "deb https://developer.download.nvidia.com/compute/cuda/repos/ubuntu2004/x86_64/ /" + apt update + apt install -y \ + libcudnn8=8.9.4.*-1+cuda11.8 \ + libcudnn8-dev=8.9.4.*-1+cuda11.8 \ + libcudnn8-samples=8.9.4.*-1+cuda11.8 \ + cuda-runtime-11-8 \ + cuda-11-8 \ + libcutensor1=1.6.1.5-1 \ + libcutensor-dev=1.6.1.5-1 \ + cuda-drivers=520.61.05-1 + + # + # Build + # + + - name: Cmake & Build - NVIDIA Plugin + run: | + source ${INSTALL_DIR}/setupvars.sh + cmake \ + -DOpenVINODeveloperPackage_DIR=${OPENVINO_DEVELOPER_PACKAGE}/cmake \ + -DCMAKE_COMPILE_WARNING_AS_ERROR=OFF \ + -S ${OPENVINO_CONTRIB_REPO}/modules/nvidia_plugin \ + -B ${NVIDIA_BUILD_DIR} + cmake --build ${NVIDIA_BUILD_DIR} --parallel --config ${{ env.CMAKE_BUILD_TYPE }} --verbose -- ov_nvidia_func_tests ov_nvidia_unit_tests + + - name: Show ccache stats + run: ccache --show-stats From e293f8d9833a203d327793d3077e5450d9f9d536 Mon Sep 17 00:00:00 2001 From: Andrei Kashchikhin Date: Wed, 24 Apr 2024 13:58:36 +0100 Subject: [PATCH 19/39] add generator --- .github/workflows/linux.yml | 1 + 1 file changed, 1 insertion(+) diff --git a/.github/workflows/linux.yml b/.github/workflows/linux.yml index abe6bad91..dc9d4a8fe 100644 --- a/.github/workflows/linux.yml +++ b/.github/workflows/linux.yml @@ -129,6 +129,7 @@ jobs: -DENABLE_OV_PYTORCH_FRONTEND=OFF \ -DOPENVINO_EXTRA_MODULES=${OPENVINO_CONTRIB_REPO}/modules \ -DENABLE_PYTHON=ON \ + -DCPACK_GENERATOR=TGZ \ -DENABLE_WHEEL=ON \ -DCMAKE_CXX_COMPILER_LAUNCHER=${{ env.CMAKE_CXX_COMPILER_LAUNCHER }} \ -DCMAKE_C_COMPILER_LAUNCHER=${{ env.CMAKE_C_COMPILER_LAUNCHER }} \ From 61cb075495b805c20d31020972ab53768c6bc441 Mon Sep 17 00:00:00 2001 From: Andrei Kashchikhin Date: Wed, 24 Apr 2024 14:47:53 +0100 Subject: [PATCH 20/39] do not use dev package --- .github/workflows/linux.yml | 28 +--------------------------- 1 file changed, 1 insertion(+), 27 deletions(-) diff --git a/.github/workflows/linux.yml b/.github/workflows/linux.yml index dc9d4a8fe..5ac75475e 100644 --- a/.github/workflows/linux.yml +++ b/.github/workflows/linux.yml @@ -42,7 +42,6 @@ jobs: TEST_DATA: /__w/openvino_contrib/openvino_contrib/testdata INSTALL_DIR: /__w/openvino_contrib/openvino_contrib/openvino_install BUILD_DIR: /__w/openvino_contrib/openvino_contrib/openvino_build - DEVELOPER_PACKAGE_DIR: /__w/openvino_contrib/openvino_contrib/developer_package_install GRADLE_VER: '7.1.1' steps: @@ -146,9 +145,7 @@ jobs: run: ccache --show-stats - name: Cmake install - run: | - cmake -DCMAKE_INSTALL_PREFIX=${INSTALL_DIR} -P ${BUILD_DIR}/cmake_install.cmake - cmake -DCMAKE_INSTALL_PREFIX=${DEVELOPER_PACKAGE_DIR} -DCOMPONENT=developer_package -P ${BUILD_DIR}/cmake_install.cmake + 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 @@ -177,10 +174,6 @@ jobs: tar -czvf ${BUILD_DIR}/openvino_package.tar.gz * popd - pushd ${DEVELOPER_PACKAGE_DIR} - tar -czvf ${BUILD_DIR}/openvino_developer_package.tar.gz * - popd - - name: Upload Test Results uses: actions/upload-artifact@v4 if: ${{ !cancelled() }} @@ -197,14 +190,6 @@ jobs: path: ${{ env.BUILD_DIR }}/openvino_package.tar.gz if-no-files-found: 'error' - - name: Upload openvino developer package - if: ${{ always() }} - uses: actions/upload-artifact@v4 - with: - name: openvino_developer_package - path: ${{ env.BUILD_DIR }}/openvino_developer_package.tar.gz - if-no-files-found: 'error' - NVIDIA_Plugin: name: NVIDIA plugin needs: Build_and_test @@ -249,22 +234,12 @@ jobs: name: openvino_package path: ${{ env.INSTALL_DIR }} - - name: Download OpenVINO Developer package - uses: actions/download-artifact@v4 - with: - name: openvino_developer_package - path: ${{ env.INSTALL_DIR }} - - name: Extract OpenVINO packages run: | pushd ${INSTALL_DIR} tar -xzf openvino_package.tar.gz -C ${INSTALL_DIR} popd - pushd ${INSTALL_DIR} - tar -xzf openvino_developer_package.tar.gz -C ${INSTALL_DIR} - popd - - name: Clone OpenVINO Contrib uses: actions/checkout@v4 with: @@ -317,7 +292,6 @@ jobs: run: | source ${INSTALL_DIR}/setupvars.sh cmake \ - -DOpenVINODeveloperPackage_DIR=${OPENVINO_DEVELOPER_PACKAGE}/cmake \ -DCMAKE_COMPILE_WARNING_AS_ERROR=OFF \ -S ${OPENVINO_CONTRIB_REPO}/modules/nvidia_plugin \ -B ${NVIDIA_BUILD_DIR} From 8f635dc85d0a27aec1955209152e5578e7dc5719 Mon Sep 17 00:00:00 2001 From: Andrei Kashchikhin Date: Wed, 24 Apr 2024 15:32:32 +0100 Subject: [PATCH 21/39] add missing ref --- .github/workflows/linux.yml | 2 ++ 1 file changed, 2 insertions(+) diff --git a/.github/workflows/linux.yml b/.github/workflows/linux.yml index 5ac75475e..200c04082 100644 --- a/.github/workflows/linux.yml +++ b/.github/workflows/linux.yml @@ -223,6 +223,8 @@ jobs: sparse-checkout: | install_build_dependencies.sh sparse-checkout-cone-mode: false + repository: 'openvinotoolkit/openvino' + ref: 'master' path: ${{ env.OPENVINO_REPO }} - name: Install Prerequisites From 2aac9841413da2c827ae622606ff45045d5d3e32 Mon Sep 17 00:00:00 2001 From: Andrei Kashchikhin Date: Wed, 24 Apr 2024 15:56:07 +0100 Subject: [PATCH 22/39] allow downgrades --- .github/workflows/linux.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/linux.yml b/.github/workflows/linux.yml index 200c04082..c8d82e2e7 100644 --- a/.github/workflows/linux.yml +++ b/.github/workflows/linux.yml @@ -276,7 +276,7 @@ jobs: apt-key adv --fetch-keys https://developer.download.nvidia.com/compute/cuda/repos/ubuntu2004/x86_64/3bf863cc.pub add-apt-repository "deb https://developer.download.nvidia.com/compute/cuda/repos/ubuntu2004/x86_64/ /" apt update - apt install -y \ + apt install -y --allow-downgrades \ libcudnn8=8.9.4.*-1+cuda11.8 \ libcudnn8-dev=8.9.4.*-1+cuda11.8 \ libcudnn8-samples=8.9.4.*-1+cuda11.8 \ From 208fba186451c53ab7c506cc74fb226fbddd9284 Mon Sep 17 00:00:00 2001 From: Andrei Kashchikhin Date: Wed, 24 Apr 2024 16:24:40 +0100 Subject: [PATCH 23/39] allow change --- .github/workflows/linux.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/linux.yml b/.github/workflows/linux.yml index c8d82e2e7..bf08bebd4 100644 --- a/.github/workflows/linux.yml +++ b/.github/workflows/linux.yml @@ -276,7 +276,7 @@ jobs: apt-key adv --fetch-keys https://developer.download.nvidia.com/compute/cuda/repos/ubuntu2004/x86_64/3bf863cc.pub add-apt-repository "deb https://developer.download.nvidia.com/compute/cuda/repos/ubuntu2004/x86_64/ /" apt update - apt install -y --allow-downgrades \ + apt install -y --allow-downgrades --allow-change-held-packages \ libcudnn8=8.9.4.*-1+cuda11.8 \ libcudnn8-dev=8.9.4.*-1+cuda11.8 \ libcudnn8-samples=8.9.4.*-1+cuda11.8 \ From bb7a738080521952c12cc46c03445f2d2bece212 Mon Sep 17 00:00:00 2001 From: Andrei Kashchikhin Date: Thu, 25 Apr 2024 09:26:41 +0100 Subject: [PATCH 24/39] add dev package --- .github/workflows/linux.yml | 28 +++++++++++++++++++++++++++- 1 file changed, 27 insertions(+), 1 deletion(-) diff --git a/.github/workflows/linux.yml b/.github/workflows/linux.yml index bf08bebd4..061e4c2c0 100644 --- a/.github/workflows/linux.yml +++ b/.github/workflows/linux.yml @@ -42,6 +42,7 @@ jobs: TEST_DATA: /__w/openvino_contrib/openvino_contrib/testdata INSTALL_DIR: /__w/openvino_contrib/openvino_contrib/openvino_install BUILD_DIR: /__w/openvino_contrib/openvino_contrib/openvino_build + DEVELOPER_PACKAGE_DIR: /__w/openvino_contrib/openvino_contrib/developer_package_install GRADLE_VER: '7.1.1' steps: @@ -145,7 +146,9 @@ jobs: run: ccache --show-stats - name: Cmake install - run: cmake -DCMAKE_INSTALL_PREFIX=${INSTALL_DIR} -P ${BUILD_DIR}/cmake_install.cmake + run: | + cmake -DCMAKE_INSTALL_PREFIX=${INSTALL_DIR} -P ${BUILD_DIR}/cmake_install.cmake + cmake -DCMAKE_INSTALL_PREFIX=${DEVELOPER_PACKAGE_DIR} -DCOMPONENT=developer_package -P ${BUILD_DIR}/cmake_install.cmake - name: Java tests working-directory: ${{ env.OPENVINO_CONTRIB_REPO }}/modules/java_api @@ -173,6 +176,10 @@ jobs: pushd ${INSTALL_DIR} tar -czvf ${BUILD_DIR}/openvino_package.tar.gz * popd + + pushd ${DEVELOPER_PACKAGE_DIR} + tar -czvf ${BUILD_DIR}/openvino_developer_package.tar.gz * + popd - name: Upload Test Results uses: actions/upload-artifact@v4 @@ -190,6 +197,14 @@ jobs: path: ${{ env.BUILD_DIR }}/openvino_package.tar.gz if-no-files-found: 'error' + - name: Upload openvino developer package + if: ${{ always() }} + uses: actions/upload-artifact@v4 + with: + name: openvino_developer_package + path: ${{ env.BUILD_DIR }}/openvino_developer_package.tar.gz + if-no-files-found: 'error' + NVIDIA_Plugin: name: NVIDIA plugin needs: Build_and_test @@ -236,11 +251,21 @@ jobs: name: openvino_package path: ${{ env.INSTALL_DIR }} + - name: Download OpenVINO Developer package + uses: actions/download-artifact@v4 + with: + name: openvino_developer_package + path: ${{ env.INSTALL_DIR }} + - name: Extract OpenVINO packages run: | pushd ${INSTALL_DIR} tar -xzf openvino_package.tar.gz -C ${INSTALL_DIR} popd + + pushd ${INSTALL_DIR} + tar -xzf openvino_developer_package.tar.gz -C ${INSTALL_DIR} + popd - name: Clone OpenVINO Contrib uses: actions/checkout@v4 @@ -294,6 +319,7 @@ jobs: run: | source ${INSTALL_DIR}/setupvars.sh cmake \ + -DOpenVINODeveloperPackage_DIR=${OPENVINO_DEVELOPER_PACKAGE}/cmake \ -DCMAKE_COMPILE_WARNING_AS_ERROR=OFF \ -S ${OPENVINO_CONTRIB_REPO}/modules/nvidia_plugin \ -B ${NVIDIA_BUILD_DIR} From dc55ff9453853967bb3f8be6e8f1aa3aa6f455fb Mon Sep 17 00:00:00 2001 From: Andrei Kashchikhin Date: Thu, 25 Apr 2024 10:30:34 +0100 Subject: [PATCH 25/39] enable system --- .github/workflows/linux.yml | 2 ++ 1 file changed, 2 insertions(+) diff --git a/.github/workflows/linux.yml b/.github/workflows/linux.yml index 061e4c2c0..047e530cc 100644 --- a/.github/workflows/linux.yml +++ b/.github/workflows/linux.yml @@ -127,6 +127,8 @@ jobs: -DENABLE_OV_PADDLE_FRONTEND=OFF \ -DENABLE_OV_TF_LITE_FRONTEND=OFF \ -DENABLE_OV_PYTORCH_FRONTEND=OFF \ + -DENABLE_SYSTEM_TBB=ON \ + -DENABLE_SYSTEM_OPENCL=ON \ -DOPENVINO_EXTRA_MODULES=${OPENVINO_CONTRIB_REPO}/modules \ -DENABLE_PYTHON=ON \ -DCPACK_GENERATOR=TGZ \ From 4d28ac15e6e64d2dcccb245e76a859012b645a48 Mon Sep 17 00:00:00 2001 From: Andrei Kashchikhin Date: Thu, 25 Apr 2024 11:05:59 +0100 Subject: [PATCH 26/39] use from fork --- .github/workflows/linux.yml | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/.github/workflows/linux.yml b/.github/workflows/linux.yml index 047e530cc..dd4277638 100644 --- a/.github/workflows/linux.yml +++ b/.github/workflows/linux.yml @@ -57,10 +57,11 @@ jobs: - name: Clone OpenVINO uses: actions/checkout@v4 with: - repository: 'openvinotoolkit/openvino' + # repository: 'openvinotoolkit/openvino' + repository: 'akashchi/openvino' path: ${{ env.OPENVINO_REPO }} submodules: 'true' - ref: 'master' + ref: 'ci/gha/contrib-cuda' - name: Clone OpenVINO Contrib uses: actions/checkout@v4 From c79b8cafa827275251ca311c86c5e83b03797acd Mon Sep 17 00:00:00 2001 From: Andrei Kashchikhin Date: Thu, 25 Apr 2024 12:12:48 +0100 Subject: [PATCH 27/39] rm system --- .github/workflows/linux.yml | 2 -- 1 file changed, 2 deletions(-) diff --git a/.github/workflows/linux.yml b/.github/workflows/linux.yml index dd4277638..2cf1b3d53 100644 --- a/.github/workflows/linux.yml +++ b/.github/workflows/linux.yml @@ -128,8 +128,6 @@ jobs: -DENABLE_OV_PADDLE_FRONTEND=OFF \ -DENABLE_OV_TF_LITE_FRONTEND=OFF \ -DENABLE_OV_PYTORCH_FRONTEND=OFF \ - -DENABLE_SYSTEM_TBB=ON \ - -DENABLE_SYSTEM_OPENCL=ON \ -DOPENVINO_EXTRA_MODULES=${OPENVINO_CONTRIB_REPO}/modules \ -DENABLE_PYTHON=ON \ -DCPACK_GENERATOR=TGZ \ From 7316b6dfcda3294d99f9bc8d8e569d8385ae3700 Mon Sep 17 00:00:00 2001 From: Andrei Kashchikhin Date: Thu, 25 Apr 2024 12:19:29 +0100 Subject: [PATCH 28/39] use hash --- .github/workflows/linux.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/linux.yml b/.github/workflows/linux.yml index 2cf1b3d53..dcd9374b2 100644 --- a/.github/workflows/linux.yml +++ b/.github/workflows/linux.yml @@ -61,7 +61,7 @@ jobs: repository: 'akashchi/openvino' path: ${{ env.OPENVINO_REPO }} submodules: 'true' - ref: 'ci/gha/contrib-cuda' + ref: 'a1dc4d6f58622e71a58b277ef248220ad1780982' - name: Clone OpenVINO Contrib uses: actions/checkout@v4 From ebe6d3291a6c25f55f8ae1081939c6a03886c90f Mon Sep 17 00:00:00 2001 From: Andrei Kashchikhin Date: Thu, 25 Apr 2024 12:28:02 +0100 Subject: [PATCH 29/39] update hash --- .github/workflows/linux.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/linux.yml b/.github/workflows/linux.yml index dcd9374b2..db991935d 100644 --- a/.github/workflows/linux.yml +++ b/.github/workflows/linux.yml @@ -61,7 +61,7 @@ jobs: repository: 'akashchi/openvino' path: ${{ env.OPENVINO_REPO }} submodules: 'true' - ref: 'a1dc4d6f58622e71a58b277ef248220ad1780982' + ref: '3317cdbcf2ef73e23a98affd78a6c2f96137280d' - name: Clone OpenVINO Contrib uses: actions/checkout@v4 From e6ab97873d4b843bc9bc6a663563a62f617e78f1 Mon Sep 17 00:00:00 2001 From: Andrei Kashchikhin Date: Thu, 25 Apr 2024 13:12:29 +0100 Subject: [PATCH 30/39] enable tests --- .github/workflows/linux.yml | 1 + 1 file changed, 1 insertion(+) diff --git a/.github/workflows/linux.yml b/.github/workflows/linux.yml index db991935d..1fcc4a37f 100644 --- a/.github/workflows/linux.yml +++ b/.github/workflows/linux.yml @@ -132,6 +132,7 @@ jobs: -DENABLE_PYTHON=ON \ -DCPACK_GENERATOR=TGZ \ -DENABLE_WHEEL=ON \ + -DENABLE_TESTS=ON \ -DCMAKE_CXX_COMPILER_LAUNCHER=${{ env.CMAKE_CXX_COMPILER_LAUNCHER }} \ -DCMAKE_C_COMPILER_LAUNCHER=${{ env.CMAKE_C_COMPILER_LAUNCHER }} \ -S ${OPENVINO_REPO} \ From 689d68aff3409633c342735eeda5d3b195638753 Mon Sep 17 00:00:00 2001 From: Andrei Kashchikhin Date: Fri, 26 Apr 2024 11:04:54 +0100 Subject: [PATCH 31/39] build dev targets, do not build tests --- .github/workflows/linux.yml | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/.github/workflows/linux.yml b/.github/workflows/linux.yml index 1fcc4a37f..31cd70347 100644 --- a/.github/workflows/linux.yml +++ b/.github/workflows/linux.yml @@ -132,7 +132,7 @@ jobs: -DENABLE_PYTHON=ON \ -DCPACK_GENERATOR=TGZ \ -DENABLE_WHEEL=ON \ - -DENABLE_TESTS=ON \ + -DENABLE_TESTS=OFF \ -DCMAKE_CXX_COMPILER_LAUNCHER=${{ env.CMAKE_CXX_COMPILER_LAUNCHER }} \ -DCMAKE_C_COMPILER_LAUNCHER=${{ env.CMAKE_C_COMPILER_LAUNCHER }} \ -S ${OPENVINO_REPO} \ @@ -144,6 +144,9 @@ jobs: - name: Cmake build run: cmake --build ${BUILD_DIR} --parallel + - name: Cmake build - dev targets + run: cmake --build ${BUILD_DIR} --parallel --target ov_dev_targets + - name: Show ccache stats run: ccache --show-stats From 1a41376cc00f701b987bd848a898c5d3a031fa16 Mon Sep 17 00:00:00 2001 From: Andrei Kashchikhin Date: Fri, 26 Apr 2024 13:11:05 +0100 Subject: [PATCH 32/39] enable tests --- .github/workflows/linux.yml | 5 +---- 1 file changed, 1 insertion(+), 4 deletions(-) diff --git a/.github/workflows/linux.yml b/.github/workflows/linux.yml index 31cd70347..1fcc4a37f 100644 --- a/.github/workflows/linux.yml +++ b/.github/workflows/linux.yml @@ -132,7 +132,7 @@ jobs: -DENABLE_PYTHON=ON \ -DCPACK_GENERATOR=TGZ \ -DENABLE_WHEEL=ON \ - -DENABLE_TESTS=OFF \ + -DENABLE_TESTS=ON \ -DCMAKE_CXX_COMPILER_LAUNCHER=${{ env.CMAKE_CXX_COMPILER_LAUNCHER }} \ -DCMAKE_C_COMPILER_LAUNCHER=${{ env.CMAKE_C_COMPILER_LAUNCHER }} \ -S ${OPENVINO_REPO} \ @@ -144,9 +144,6 @@ jobs: - name: Cmake build run: cmake --build ${BUILD_DIR} --parallel - - name: Cmake build - dev targets - run: cmake --build ${BUILD_DIR} --parallel --target ov_dev_targets - - name: Show ccache stats run: ccache --show-stats From 5eb54376db4ca9facf717b0f2ae318c4d0f3ad56 Mon Sep 17 00:00:00 2001 From: Andrei Kashchikhin Date: Mon, 29 Apr 2024 08:42:43 +0100 Subject: [PATCH 33/39] use master --- .github/workflows/linux.yml | 5 ++--- 1 file changed, 2 insertions(+), 3 deletions(-) diff --git a/.github/workflows/linux.yml b/.github/workflows/linux.yml index 1fcc4a37f..b80be2532 100644 --- a/.github/workflows/linux.yml +++ b/.github/workflows/linux.yml @@ -57,11 +57,10 @@ jobs: - name: Clone OpenVINO uses: actions/checkout@v4 with: - # repository: 'openvinotoolkit/openvino' - repository: 'akashchi/openvino' + repository: 'openvinotoolkit/openvino' path: ${{ env.OPENVINO_REPO }} submodules: 'true' - ref: '3317cdbcf2ef73e23a98affd78a6c2f96137280d' + ref: 'master' - name: Clone OpenVINO Contrib uses: actions/checkout@v4 From d8a244bca75ed6234b1b59e39e0e7ba4f73da6c6 Mon Sep 17 00:00:00 2001 From: Andrei Kashchikhin Date: Mon, 29 Apr 2024 12:32:24 +0100 Subject: [PATCH 34/39] add mac --- .github/workflows/mac.yml | 143 ++++++++++++++++++++++++++++++++++++++ 1 file changed, 143 insertions(+) create mode 100644 .github/workflows/mac.yml diff --git a/.github/workflows/mac.yml b/.github/workflows/mac.yml new file mode 100644 index 000000000..9d7770279 --- /dev/null +++ b/.github/workflows/mac.yml @@ -0,0 +1,143 @@ +name: macOS (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 }}-mac-main + cancel-in-progress: true + +env: + PYTHON_VERSION: '3.11' + +jobs: + Build: + timeout-minutes: 150 + defaults: + run: + shell: bash + runs-on: 'macos-13-large' + env: + CMAKE_BUILD_TYPE: 'Release' + MACOSX_DEPLOYMENT_TARGET: '11.0' + OSX_ARCHITECTURES: 'x86_64' + CMAKE_CXX_COMPILER_LAUNCHER: ccache + CMAKE_C_COMPILER_LAUNCHER: ccache + OPENVINO_REPO: ${{ github.workspace }}/openvino + OPENVINO_CONTRIB_REPO: ${{ github.workspace }}/openvino_contrib + TEST_DATA: ${{ github.workspace }}/testdata + INSTALL_DIR: ${{ github.workspace }}/openvino_install + INSTALL_DIR_JS: ${{ github.workspace }}/openvino_install/js + INSTALL_TEST_DIR: ${{ github.workspace }}/tests_install + BUILD_DIR: ${{ github.workspace }}/build + GRADLE_VER: '7.1.1' + steps: + - name: Clone OpenVINO + uses: actions/checkout@v4 + with: + repository: 'openvinotoolkit/openvino' + path: 'openvino' + submodules: 'true' + ref: 'master' + + - name: Clone OpenVINO Contrib + uses: actions/checkout@v4 + with: + path: 'openvino_contrib' + + - name: Clone Testdata + uses: actions/checkout@v4 + with: + repository: 'openvinotoolkit/testdata' + path: 'testdata' + lfs: 'true' + submodules: 'true' + + # + # Dependencies + # + + - name: Install build dependencies + run: brew install coreutils ninja scons automake + + - name: Setup Python ${{ env.PYTHON_VERSION }} + uses: actions/setup-python@v5 + with: + python-version: ${{ env.PYTHON_VERSION }} + + - name: Setup Gradle + uses: gradle/actions/setup-gradle@v3 + with: + gradle-version: ${{ env.GRADLE_VER }} + + - name: Install python dependencies + run: python3 -m pip install -r ${{ env.OPENVINO_REPO }}/src/bindings/python/wheel/requirements-dev.txt + + # + # Build + # + + - name: Setup ccache + uses: hendrikmuhs/ccache-action@v1.2 + with: + max-size: "2000M" + # Should save cache only if run in the master branch of the base repo + # github.ref_name is 'ref/PR_#' in case of the PR, and 'branch_name' when executed on push + save: ${{ github.ref_name == 'master' && 'true' || 'false' }} + verbose: 2 + key: ${{ runner.os }}-${{ runner.arch }}-main + restore-keys: | + ${{ runner.os }}-${{ runner.arch }}-main + + - name: CMake configure + run: | + cmake \ + -GNinja \ + -DCMAKE_VERBOSE_MAKEFILE=ON \ + -DCMAKE_BUILD_TYPE=${{ env.CMAKE_BUILD_TYPE }} \ + -DBUILD_nvidia_plugin=OFF \ + -DOPENVINO_EXTRA_MODULES=${{ env.OPENVINO_CONTRIB_REPO }}/modules \ + -DCMAKE_OSX_DEPLOYMENT_TARGET=${{ env.MACOSX_DEPLOYMENT_TARGET }} \ + -DCMAKE_OSX_ARCHITECTURES=${{ env.OSX_ARCHITECTURES }} \ + -DCMAKE_CXX_COMPILER_LAUNCHER=${{ env.CMAKE_CXX_COMPILER_LAUNCHER }} \ + -DCMAKE_C_COMPILER_LAUNCHER=${{ env.CMAKE_C_COMPILER_LAUNCHER }} \ + -DENABLE_OV_PADDLE_FRONTEND=OFF \ + -DENABLE_OV_TF_FRONTEND=OFF \ + -DENABLE_OV_TF_LITE_FRONTEND=OFF \ + -DENABLE_OV_PYTORCH_FRONTEND=OFF \ + -DENABLE_CPPLINT=OFF \ + -S ${{ env.OPENVINO_REPO }} \ + -B ${{ env.BUILD_DIR }} + + - name: Cmake build + run: cmake --build ${{ env.BUILD_DIR }} --parallel + + - name: Show ccache stats + run: ccache --show-stats + + - name: Cmake install + run: cmake -DCMAKE_INSTALL_PREFIX=${{ env.INSTALL_DIR }} -P ${{ env.BUILD_DIR }}/cmake_install.cmake + + - name: Java tests + working-directory: ${{ env.OPENVINO_CONTRIB_REPO }}/modules/java_api + run: | + . ${{ env.INSTALL_DIR }}/setupvars.sh gradle clean build --info + + for d in CPU HETERO:CPU; do + gradle test -Prun_tests -DMODELS_PATH=${{ env.TEST_DATA }} -Ddevice=$d --info; + done + + - name: Check wheel installation + run: | + source ${{ env.INSTALL_DIR }}/setupvars.sh + python3 -m pip install -r ${{ env.OPENVINO_CONTRIB_REPO }}/modules/custom_operations/tests/requirements.txt + + pushd ${{ env.INSTALL_DIR }}/tools + wheel_name=$(find . -name 'openvino-*.whl') + python3 -m pip install $wheel_name + popd From 84ac2217da5500d09ddadb91fef4a697d21c2dad Mon Sep 17 00:00:00 2001 From: Andrei Kashchikhin Date: Mon, 29 Apr 2024 13:13:29 +0100 Subject: [PATCH 35/39] install gradle via brew --- .github/workflows/mac.yml | 13 +++++++------ 1 file changed, 7 insertions(+), 6 deletions(-) diff --git a/.github/workflows/mac.yml b/.github/workflows/mac.yml index 9d7770279..e325f9ad5 100644 --- a/.github/workflows/mac.yml +++ b/.github/workflows/mac.yml @@ -16,7 +16,8 @@ env: PYTHON_VERSION: '3.11' jobs: - Build: + Build_and_test: + name: Build and Test timeout-minutes: 150 defaults: run: @@ -63,17 +64,17 @@ jobs: # - name: Install build dependencies - run: brew install coreutils ninja scons automake + run: brew install coreutils ninja scons automake gradle - name: Setup Python ${{ env.PYTHON_VERSION }} uses: actions/setup-python@v5 with: python-version: ${{ env.PYTHON_VERSION }} - - name: Setup Gradle - uses: gradle/actions/setup-gradle@v3 - with: - gradle-version: ${{ env.GRADLE_VER }} +# - name: Setup Gradle +# uses: gradle/actions/setup-gradle@v3 +# with: +# gradle-version: ${{ env.GRADLE_VER }} - name: Install python dependencies run: python3 -m pip install -r ${{ env.OPENVINO_REPO }}/src/bindings/python/wheel/requirements-dev.txt From 3a6e61367f69653592c0dcaf7b70d4f70b00c7fb Mon Sep 17 00:00:00 2001 From: Andrei Kashchikhin Date: Mon, 29 Apr 2024 13:46:20 +0100 Subject: [PATCH 36/39] upload test results --- .github/workflows/mac.yml | 13 ++++++++----- 1 file changed, 8 insertions(+), 5 deletions(-) diff --git a/.github/workflows/mac.yml b/.github/workflows/mac.yml index e325f9ad5..56aa7817a 100644 --- a/.github/workflows/mac.yml +++ b/.github/workflows/mac.yml @@ -71,11 +71,6 @@ jobs: with: python-version: ${{ env.PYTHON_VERSION }} -# - name: Setup Gradle -# uses: gradle/actions/setup-gradle@v3 -# with: -# gradle-version: ${{ env.GRADLE_VER }} - - name: Install python dependencies run: python3 -m pip install -r ${{ env.OPENVINO_REPO }}/src/bindings/python/wheel/requirements-dev.txt @@ -142,3 +137,11 @@ jobs: wheel_name=$(find . -name 'openvino-*.whl') python3 -m pip install $wheel_name popd + + - name: Upload Test Results + uses: actions/upload-artifact@v4 + if: ${{ !cancelled() }} + with: + name: test-results-java + path: ${{ env.OPENVINO_CONTRIB_REPO }}/modules/java_api/build/test-results + if-no-files-found: 'warn' \ No newline at end of file From 760a12bb124f2158db423b0ea2881a556fa3af40 Mon Sep 17 00:00:00 2001 From: Andrei Kashchikhin Date: Thu, 23 May 2024 09:21:37 +0100 Subject: [PATCH 37/39] use actions/cache --- .github/workflows/mac.yml | 16 +++++++++------- 1 file changed, 9 insertions(+), 7 deletions(-) diff --git a/.github/workflows/mac.yml b/.github/workflows/mac.yml index 56aa7817a..b19425b1c 100644 --- a/.github/workflows/mac.yml +++ b/.github/workflows/mac.yml @@ -36,6 +36,8 @@ jobs: INSTALL_DIR_JS: ${{ github.workspace }}/openvino_install/js INSTALL_TEST_DIR: ${{ github.workspace }}/tests_install BUILD_DIR: ${{ github.workspace }}/build + CCACHE_DIR: ${{ github.workspace }}/ccache + CCACHE_MAXSIZE: '2G' GRADLE_VER: '7.1.1' steps: - name: Clone OpenVINO @@ -64,7 +66,7 @@ jobs: # - name: Install build dependencies - run: brew install coreutils ninja scons automake gradle + run: brew install coreutils ninja scons automake gradle ccache - name: Setup Python ${{ env.PYTHON_VERSION }} uses: actions/setup-python@v5 @@ -79,16 +81,15 @@ jobs: # - name: Setup ccache - uses: hendrikmuhs/ccache-action@v1.2 + uses: actions/cache@v4 with: - max-size: "2000M" # Should save cache only if run in the master branch of the base repo # github.ref_name is 'ref/PR_#' in case of the PR, and 'branch_name' when executed on push - save: ${{ github.ref_name == 'master' && 'true' || 'false' }} - verbose: 2 - key: ${{ runner.os }}-${{ runner.arch }}-main + save-always: ${{ github.ref_name == 'master' && 'true' || 'false' }} + path: ${{ env.CCACHE_DIR }} + key: ${{ runner.os }}-${{ runner.arch }}-ccache-${{ github.sha }} restore-keys: | - ${{ runner.os }}-${{ runner.arch }}-main + ${{ runner.os }}-${{ runner.arch }}-ccache - name: CMake configure run: | @@ -107,6 +108,7 @@ jobs: -DENABLE_OV_TF_LITE_FRONTEND=OFF \ -DENABLE_OV_PYTORCH_FRONTEND=OFF \ -DENABLE_CPPLINT=OFF \ + -DENABLE_INTEL_NPU=OFF \ -S ${{ env.OPENVINO_REPO }} \ -B ${{ env.BUILD_DIR }} From ee4858c4fbe7afe2a0a735ebe36c6a363aa2c1fc Mon Sep 17 00:00:00 2001 From: Andrei Kashchikhin Date: Thu, 23 May 2024 09:22:33 +0100 Subject: [PATCH 38/39] unskip --- .../src/test/java/org/intel/openvino/PrePostProcessorTests.java | 1 - 1 file changed, 1 deletion(-) diff --git a/modules/java_api/src/test/java/org/intel/openvino/PrePostProcessorTests.java b/modules/java_api/src/test/java/org/intel/openvino/PrePostProcessorTests.java index 361a46b91..63405797c 100644 --- a/modules/java_api/src/test/java/org/intel/openvino/PrePostProcessorTests.java +++ b/modules/java_api/src/test/java/org/intel/openvino/PrePostProcessorTests.java @@ -52,7 +52,6 @@ public void testWrongLayout() { + " input")); } - @Ignore // Ticket: 138994 @Test public void testWrongElementType() { String exceptionMessage = ""; From fbb68edf3119619e88854a19cf8fdd1deded430c Mon Sep 17 00:00:00 2001 From: Andrei Kashchikhin Date: Thu, 23 May 2024 09:22:59 +0100 Subject: [PATCH 39/39] new line --- .github/workflows/mac.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/mac.yml b/.github/workflows/mac.yml index b19425b1c..6fdb59220 100644 --- a/.github/workflows/mac.yml +++ b/.github/workflows/mac.yml @@ -146,4 +146,4 @@ jobs: with: name: test-results-java path: ${{ env.OPENVINO_CONTRIB_REPO }}/modules/java_api/build/test-results - if-no-files-found: 'warn' \ No newline at end of file + if-no-files-found: 'warn'