2020-05-24 12:57:05 +02:00
|
|
|
name: android
|
|
|
|
|
|
|
|
# build on c/cpp changes or workflow changes
|
|
|
|
on:
|
|
|
|
push:
|
|
|
|
paths:
|
|
|
|
- 'lib/**.[ch]'
|
|
|
|
- 'lib/**.cpp'
|
|
|
|
- 'src/**.[ch]'
|
|
|
|
- 'src/**.cpp'
|
2024-03-21 23:54:28 +01:00
|
|
|
- 'irr/**.[ch]'
|
|
|
|
- 'irr/**.cpp'
|
2023-12-20 21:35:19 +01:00
|
|
|
- '**/CMakeLists.txt'
|
|
|
|
- 'cmake/Modules/**'
|
2024-11-10 18:31:38 +01:00
|
|
|
- 'po/**.po'
|
2021-06-21 21:51:42 +02:00
|
|
|
- 'android/**'
|
2020-05-24 12:57:05 +02:00
|
|
|
- '.github/workflows/android.yml'
|
|
|
|
pull_request:
|
|
|
|
paths:
|
|
|
|
- 'lib/**.[ch]'
|
|
|
|
- 'lib/**.cpp'
|
|
|
|
- 'src/**.[ch]'
|
|
|
|
- 'src/**.cpp'
|
2024-06-03 01:14:15 +02:00
|
|
|
- 'irr/**.[ch]'
|
|
|
|
- 'irr/**.cpp'
|
2023-12-20 21:35:19 +01:00
|
|
|
- '**/CMakeLists.txt'
|
|
|
|
- 'cmake/Modules/**'
|
2024-11-10 18:31:38 +01:00
|
|
|
- 'po/**.po'
|
2021-06-21 21:51:42 +02:00
|
|
|
- 'android/**'
|
2020-05-24 12:57:05 +02:00
|
|
|
- '.github/workflows/android.yml'
|
|
|
|
|
|
|
|
jobs:
|
|
|
|
build:
|
2024-06-03 20:39:02 +02:00
|
|
|
runs-on: ubuntu-22.04
|
2020-05-24 12:57:05 +02:00
|
|
|
steps:
|
2024-02-17 15:34:40 +01:00
|
|
|
- uses: actions/checkout@v4
|
2021-08-08 18:59:07 +02:00
|
|
|
- name: Install deps
|
2021-10-31 23:32:25 +01:00
|
|
|
run: |
|
|
|
|
sudo apt-get update
|
2024-08-02 00:13:13 +02:00
|
|
|
sudo apt-get install -y --no-install-recommends gettext
|
|
|
|
- name: Set up JDK 17
|
|
|
|
uses: actions/setup-java@v4
|
|
|
|
with:
|
|
|
|
distribution: 'temurin'
|
|
|
|
java-version: '17'
|
2024-05-09 19:15:50 +02:00
|
|
|
- name: Build AAB with Gradle
|
|
|
|
# We build an AAB as well for uploading to the the Play Store.
|
|
|
|
run: cd android; ./gradlew bundlerelease
|
|
|
|
- name: Build APKs with Gradle
|
|
|
|
# "assemblerelease" is very fast after "bundlerelease".
|
2021-06-21 21:51:42 +02:00
|
|
|
run: cd android; ./gradlew assemblerelease
|
2024-05-09 19:15:50 +02:00
|
|
|
- name: Save AAB artifact
|
|
|
|
uses: actions/upload-artifact@v4
|
|
|
|
with:
|
2024-10-27 14:04:51 +01:00
|
|
|
name: Luanti-release.aab
|
2024-05-09 19:15:50 +02:00
|
|
|
path: android/app/build/outputs/bundle/release/app-release.aab
|
2020-05-24 12:57:05 +02:00
|
|
|
- name: Save armeabi artifact
|
2024-02-17 15:34:40 +01:00
|
|
|
uses: actions/upload-artifact@v4
|
2020-05-24 12:57:05 +02:00
|
|
|
with:
|
2024-10-27 14:04:51 +01:00
|
|
|
name: Luanti-armeabi-v7a.apk
|
2021-06-21 21:51:42 +02:00
|
|
|
path: android/app/build/outputs/apk/release/app-armeabi-v7a-release-unsigned.apk
|
2020-05-24 12:57:05 +02:00
|
|
|
- name: Save arm64 artifact
|
2024-02-17 15:34:40 +01:00
|
|
|
uses: actions/upload-artifact@v4
|
2020-05-24 12:57:05 +02:00
|
|
|
with:
|
2024-10-27 14:04:51 +01:00
|
|
|
name: Luanti-arm64-v8a.apk
|
2021-06-21 21:51:42 +02:00
|
|
|
path: android/app/build/outputs/apk/release/app-arm64-v8a-release-unsigned.apk
|
2022-08-25 23:48:49 +02:00
|
|
|
- name: Save x86 artifact
|
2024-02-17 15:34:40 +01:00
|
|
|
uses: actions/upload-artifact@v4
|
2022-08-25 23:48:49 +02:00
|
|
|
with:
|
2024-10-27 14:04:51 +01:00
|
|
|
name: Luanti-x86.apk
|
2022-08-25 23:48:49 +02:00
|
|
|
path: android/app/build/outputs/apk/release/app-x86-release-unsigned.apk
|
|
|
|
- name: Save x86_64 artifact
|
2024-02-17 15:34:40 +01:00
|
|
|
uses: actions/upload-artifact@v4
|
2022-08-25 23:48:49 +02:00
|
|
|
with:
|
2024-10-27 14:04:51 +01:00
|
|
|
name: Luanti-x86_64.apk
|
2022-08-25 23:48:49 +02:00
|
|
|
path: android/app/build/outputs/apk/release/app-x86_64-release-unsigned.apk
|