forked from althafvly/twoyi
-
Notifications
You must be signed in to change notification settings - Fork 3
76 lines (62 loc) · 1.81 KB
/
ci.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
69
70
71
72
73
74
75
76
name: CI
on:
workflow_dispatch:
pull_request:
paths-ignore:
- 'README.md'
push:
paths-ignore:
- 'README.md'
permissions:
contents: read
jobs:
debug-build:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
- name: Verify gradle wrapper
uses: gradle/wrapper-validation-action@v2
- name: Download ROM
run: |
mkdir ./app/src/main/assets
cd ./app/src/main/assets
curl -OL https://github.com/topminipie/twoyi/releases/download/0.5.4-rom/rootfs.7z
echo '6ddd7424eb897310ee5858f2e392750ec5ad1f5bbef1e30c7d3493142cbf4ff1 rootfs.7z' | sha256sum -c
- name: Install JDK 17
uses: actions/setup-java@v4
with:
java-version: 17
distribution: temurin
cache: gradle
- name: Install NDK
uses: nttld/setup-ndk@v1
with:
ndk-version: r26c
local-cache: true
- name: Install Rust
run: |
rustup update
rustup target add aarch64-linux-android
- name: Rust cache
uses: Swatinem/rust-cache@v2
with:
workspaces: 'app/rs'
- name: Install my fork cargo-ndk
run: |
cargo install --git https://github.com/topminipie/cargo-ndk.git
- name: Build libtwoyi.so
run: |
cd ./app/rs
cargo ndk -t arm64-v8a -o ../src/main/jniLibs build --release
- name: Check code formatting
continue-on-error: true
run: |
cd ./app/rs
cargo fmt --all -- --check
- name: Build app
run: ./gradlew assembleDebug --warning-mode all
- name: Upload Apk
uses: actions/upload-artifact@v4
with:
name: apk
path: app/build/outputs/apk/debug/app-debug.apk