-
Notifications
You must be signed in to change notification settings - Fork 6
50 lines (41 loc) · 1.17 KB
/
abi.yml
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
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