-
Notifications
You must be signed in to change notification settings - Fork 0
68 lines (65 loc) · 1.9 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
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
name: Build and release calculator for Android
on:
workflow_dispatch:
jobs:
build:
name: Build APK
runs-on: ubuntu-latest
steps:
- name: Install dependencies
run: |
sudo apt-get update
sudo apt-get install -y \
clang \
cmake \
curl \
gcc-multilib \
git \
g++ \
g++-multilib \
libappindicator3-dev \
libasound2-dev \
libc6-dev \
libclang-dev \
libgtk-3-dev \
llvm-dev \
nasm \
ninja-build \
openjdk-11-jdk-headless \
pkg-config \
tree \
wget
- uses: nttld/setup-ndk@v1
name: Install NDK
id: setup-ndk
with:
ndk-version: "r26b"
add-to-path: true
- name: Install Rust toolchain
uses: dtolnay/rust-toolchain@v1
with:
toolchain: 1.75
components: "rustfmt"
- uses: Swatinem/rust-cache@v2
with:
key: aarch64-linux-android
- name: Install flutter
uses: subosito/flutter-action@v2
with:
channel: "stable"
flutter-version: 3.16.3
- 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: |
rustup target add aarch64-linux-android
flutter pub get
flutter build apk --debug --target-platform android-arm64 --split-per-abi
- uses: actions/upload-artifact@v4
with:
path: "apps/calculator/build/app/outputs/apk/debug/*.apk"
compression-level: 2