-
Notifications
You must be signed in to change notification settings - Fork 25
42 lines (34 loc) · 1.11 KB
/
build.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
name: Build for Android
on:
push:
branches:
- test
pull_request:
branches:
- test
jobs:
build:
runs-on: ubuntu-latest
env:
ANDROID_NDK_VERSION: "25" # 指定 Android NDK 版本
ANDROID_NDK_HOME: ${{ runner.temp }}/android-ndk
steps:
- name: Checkout repository
uses: actions/checkout@v2
- name: Set up JDK
uses: actions/setup-java@v1
with:
java-version: 8
- name: Download and set up Android NDK
run: |
wget https://dl.google.com/android/repository/android-ndk-${{ env.ANDROID_NDK_VERSION }}-linux-x86_64.zip -O android-ndk.zip
mkdir -p $ANDROID_NDK_HOME
unzip android-ndk.zip -d $ANDROID_NDK_HOME
env:
ANDROID_NDK_HOME: ${{ runner.temp }}/android-ndk
- name: Install Rust toolchain for aarch64-linux-android
run: rustup target add aarch64-linux-android
- name: Build with Cargo
run: |
export NDK_HOME=${{ ANDROID_NDK_HOME }}/android-ndk-${{ env.ANDROID_NDK_VERSION }}
cargo build --target aarch64-linux-android --release