Skip to content

Commit ce7366b

Browse files
Enabled Android arm64 GHA in precommit (openvinotoolkit#20094)
1 parent 132bada commit ce7366b

File tree

5 files changed

+150
-177
lines changed

5 files changed

+150
-177
lines changed

.github/workflows/android_arm64.yml

+144
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,144 @@
1+
name: Android ARM64 with vcpkg
2+
on:
3+
workflow_dispatch:
4+
pull_request:
5+
paths-ignore:
6+
- '**/docs/**'
7+
- 'docs/**'
8+
- '**/**.md'
9+
- '**.md'
10+
- '**/layer_tests_summary/**'
11+
- '**/conformance/**'
12+
push:
13+
paths-ignore:
14+
- '**/docs/**'
15+
- 'docs/**'
16+
- '**/**.md'
17+
- '**.md'
18+
- '**/layer_tests_summary/**'
19+
- '**/conformance/**'
20+
branches:
21+
- master
22+
23+
concurrency:
24+
# github.ref is not unique in post-commit
25+
group: ${{ github.event_name == 'push' && github.run_id || github.ref }}-android-arm64-vcpkg
26+
cancel-in-progress: true
27+
28+
jobs:
29+
Build:
30+
defaults:
31+
run:
32+
shell: bash
33+
runs-on: aks-linux-16-cores
34+
container:
35+
image: openvinogithubactions.azurecr.io/dockerhub/ubuntu:20.04
36+
volumes:
37+
- /mount/caches:/mount/caches
38+
env:
39+
DEBIAN_FRONTEND: noninteractive # to prevent apt-get from waiting user input
40+
CMAKE_GENERATOR: 'Ninja'
41+
CMAKE_CXX_COMPILER_LAUNCHER: ccache
42+
CMAKE_C_COMPILER_LAUNCHER: ccache
43+
OPENVINO_REPO: '/__w/openvino/openvino/openvino'
44+
VCPKG_ROOT: '/__w/openvino/openvino/vcpkg'
45+
BUILD_DIR: '/__w/openvino/openvino/build'
46+
INSTALL_DIR: '/__w/openvino/openvino/install'
47+
ANDROID_TOOLS: '/__w/openvino/openvino/android_tools'
48+
ANDROID_NDK_HOME: '/__w/openvino/openvino/android_tools/ndk-bundle'
49+
ANDROID_SDK_VERSION: 29
50+
ANDROID_ABI_CONFIG: arm64-v8a
51+
CCACHE_DIR: '/mount/caches/ccache/android_arm64'
52+
CCACHE_TEMPDIR: '/__w/openvino/openvino/ccache_temp'
53+
CCACHE_MAXSIZE: 50G
54+
steps:
55+
- name: Install git
56+
run: apt-get update && apt-get install --assume-yes --no-install-recommends git ca-certificates
57+
58+
- name: Clone OpenVINO
59+
uses: actions/checkout@v4
60+
with:
61+
path: 'openvino'
62+
63+
- name: Init submodules for non vcpkg dependencies
64+
run: |
65+
pushd ${OPENVINO_REPO}
66+
git submodule update --init -- ${OPENVINO_REPO}/src/plugins
67+
git submodule update --init -- ${OPENVINO_REPO}/thirdparty/gtest
68+
git submodule update --init -- ${OPENVINO_REPO}/thirdparty/gflags
69+
git submodule update --init -- ${OPENVINO_REPO}/thirdparty/open_model_zoo
70+
popd
71+
72+
- name: Clone vcpkg
73+
uses: actions/checkout@v4
74+
with:
75+
repository: 'microsoft/vcpkg'
76+
path: 'vcpkg'
77+
fetch-depth: '0'
78+
79+
#
80+
# Dependencies
81+
#
82+
83+
- name: Install dependencies
84+
run: |
85+
# generic dependencies
86+
apt --assume-yes install ccache scons ninja-build build-essential python3-pip
87+
88+
# vcpkg requires cmake 3.19 or later
89+
python3 -m pip install -U pip cmake
90+
# vcpkg's tool dependencies
91+
apt --assume-yes install curl zip unzip tar
92+
# vcpkg 'python3' port dependencies
93+
apt --assume-yes install autoconf libtool autoconf-archive
94+
# vcpkg tree of dependencies require extra packages
95+
apt --assume-yes install pkg-config linux-libc-dev
96+
97+
# Install Android SDK, NDK and Tools
98+
apt -y --no-install-recommends install unzip wget default-jdk
99+
wget https://dl.google.com/android/repository/commandlinetools-linux-7583922_latest.zip
100+
unzip commandlinetools-linux-7583922_latest.zip
101+
echo "yes" | ./cmdline-tools/bin/sdkmanager --sdk_root=${ANDROID_TOOLS} --install "ndk-bundle" "platform-tools" "platforms;android-${{ env.ANDROID_SDK_VERSION }}"
102+
103+
#
104+
# Build
105+
#
106+
107+
- name: Build vcpkg
108+
run: |
109+
${VCPKG_ROOT}/bootstrap-vcpkg.sh
110+
# patch vcpkg default toolchain to build only Release configuration
111+
echo "set(VCPKG_BUILD_TYPE release)" >> ${VCPKG_ROOT}/triplets/arm64-android.cmake
112+
113+
- name: CMake - configure
114+
run: |
115+
cmake \
116+
-G '${{ env.CMAKE_GENERATOR }}' \
117+
-DENABLE_INTEL_GPU=ON \
118+
-DENABLE_TESTS=ON \
119+
-DENABLE_SYSTEM_OPENCL=ON \
120+
-DENABLE_SYSTEM_PROTOBUF=ON \
121+
-DENABLE_SYSTEM_PUGIXML=ON \
122+
-DENABLE_SYSTEM_SNAPPY=ON \
123+
-DENABLE_SYSTEM_TBB=ON \
124+
-DENABLE_SYSTEM_FLATBUFFERS=ON \
125+
-DANDROID_ABI=${{ env.ANDROID_ABI_CONFIG }} \
126+
-DANDROID_PLATFORM=${{ env.ANDROID_SDK_VERSION }} \
127+
-DVCPKG_TARGET_TRIPLET=arm64-android \
128+
-DVCPKG_HOST_TRIPLET=x64-linux-release \
129+
-DCMAKE_TOOLCHAIN_FILE=${VCPKG_ROOT}/scripts/buildsystems/vcpkg.cmake \
130+
-DVCPKG_CHAINLOAD_TOOLCHAIN_FILE=${ANDROID_NDK_HOME}/build/cmake/android.toolchain.cmake \
131+
-DCMAKE_COMPILE_WARNING_AS_ERROR=ON \
132+
-DCMAKE_CXX_COMPILER_LAUNCHER=${{ env.CMAKE_CXX_COMPILER_LAUNCHER }} \
133+
-DCMAKE_C_COMPILER_LAUNCHER=${{ env.CMAKE_C_COMPILER_LAUNCHER }} \
134+
-S ${OPENVINO_REPO} \
135+
-B ${BUILD_DIR}
136+
137+
- name: Clean ccache stats
138+
run: ccache --zero-stats --show-config
139+
140+
- name: Cmake - build
141+
run: cmake --build ${BUILD_DIR} --parallel
142+
143+
- name: Show ccache stats
144+
run: ccache --show-stats

.github/workflows/code_style.yml

+1-1
Original file line numberDiff line numberDiff line change
@@ -86,7 +86,7 @@ jobs:
8686
run: |
8787
sudo apt update
8888
sudo apt --assume-yes remove clang-7 clang-8 clang-9 clang-10 clang-11 clang-12 clang-13
89-
sudo apt --assume-yes install libclang-14-dev
89+
sudo apt --assume-yes install clang-14 libclang-14-dev
9090
9191
- name: Install Python-based dependencies
9292
run: python3 -m pip install -r cmake/developer_package/ncc_naming_style/requirements_dev.txt

.github/workflows/linux.yml

+2-2
Original file line numberDiff line numberDiff line change
@@ -81,10 +81,10 @@ jobs:
8181
- name: Install build dependencies
8282
run: |
8383
bash ${OPENVINO_REPO}/install_build_dependencies.sh
84-
# openjdk-11-jdk - Java API
84+
# default-jdk - Java API
8585
# libssl1.1 - 'python3 -m pip' in self-hosted runner
8686
# unzip - to download ninja
87-
apt install --assume-yes --no-install-recommends openjdk-11-jdk libssl1.1 unzip
87+
apt install --assume-yes --no-install-recommends default-jdk libssl1.1 unzip
8888
8989
wget https://github.com/ninja-build/ninja/releases/download/v1.11.1/ninja-linux.zip
9090
unzip ninja-linux.zip

.github/workflows/linux_android_arm64.yml

-173
This file was deleted.

vcpkg.json

+3-1
Original file line numberDiff line numberDiff line change
@@ -14,9 +14,11 @@
1414
"homepage": "https://github.com/openvinotoolkit/openvino",
1515
"documentation": "https://docs.openvino.ai/latest/index.html",
1616
"license": "Apache-2.0",
17-
"builtin-baseline": "962e5e39f8a25f42522f51fffc574e05a3efd26b",
17+
"builtin-baseline": "db0473513e5dc73ec6b6f431ff05d2f398eea042",
1818
"dependencies": [
1919
"ade",
20+
"gflags",
21+
"nlohmann-json",
2022
{
2123
"name": "pkgconf",
2224
"host": true

0 commit comments

Comments
 (0)