Skip to content

Commit

Permalink
Android support (#242)
Browse files Browse the repository at this point in the history
Motivation:

It would be useful to be able to support this codec on android. 

Modification:

- Add build config for android.
- Add workflow to build on android

Result:

Be able to build for android as well.

Co-authored-by: Norman Maurer <norman_maurer@apple.com>
  • Loading branch information
JBou and normanmaurer authored Jul 6, 2021
1 parent f52654c commit 7f1759f
Show file tree
Hide file tree
Showing 6 changed files with 886 additions and 479 deletions.
49 changes: 49 additions & 0 deletions .github/workflows/ci-build.yml
Original file line number Diff line number Diff line change
Expand Up @@ -152,3 +152,52 @@ jobs:
with:
name: build-windows-target
path: "**/target/"

build-android:
runs-on: ubuntu-latest
name: android
env:
SDK_VER: "platforms;android-21"
NDK_VER: "ndk;21.4.7075529"
steps:
- uses: actions/checkout@v2

- name: Setup ninja-build
run: sudo apt-get install ninja-build

- name: Setup go
uses: actions/setup-go@v2

- name: Install cargo-ndk
uses: actions-rs/install@v0.1
with:
crate: cargo-ndk

- name: Install Rust toolchain for Android architectures
run: rustup target add aarch64-linux-android armv7-linux-androideabi i686-linux-android x86_64-linux-android

- name: Set up JDK 1.8
uses: actions/setup-java@v1
with:
java-version: 1.8

- name: Setup Android SDK
uses: android-actions/setup-android@v2

- name: Install Android SDK platforms
run: sdkmanager "${{ env.SDK_VER }}"

- name: Install Android NDK
run: sdkmanager "${{ env.NDK_VER }}"

- name: Setup environment
run: export ANDROID_NDK_HOME=${{ steps.setup-ndk.outputs.ndk-path }}

- name: Build project
run: ./mvnw -B -ntp --file pom.xml clean package -Dandroid

- uses: actions/upload-artifact@v2
if: ${{ failure() }}
with:
name: target
path: "**/target/"
Loading

0 comments on commit 7f1759f

Please sign in to comment.