-
Notifications
You must be signed in to change notification settings - Fork 0
51 lines (48 loc) · 1.48 KB
/
calc-android.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 and release calculator for Android
on:
workflow_dispatch:
jobs:
build:
name: Build APK
runs-on: ubuntu-latest
strategy:
matrix:
toolchain:
- stable
- beta
steps:
- run: rustup update ${{ matrix.toolchain }} && rustup default ${{ matrix.toolchain }}
- name: Install dependencies
- uses: nttld/setup-ndk@v1
name: Install NDK
id: setup-ndk
with:
ndk-version: "r26b"
add-to-path: true
- name: Install flutter
uses: subosito/flutter-action@v2
with:
channel: "stable"
flutter-version: 3.16.3
- name: setup rust ndk builds
run: |
cargo install cargo-ndk
rustup target add \
aarch64-linux-android \
armv7-linux-androideabi \
x86_64-linux-android \
i686-linux-android
- uses: actions/checkout@v4
- name: Build
env:
JAVA_HOME: /usr/lib/jvm/java-11-openjdk-amd64
ANDROID_NDK_HOME: ${{ steps.setup-ndk.outputs.ndk-path }}
ANDROID_NDK_ROOT: ${{ steps.setup-ndk.outputs.ndk-path }}
working-directory: ./apps/calculator
run: |
flutter pub get
flutter build apk --debug --split-per-abi
- uses: actions/upload-artifact@v4
with:
path: "apps/calculator/build/app/outputs/apk/debug/*.apk"
compression-level: 2