-
Notifications
You must be signed in to change notification settings - Fork 2
81 lines (70 loc) · 2.28 KB
/
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
69
70
71
72
73
74
75
76
77
78
79
80
81
name: Android CI
on:
release:
types: [published]
push:
branches: ['main']
pull_request:
workflow_dispatch:
jobs:
android-build:
name: Build android apk for - ${{ matrix.config.arch }}
runs-on: ubuntu-24.04
strategy:
fail-fast: false
matrix:
config:
- arch: armeabi-v7a
- arch: arm64-v8a
- arch: x86
- arch: x86_64
steps:
- uses: actions/checkout@v4
with:
fetch-depth: '0'
# NOTE: meson has no dependencies, so --break-system-packages doesn't really break anything!
- name: Setup Meson
run: |
pip install meson --break-system-packages
- name: Setup ninja
run: |
sudo apt-get update
sudo apt-get install ninja-build jq -y --no-install-recommends
- name: Setup JDK
uses: actions/setup-java@v4
with:
distribution: 'temurin'
java-version: '21'
- name: Setup Android SDK
uses: android-actions/setup-android@v3
- name: Setup NDK
run: |
sdkmanager --install "ndk;28.0.12674087"
- name: Build native libraries
run: |
export ANDROID_SDK_HOME="$HOME/.android/sdk"
bash ./platforms/build-android.sh ${{ matrix.config.arch }} complete_rebuild release
cp -r ./assets/ platforms/android/app/src/main
- name: Build APK
run: |
cd platforms/android/
./gradlew assembleDebug --no-daemon -PANDROID_ABI=${{ matrix.config.arch }}
- name: Upload artifacts
uses: actions/upload-artifact@v4
with:
name: oopetris.${{ matrix.config.arch }}.apk
path: platforms/android/app/build/outputs/apk/debug/app-*-debug.apk
- uses: wangyucode/[email protected]
name: Deploy
if: github.event_name != 'pull_request'
with:
host: fdroid.oopetris.totto.lt
port: ${{ vars.FDROID_FTP_PORT }}
username: ${{ vars.FDROID_FTP_USER }}
password: ${{ secrets.FDROID_FTP_PASSWORD }}
compress: true
localDir: platforms/android/app/build/outputs/apk/debug/
remoteDir: /repo
exclude: '/output-metadata.json'
forceUpload: true
removeExtraFilesOnServer: false