Skip to content

Build Abi for Android #9

Build Abi for Android

Build Abi for Android #9

Workflow file for this run

name: Build Abi for Android
on:
workflow_dispatch:
jobs:
build:
runs-on: ubuntu-latest
defaults:
run:
working-directory: ./rust
steps:
- name: Checkout code
uses: actions/checkout@v2
# Set up Android NDK and Cargo toolchain for cross-compiling to Android
- name: Set up environment
uses: actions-rs/toolchain@v1
with:
toolchain: stable
# Download Android NDK for cross-compiling
- name: Download Android NDK
uses: nttld/[email protected]
with:
# Exact version to use
ndk-version: r26d
local-cache: true
- name: Setup cargo ndk
run: |
cargo install cargo-ndk
rustup target add aarch64-linux-android armv7-linux-androideabi
rustup target list
# Install Cargo target for Android
- name: Build
run: |
mkdir output
cargo ndk -o ./output -t arm64-v8a -t armeabi-v7a --manifest-path ./Cargo.toml build --release
ls ./output
# Upload the built artifacts as an artifact
- name: Upload Artifacts
uses: actions/upload-artifact@v2
with:
name: android-abi-arm
path: rust/output