Enabled Android arm64 GHA in precommit (#20094)
This commit is contained in:
144
.github/workflows/android_arm64.yml
vendored
Normal file
144
.github/workflows/android_arm64.yml
vendored
Normal file
@@ -0,0 +1,144 @@
|
||||
name: Android ARM64 with vcpkg
|
||||
on:
|
||||
workflow_dispatch:
|
||||
pull_request:
|
||||
paths-ignore:
|
||||
- '**/docs/**'
|
||||
- 'docs/**'
|
||||
- '**/**.md'
|
||||
- '**.md'
|
||||
- '**/layer_tests_summary/**'
|
||||
- '**/conformance/**'
|
||||
push:
|
||||
paths-ignore:
|
||||
- '**/docs/**'
|
||||
- 'docs/**'
|
||||
- '**/**.md'
|
||||
- '**.md'
|
||||
- '**/layer_tests_summary/**'
|
||||
- '**/conformance/**'
|
||||
branches:
|
||||
- master
|
||||
|
||||
concurrency:
|
||||
# github.ref is not unique in post-commit
|
||||
group: ${{ github.event_name == 'push' && github.run_id || github.ref }}-android-arm64-vcpkg
|
||||
cancel-in-progress: true
|
||||
|
||||
jobs:
|
||||
Build:
|
||||
defaults:
|
||||
run:
|
||||
shell: bash
|
||||
runs-on: aks-linux-16-cores
|
||||
container:
|
||||
image: openvinogithubactions.azurecr.io/dockerhub/ubuntu:20.04
|
||||
volumes:
|
||||
- /mount/caches:/mount/caches
|
||||
env:
|
||||
DEBIAN_FRONTEND: noninteractive # to prevent apt-get from waiting user input
|
||||
CMAKE_GENERATOR: 'Ninja'
|
||||
CMAKE_CXX_COMPILER_LAUNCHER: ccache
|
||||
CMAKE_C_COMPILER_LAUNCHER: ccache
|
||||
OPENVINO_REPO: '/__w/openvino/openvino/openvino'
|
||||
VCPKG_ROOT: '/__w/openvino/openvino/vcpkg'
|
||||
BUILD_DIR: '/__w/openvino/openvino/build'
|
||||
INSTALL_DIR: '/__w/openvino/openvino/install'
|
||||
ANDROID_TOOLS: '/__w/openvino/openvino/android_tools'
|
||||
ANDROID_NDK_HOME: '/__w/openvino/openvino/android_tools/ndk-bundle'
|
||||
ANDROID_SDK_VERSION: 29
|
||||
ANDROID_ABI_CONFIG: arm64-v8a
|
||||
CCACHE_DIR: '/mount/caches/ccache/android_arm64'
|
||||
CCACHE_TEMPDIR: '/__w/openvino/openvino/ccache_temp'
|
||||
CCACHE_MAXSIZE: 50G
|
||||
steps:
|
||||
- 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:
|
||||
path: 'openvino'
|
||||
|
||||
- name: Init submodules for non vcpkg dependencies
|
||||
run: |
|
||||
pushd ${OPENVINO_REPO}
|
||||
git submodule update --init -- ${OPENVINO_REPO}/src/plugins
|
||||
git submodule update --init -- ${OPENVINO_REPO}/thirdparty/gtest
|
||||
git submodule update --init -- ${OPENVINO_REPO}/thirdparty/gflags
|
||||
git submodule update --init -- ${OPENVINO_REPO}/thirdparty/open_model_zoo
|
||||
popd
|
||||
|
||||
- name: Clone vcpkg
|
||||
uses: actions/checkout@v4
|
||||
with:
|
||||
repository: 'microsoft/vcpkg'
|
||||
path: 'vcpkg'
|
||||
fetch-depth: '0'
|
||||
|
||||
#
|
||||
# Dependencies
|
||||
#
|
||||
|
||||
- name: Install dependencies
|
||||
run: |
|
||||
# generic dependencies
|
||||
apt --assume-yes install ccache scons ninja-build build-essential python3-pip
|
||||
|
||||
# vcpkg requires cmake 3.19 or later
|
||||
python3 -m pip install -U pip cmake
|
||||
# vcpkg's tool dependencies
|
||||
apt --assume-yes install curl zip unzip tar
|
||||
# vcpkg 'python3' port dependencies
|
||||
apt --assume-yes install autoconf libtool autoconf-archive
|
||||
# vcpkg tree of dependencies require extra packages
|
||||
apt --assume-yes install pkg-config linux-libc-dev
|
||||
|
||||
# Install Android SDK, NDK and Tools
|
||||
apt -y --no-install-recommends install unzip wget default-jdk
|
||||
wget https://dl.google.com/android/repository/commandlinetools-linux-7583922_latest.zip
|
||||
unzip commandlinetools-linux-7583922_latest.zip
|
||||
echo "yes" | ./cmdline-tools/bin/sdkmanager --sdk_root=${ANDROID_TOOLS} --install "ndk-bundle" "platform-tools" "platforms;android-${{ env.ANDROID_SDK_VERSION }}"
|
||||
|
||||
#
|
||||
# Build
|
||||
#
|
||||
|
||||
- name: Build vcpkg
|
||||
run: |
|
||||
${VCPKG_ROOT}/bootstrap-vcpkg.sh
|
||||
# patch vcpkg default toolchain to build only Release configuration
|
||||
echo "set(VCPKG_BUILD_TYPE release)" >> ${VCPKG_ROOT}/triplets/arm64-android.cmake
|
||||
|
||||
- name: CMake - configure
|
||||
run: |
|
||||
cmake \
|
||||
-G '${{ env.CMAKE_GENERATOR }}' \
|
||||
-DENABLE_INTEL_GPU=ON \
|
||||
-DENABLE_TESTS=ON \
|
||||
-DENABLE_SYSTEM_OPENCL=ON \
|
||||
-DENABLE_SYSTEM_PROTOBUF=ON \
|
||||
-DENABLE_SYSTEM_PUGIXML=ON \
|
||||
-DENABLE_SYSTEM_SNAPPY=ON \
|
||||
-DENABLE_SYSTEM_TBB=ON \
|
||||
-DENABLE_SYSTEM_FLATBUFFERS=ON \
|
||||
-DANDROID_ABI=${{ env.ANDROID_ABI_CONFIG }} \
|
||||
-DANDROID_PLATFORM=${{ env.ANDROID_SDK_VERSION }} \
|
||||
-DVCPKG_TARGET_TRIPLET=arm64-android \
|
||||
-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 \
|
||||
-DCMAKE_COMPILE_WARNING_AS_ERROR=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 ccache stats
|
||||
run: ccache --zero-stats --show-config
|
||||
|
||||
- name: Cmake - build
|
||||
run: cmake --build ${BUILD_DIR} --parallel
|
||||
|
||||
- name: Show ccache stats
|
||||
run: ccache --show-stats
|
||||
2
.github/workflows/code_style.yml
vendored
2
.github/workflows/code_style.yml
vendored
@@ -86,7 +86,7 @@ jobs:
|
||||
run: |
|
||||
sudo apt update
|
||||
sudo apt --assume-yes remove clang-7 clang-8 clang-9 clang-10 clang-11 clang-12 clang-13
|
||||
sudo apt --assume-yes install libclang-14-dev
|
||||
sudo apt --assume-yes install clang-14 libclang-14-dev
|
||||
|
||||
- name: Install Python-based dependencies
|
||||
run: python3 -m pip install -r cmake/developer_package/ncc_naming_style/requirements_dev.txt
|
||||
|
||||
4
.github/workflows/linux.yml
vendored
4
.github/workflows/linux.yml
vendored
@@ -81,10 +81,10 @@ jobs:
|
||||
- name: Install build dependencies
|
||||
run: |
|
||||
bash ${OPENVINO_REPO}/install_build_dependencies.sh
|
||||
# openjdk-11-jdk - Java API
|
||||
# default-jdk - Java API
|
||||
# libssl1.1 - 'python3 -m pip' in self-hosted runner
|
||||
# unzip - to download ninja
|
||||
apt install --assume-yes --no-install-recommends openjdk-11-jdk libssl1.1 unzip
|
||||
apt install --assume-yes --no-install-recommends default-jdk libssl1.1 unzip
|
||||
|
||||
wget https://github.com/ninja-build/ninja/releases/download/v1.11.1/ninja-linux.zip
|
||||
unzip ninja-linux.zip
|
||||
|
||||
173
.github/workflows/linux_android_arm64.yml
vendored
173
.github/workflows/linux_android_arm64.yml
vendored
@@ -1,173 +0,0 @@
|
||||
name: Linux Android ARM64 (Ubuntu 20.04, Python 3.11)
|
||||
on:
|
||||
schedule:
|
||||
# run daily at 00:00
|
||||
- cron: '0 0 * * *'
|
||||
workflow_dispatch:
|
||||
# pull_request:
|
||||
# paths-ignore:
|
||||
# - '**/docs/**'
|
||||
# - 'docs/**'
|
||||
# - '**/**.md'
|
||||
# - '**.md'
|
||||
# - '**/layer_tests_summary/**'
|
||||
# - '**/conformance/**'
|
||||
# push:
|
||||
# paths-ignore:
|
||||
# - '**/docs/**'
|
||||
# - 'docs/**'
|
||||
# - '**/**.md'
|
||||
# - '**.md'
|
||||
# - '**/layer_tests_summary/**'
|
||||
# - '**/conformance/**'
|
||||
# branches:
|
||||
# - master
|
||||
|
||||
concurrency:
|
||||
group: ${{ github.head_ref || github.run_id }}-linux-android-arm64
|
||||
cancel-in-progress: true
|
||||
|
||||
jobs:
|
||||
Build:
|
||||
# TODO: remove. Temporary measure to prevent the workflow from scheduling on forks.
|
||||
if: ${{ github.repository_owner == 'openvinotoolkit' }}
|
||||
defaults:
|
||||
run:
|
||||
shell: bash
|
||||
runs-on: ubuntu-20.04-8-cores
|
||||
env:
|
||||
CMAKE_BUILD_TYPE: 'Release'
|
||||
CMAKE_GENERATOR: 'Ninja'
|
||||
CMAKE_CXX_COMPILER_LAUNCHER: ccache
|
||||
CMAKE_C_COMPILER_LAUNCHER: ccache
|
||||
BUILD_TYPE: Debug
|
||||
OPENVINO_REPO: ${{ github.workspace }}/openvino
|
||||
VCPKG_ROOT: ${{ github.workspace }}/vcpkg
|
||||
BUILD_DIR: ${{ github.workspace }}/build
|
||||
INSTALL_DIR: ${{ github.workspace }}/install
|
||||
OV_TEMP: ${{ github.workspace }}/openvino_temp
|
||||
ANDROID_TOOLS: ${{ github.workspace }}/android_tools
|
||||
ANDROID_NDK_HOME: ${{ github.workspace }}/android_tools/ndk-bundle
|
||||
ANDROID_SDK_VERSION: 29
|
||||
ANDROID_ABI_CONFIG: arm64-v8a
|
||||
steps:
|
||||
- name: Clone OpenVINO
|
||||
uses: actions/checkout@v4
|
||||
with:
|
||||
path: 'openvino'
|
||||
|
||||
- name: Init submodules for non vcpkg dependencies
|
||||
run: |
|
||||
pushd ${{ env.OPENVINO_REPO }}
|
||||
git submodule update --init -- ${{ env.OPENVINO_REPO }}/src/plugins
|
||||
git submodule update --init -- ${{ env.OPENVINO_REPO }}/thirdparty/gtest
|
||||
git submodule update --init -- ${{ env.OPENVINO_REPO }}/thirdparty/open_model_zoo
|
||||
popd
|
||||
|
||||
- name: Clone VCPKG
|
||||
uses: actions/checkout@v4
|
||||
with:
|
||||
repository: 'microsoft/vcpkg'
|
||||
path: 'vcpkg'
|
||||
fetch-depth: '0'
|
||||
|
||||
- name: Setup Python 3.11
|
||||
uses: actions/setup-python@v4
|
||||
with:
|
||||
python-version: '3.11'
|
||||
|
||||
#
|
||||
# Dependencies
|
||||
#
|
||||
|
||||
- name: Install dependencies
|
||||
run: |
|
||||
# generic dependencies
|
||||
sudo -E apt update
|
||||
sudo -E apt --assume-yes install ccache scons default-jdk python3-pip ninja-build build-essential
|
||||
|
||||
wget https://github.com/ninja-build/ninja/releases/download/v1.10.2/ninja-linux.zip
|
||||
unzip ninja-linux.zip
|
||||
sudo cp -v ninja /usr/local/bin/
|
||||
|
||||
ln -s /usr/local/bin/ninja /usr/local/bin/ninja-build
|
||||
|
||||
# vcpkg's tool dependencies
|
||||
sudo -E apt --assume-yes install curl zip unzip tar
|
||||
|
||||
# vcpkg 'python3' port dependencies
|
||||
sudo -E apt --assume-yes install autoconf libtool autoconf-archive
|
||||
|
||||
# vcpkg tree of dependencies require extra packages
|
||||
sudo -E apt --assume-yes install pkg-config linux-libc-dev
|
||||
|
||||
# Install Android SDK, NDK and Tools
|
||||
sudo apt -y --no-install-recommends install unzip
|
||||
wget https://dl.google.com/android/repository/commandlinetools-linux-7583922_latest.zip
|
||||
unzip commandlinetools-linux-7583922_latest.zip
|
||||
echo "yes" | ./cmdline-tools/bin/sdkmanager --sdk_root=${{ env.ANDROID_TOOLS }} --install "ndk-bundle" "platform-tools" "platforms;android-${{ env.ANDROID_SDK_VERSION }}"
|
||||
|
||||
- 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: ${{ github.job }}-linux-android-arm64
|
||||
restore-keys: |
|
||||
${{ github.job }}-linux-android-arm64
|
||||
|
||||
#
|
||||
# Build
|
||||
#
|
||||
|
||||
- name: Build vcpkg
|
||||
run: |
|
||||
${{ env.VCPKG_ROOT }}/bootstrap-vcpkg.sh --disableMetrics
|
||||
# patch vcpkg default (community) toolchain to build only Release configuration
|
||||
echo "set(VCPKG_BUILD_TYPE release)" >> ${{ env.VCPKG_ROOT }}/triplets/community/arm64-android.cmake
|
||||
|
||||
- name: Get number of CPU cores
|
||||
uses: SimenB/github-actions-cpu-cores@v2
|
||||
id: cpu-cores
|
||||
|
||||
- name: CMake configure
|
||||
run: |
|
||||
cmake \
|
||||
-G Ninja \
|
||||
-DCMAKE_VERBOSE_MAKEFILE=ON \
|
||||
-DCMAKE_BUILD_TYPE=${{ env.BUILD_TYPE }} \
|
||||
-DVCPKG_TARGET_TRIPLET=arm64-android \
|
||||
-DVCPKG_HOST_TRIPLET=x64-linux-release \
|
||||
-DCMAKE_TOOLCHAIN_FILE=${{ env.VCPKG_ROOT }}/scripts/buildsystems/vcpkg.cmake \
|
||||
-DVCPKG_CHAINLOAD_TOOLCHAIN_FILE=${{ env.ANDROID_NDK_HOME }}/build/cmake/android.toolchain.cmake \
|
||||
-DCMAKE_COMPILE_WARNING_AS_ERROR=ON \
|
||||
-DANDROID_ABI=${{ env.ANDROID_ABI_CONFIG }} \
|
||||
-DANDROID_PLATFORM=${{ env.ANDROID_SDK_VERSION }} \
|
||||
-DENABLE_PYTHON=OFF \
|
||||
-DENABLE_SYSTEM_OPENCL=ON \
|
||||
-DENABLE_SYSTEM_PROTOBUF=ON \
|
||||
-DENABLE_SYSTEM_PUGIXML=ON \
|
||||
-DENABLE_SYSTEM_SNAPPY=ON \
|
||||
-DENABLE_SYSTEM_TBB=ON \
|
||||
-DENABLE_SYSTEM_FLATBUFFERS=ON \
|
||||
-DENABLE_INTEL_GPU=ON \
|
||||
-DENABLE_TESTS=ON \
|
||||
-DCMAKE_CXX_COMPILER_LAUNCHER=ccache \
|
||||
-DCMAKE_C_COMPILER_LAUNCHER=ccache \
|
||||
-S ${{ env.OPENVINO_REPO }} \
|
||||
-B ${{ env.BUILD_DIR }}
|
||||
|
||||
- name: Clean ccache stats
|
||||
run: ccache --zero-stats --show-config
|
||||
|
||||
- name: Build Android ARM64
|
||||
run: cmake --build ${{ env.BUILD_DIR }} --parallel ${{ steps.cpu-cores.outputs.count }} --config ${{ env.BUILD_TYPE }}
|
||||
|
||||
- name: Show ccache stats
|
||||
run: ccache --show-stats
|
||||
|
||||
- name: List binary files
|
||||
run: ls -alR ${{ env.OPENVINO_REPO }}/bin/
|
||||
@@ -14,9 +14,11 @@
|
||||
"homepage": "https://github.com/openvinotoolkit/openvino",
|
||||
"documentation": "https://docs.openvino.ai/latest/index.html",
|
||||
"license": "Apache-2.0",
|
||||
"builtin-baseline": "962e5e39f8a25f42522f51fffc574e05a3efd26b",
|
||||
"builtin-baseline": "db0473513e5dc73ec6b6f431ff05d2f398eea042",
|
||||
"dependencies": [
|
||||
"ade",
|
||||
"gflags",
|
||||
"nlohmann-json",
|
||||
{
|
||||
"name": "pkgconf",
|
||||
"host": true
|
||||
|
||||
Reference in New Issue
Block a user