Skip to content

OpenVINO™ is an open source toolkit for optimizing and deploying AI inference

[CI] [GHA] Introduce Android x64 workflow (#26086)

Andrei Kashchikhin3ffb0133f239
diff --git a/.github/dockerfiles/docker_tag b/.github/dockerfiles/docker_tag
index e6201e763f2..4f9ce5e37c4 100644
--- a/.github/dockerfiles/docker_tag
+++ b/.github/dockerfiles/docker_tag
@@ -1 +1 @@
-pr-26156
\ No newline at end of file
+pr-26086
\ No newline at end of file
diff --git a/.github/dockerfiles/ov_build/ubuntu_22_04_android_arm64/Dockerfile b/.github/dockerfiles/ov_build/ubuntu_22_04_android/Dockerfile
similarity index 100%
rename from .github/dockerfiles/ov_build/ubuntu_22_04_android_arm64/Dockerfile
rename to .github/dockerfiles/ov_build/ubuntu_22_04_android/Dockerfile
diff --git a/.github/workflows/android_arm64.yml b/.github/workflows/android_arm64.yml
index 9d39a4d2274..cd1cb72bf62 100644
--- a/.github/workflows/android_arm64.yml
+++ b/.github/workflows/android_arm64.yml
@@ -58,7 +58,7 @@ jobs:
id: handle_docker
with:
images: |
- ov_build/ubuntu_22_04_android_arm64
+ ov_build/ubuntu_22_04_android
registry: 'openvinogithubactions.azurecr.io'
dockerfiles_root_dir: '.github/dockerfiles'
changed_components: ${{ needs.smart_ci.outputs.changed_components }}
@@ -71,7 +71,7 @@ jobs:
shell: bash
runs-on: aks-linux-16-cores-32gb
container:
- image: ${{ fromJSON(needs.docker.outputs.images).ov_build.ubuntu_22_04_android_arm64 }}
+ image: ${{ fromJSON(needs.docker.outputs.images).ov_build.ubuntu_22_04_android }}
volumes:
- /mount:/mount
options: -e SCCACHE_AZURE_BLOB_CONTAINER -e SCCACHE_AZURE_CONNECTION_STRING
@@ -91,6 +91,7 @@ jobs:
ANDROID_NDK_HOME: '/deps/android_tools/ndk-bundle'
ANDROID_SDK_VERSION: 29
ANDROID_ABI_CONFIG: arm64-v8a
+ VCPKG_TARGET_TRIPLET: arm64-android
VCPKG_DEFAULT_BINARY_CACHE: '/mount/caches/ccache/android_arm64/vcpkg_cache'
VCPKG_FORCE_SYSTEM_BINARIES: '1'
SCCACHE_AZURE_KEY_PREFIX: android_arm64
@@ -154,7 +155,7 @@ jobs:
-DENABLE_SYSTEM_FLATBUFFERS=ON \
-DANDROID_ABI=${{ env.ANDROID_ABI_CONFIG }} \
-DANDROID_PLATFORM=${{ env.ANDROID_SDK_VERSION }} \
- -DVCPKG_TARGET_TRIPLET=arm64-android \
+ -DVCPKG_TARGET_TRIPLET=${{ env.VCPKG_TARGET_TRIPLET }} \
-DVCPKG_HOST_TRIPLET=x64-linux-release \
-DCMAKE_TOOLCHAIN_FILE=${VCPKG_ROOT}/scripts/buildsystems/vcpkg.cmake \
-DVCPKG_CHAINLOAD_TOOLCHAIN_FILE=${ANDROID_NDK_HOME}/build/cmake/android.toolchain.cmake \
@@ -185,7 +186,7 @@ jobs:
if-no-files-found: 'ignore'
Overall_Status:
- name: ci/gha_overall_status_android
+ name: ci/gha_overall_status_android_arm64
needs: [Smart_CI, Build]
if: ${{ always() }}
runs-on: ubuntu-latest
diff --git a/.github/workflows/android_x64.yml b/.github/workflows/android_x64.yml
new file mode 100644
index 00000000000..97da861258a
--- /dev/null
+++ b/.github/workflows/android_x64.yml
@@ -0,0 +1,162 @@
+name: Android x64
+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 }}-android-x64
+ 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@692973e3d937129bcbf40652eb9f2f61becf3332 # v4.1.7
+ 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,*/layer_tests_summary/*,*/conformance/*'
+
+ Docker:
+ needs: Smart_CI
+ 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@692973e3d937129bcbf40652eb9f2f61becf3332 # v4.1.7
+
+ - uses: ./.github/actions/handle_docker
+ id: handle_docker
+ with:
+ images: |
+ ov_build/ubuntu_22_04_android
+ registry: 'openvinogithubactions.azurecr.io'
+ dockerfiles_root_dir: '.github/dockerfiles'
+ changed_components: ${{ needs.smart_ci.outputs.changed_components }}
+
+ Build:
+ needs: [Smart_CI, Docker]
+ timeout-minutes: 150
+ defaults:
+ run:
+ shell: bash
+ runs-on: aks-linux-16-cores-32gb
+ container:
+ image: ${{ fromJSON(needs.docker.outputs.images).ov_build.ubuntu_22_04_android }}
+ 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_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
+ OPENVINO_REPO: '/__w/openvino/openvino/openvino'
+ BUILD_DIR: '/__w/openvino/openvino/build'
+ ANDROID_TOOLS: '/deps/android_tools'
+ ANDROID_NDK_HOME: '/deps/android_tools/ndk-bundle'
+ ANDROID_SDK_VERSION: 29
+ ANDROID_ABI_CONFIG: x86_64
+ SCCACHE_AZURE_KEY_PREFIX: android_x64
+ if: "!needs.smart_ci.outputs.skip_workflow"
+ steps:
+ - name: Clone OpenVINO
+ uses: actions/checkout@692973e3d937129bcbf40652eb9f2f61becf3332 # v4.1.7
+ with:
+ path: 'openvino'
+ submodules: 'true'
+
+ #
+ # Print system info
+ #
+
+ - name: System info
+ uses: ./openvino/.github/actions/system_info
+
+ #
+ # Build
+ #
+
+ - name: CMake - configure
+ run: |
+ cmake \
+ -DCMAKE_TOOLCHAIN_FILE=${ANDROID_NDK_HOME}/build/cmake/android.toolchain.cmake \
+ -DANDROID_ABI=${{ env.ANDROID_ABI_CONFIG }} \
+ -DANDROID_STL=c++_shared \
+ -DANDROID_PLATFORM=${{ env.ANDROID_SDK_VERSION }} \
+ -DCMAKE_COMPILE_WARNING_AS_ERROR=OFF \
+ -DCMAKE_BUILD_TYPE=Release \
+ -DENABLE_STRICT_DEPENDENCIES=OFF \
+ -DCMAKE_VERBOSE_MAKEFILE=ON \
+ -DCMAKE_CXX_COMPILER_LAUNCHER=${{ env.CMAKE_CXX_COMPILER_LAUNCHER }} \
+ -DCMAKE_C_COMPILER_LAUNCHER=${{ env.CMAKE_C_COMPILER_LAUNCHER }} \
+ -DENABLE_LTO=ON \
+ -DENABLE_PYTHON=OFF \
+ -S ${OPENVINO_REPO} \
+ -B ${BUILD_DIR}
+
+ - name: Clean ccache stats
+ run: ${SCCACHE_PATH} --zero-stats
+
+ - name: Cmake - build
+ run: cmake --build ${BUILD_DIR} --parallel
+
+ - name: Show ccache stats
+ run: ${SCCACHE_PATH} --show-stats
+
+ #
+ # Upload build logs
+ #
+ - name: Upload build logs
+ uses: actions/upload-artifact@0b2256b8c012f0828dc542b3febcab082c67f72b # v4.3.4
+ if: always()
+ with:
+ name: build_logs
+ path: ${{ env.SCCACHE_ERROR_LOG }}
+ if-no-files-found: 'ignore'
+
+ Overall_Status:
+ name: ci/gha_overall_status_android
+ needs: [Smart_CI, Build]
+ if: ${{ always() }}
+ runs-on: ubuntu-latest
+ steps:
+ - name: Check status of all jobs
+ if: >-
+ ${{
+ contains(needs.*.result, 'failure') ||
+ contains(needs.*.result, 'cancelled')
+ }}
+ run: exit 1
diff --git a/.github/workflows/send_workflows_to_opentelemetry.yml b/.github/workflows/send_workflows_to_opentelemetry.yml
index eac55160bf8..027daec5993 100644
--- a/.github/workflows/send_workflows_to_opentelemetry.yml
+++ b/.github/workflows/send_workflows_to_opentelemetry.yml
@@ -4,6 +4,7 @@ on:
workflow_run:
workflows:
- Android ARM64 with vcpkg
+ - Android x64
- Documentation
- Cleanup PIP caches
- Code snippets
diff --git a/cmake/features.cmake b/cmake/features.cmake
index 8709c48cc1c..e1201ad3a18 100644
--- a/cmake/features.cmake
+++ b/cmake/features.cmake
@@ -43,13 +43,7 @@ endif()
ov_dependent_option (ENABLE_ONEDNN_FOR_GPU "Enable oneDNN with GPU support" ${ENABLE_ONEDNN_FOR_GPU_DEFAULT} "ENABLE_INTEL_GPU" OFF)
-if(X86_64)
- set(ENABLE_INTEL_NPU_DEFAULT ON)
-else()
- set(ENABLE_INTEL_NPU_DEFAULT OFF)
-endif()
-
-ov_dependent_option (ENABLE_INTEL_NPU "NPU plugin for OpenVINO runtime" ${ENABLE_INTEL_NPU_DEFAULT} "X86 OR X86_64;NOT APPLE" OFF)
+ov_dependent_option (ENABLE_INTEL_NPU "NPU plugin for OpenVINO runtime" ON "X86_64;WIN32 OR LINUX" OFF)
ov_dependent_option (ENABLE_INTEL_NPU_INTERNAL "NPU plugin internal components for OpenVINO runtime" ON "ENABLE_INTEL_NPU" OFF)
ov_option (ENABLE_DEBUG_CAPS "enable OpenVINO debug capabilities at runtime" OFF)