Add Android to the CI build matrix #2165
Open
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
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 itsCMAKE_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