Skip to content

Commit

Permalink
[CI] [GHA] Introduce Android x64 workflow (openvinotoolkit#26086)
Browse files Browse the repository at this point in the history
### Tickets:
 - *148716*
  • Loading branch information
akashchi authored Aug 29, 2024
1 parent 9a60a62 commit 3ffb013
Show file tree
Hide file tree
Showing 6 changed files with 170 additions and 12 deletions.
2 changes: 1 addition & 1 deletion .github/dockerfiles/docker_tag
Original file line number Diff line number Diff line change
@@ -1 +1 @@
pr-26156
pr-26086
9 changes: 5 additions & 4 deletions .github/workflows/android_arm64.yml
Original file line number Diff line number Diff line change
Expand Up @@ -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 }}
Expand All @@ -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
Expand All @@ -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
Expand Down Expand Up @@ -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 \
Expand Down Expand Up @@ -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
Expand Down
162 changes: 162 additions & 0 deletions .github/workflows/android_x64.yml
Original file line number Diff line number Diff line change
@@ -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
1 change: 1 addition & 0 deletions .github/workflows/send_workflows_to_opentelemetry.yml
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,7 @@ on:
workflow_run:
workflows:
- Android ARM64 with vcpkg
- Android x64
- Documentation
- Cleanup PIP caches
- Code snippets
Expand Down
8 changes: 1 addition & 7 deletions cmake/features.cmake
Original file line number Diff line number Diff line change
Expand Up @@ -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)
Expand Down

0 comments on commit 3ffb013

Please sign in to comment.