-
Notifications
You must be signed in to change notification settings - Fork 5
51 lines (43 loc) · 1.29 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
51
name: Build Abi for Android
on:
workflow_dispatch:
inputs:
target:
required: true
default: aarch64-linux-android
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
target: ${{ github.event.inputs.target }}
# 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
# Install Cargo target for Android
- name: Install cargo target for Android
run: |
cd ./rust
mkdir output
cargo ndk -o ./output -t ${{ github.event.inputs.target }} --manifest-path ./Cargo.toml build --release
ls ./output
tar -czvf ${{ github.event.inputs.target }}.tar.gz ./output
# Upload the built artifacts as an artifact
- name: Upload Artifacts
uses: actions/upload-artifact@v2
with:
name: android-release
path: rust/${{ github.event.inputs.target }}.tar.gz