Skip to content

Add Android cross-compilation to CI and publish .so artifacts #77

@nbassler

Description

@nbassler

Add Android cross-compilation to CI and publish .so artifacts

Currently the dEdx Android app vendors a copy of the
libdedx C source directly in the repository and compiles it as part of the Android NDK build.
This is fragile: the vendored copy drifts out of sync, and any changes to libdedx require a
manual sync.

The clean solution is to have libdedx publish pre-built .so files for Android ABIs as GitHub
release artifacts, so the app can download and embed them directly without building from source.

What is needed

Add a GitHub Actions workflow to libdedx that cross-compiles for the following Android ABIs
using the Android NDK:

  • arm64-v8a (primary target, modern devices)
  • armeabi-v7a (32-bit ARM, older devices)
  • x86_64 (emulator)

And publishes the resulting libdedx.so files as artifacts on each release.

Expected outcome

The dEdx Android app build can then:

  1. Download the pre-built .so files for each ABI
  2. Place them in app/src/main/jniLibs/<abi>/libdedx.so
  3. Remove the vendored libdedx/ source tree entirely
  4. Reduce CMakeLists.txt to just compiling the thin JNI wrapper dEdx.c against the
    pre-built library

This gives a clean separation between libdedx development and app development, and ensures
the app always uses an officially built and tested version of the library.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type
    No fields configured for issues without a type.

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions