Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add Android to the CI build matrix #2165

Open
wants to merge 1 commit into
base: main
Choose a base branch
from

Conversation

ahesham-arm
Copy link
Contributor

Support building for Android on Arm and AArch64 platforms.

Modify the build matrix to add to new variations. Both variants download, extract and setup the Android Native Development Kit (NDK) on a Linux runner. Each variant specifies a android_arch_abi, which is passed to CMake during configuration as its CMAKE_ANDROID_ARCH_ABI option.

The CMake toolchain file provided by the NDK is used when building for Android. The NDK version used is r27c, which is the latest Long-Term Support (LTS) version. ANDROID_PLATFORM is intentionally not set, so the NDK can default to the minimum supported version, which is 21. The compiler (Clang) version used by this NDK is 18.0.3.

The NDK ships with its own sysroot, which has the Linux kernel headers of version 6.8.0, or LINUX_VERSION_CODE 395264.

CMake
https://cmake.org/cmake/help/latest/manual/cmake-toolchains.7.html#id23 https://cmake.org/cmake/help/latest/variable/CMAKE_ANDROID_ARCH_ABI.html

NDK
https://developer.android.com/ndk/downloads

Support building for Android on Arm and AArch64 platforms.

Modify the build matrix to add to new variations. Both variants
download, extract and setup the Android Native Development Kit (NDK)
on a Linux runner. Each variant specifies a `android_arch_abi`, which
is passed to CMake during configuration as its
`CMAKE_ANDROID_ARCH_ABI` option.

The CMake toolchain file provided by the NDK is used when building for
Android. The NDK version used is r27c, which is the latest Long-Term
Support (LTS) version. `ANDROID_PLATFORM` is intentionally not set, so
the NDK can default to the minimum supported version, which is 21. The
compiler (Clang) version used by this NDK is 18.0.3.

The NDK ships with its own sysroot, which has the Linux kernel headers
of version 6.8.0, or `LINUX_VERSION_CODE 395264`.

CMake
https://cmake.org/cmake/help/latest/manual/cmake-toolchains.7.html#id23
https://cmake.org/cmake/help/latest/variable/CMAKE_ANDROID_ARCH_ABI.html

NDK
https://developer.android.com/ndk/downloads
Copy link
Contributor

@kpet kpet left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM, thanks! We should start looking into migrating more of what presubmit.sh does into the workflow itself but the value we get out of Android builds IMO justifies merging this as is.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants