Skip to content

Android cpu-features and add Android CI - #29

Merged
Coralesoft merged 2 commits into
mainfrom
fix/issue-27-android-cmake-cpufeatures
May 14, 2026
Merged

Android cpu-features and add Android CI#29
Coralesoft merged 2 commits into
mainfrom
fix/issue-27-android-cmake-cpufeatures

Conversation

@Coralesoft

@Coralesoft Coralesoft commented May 14, 2026

Copy link
Copy Markdown
Collaborator

Summary

Closes the remaining work from #27. PR #28 fixed the BLAKE3 armv7 NEON issue, this one covers the follow-up CMake and CI work.

  • Stages Android NDK cpu-features for CMake builds by adding the NDK cpufeatures directory and cpu-features.c when ANDROID is set.

  • Adds build-only Android CI jobs for arm64-v8a and armeabi-v7a. No emulator step; this is just to catch Android build-path regressions.

Verification

Host build passes cleanly.

Android cross-compile is covered by the new CI jobs.

Refs: #27

src/core/cpu.cpp includes "cpu-features.h" on Android, but the NDK keeps the header and cpu-features.c under sources/android/cpufeatures/, outside the sysroot. CMake builds fail unless that directory is staged explicitly.

Port the CMake-side staging used by cryptopp-cmake: add the NDK cpufeatures directory to the include path and append cpu-features.c to cryptopp_SOURCES when ANDROID is set. Warn if the expected files are not present.

Refs: #27
ubuntu-24.04 runners currently expose the Android NDK via $ANDROID_NDK_LATEST_HOME. Add two CI jobs that cross-compile the cryptopp library for arm64-v8a and armeabi-v7a using the NDK toolchain.

These jobs are build-only, with no emulator step. That is enough to catch regressions in the Android NEON path and in CMake Android cpu-features staging.

Add corresponding presets to CMakePresets.json. CRYPTOPP_BUILD_TESTING is OFF because the cross-compiled cryptest binary cannot run on the runner.

Refs: #27
@Coralesoft
Coralesoft force-pushed the fix/issue-27-android-cmake-cpufeatures branch from bab42fb to 5f55a14 Compare May 14, 2026 23:06
@Coralesoft
Coralesoft merged commit f62620a into main May 14, 2026
41 checks passed
@Coralesoft
Coralesoft deleted the fix/issue-27-android-cmake-cpufeatures branch May 14, 2026 23:29
@Coralesoft Coralesoft mentioned this pull request May 17, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants