forked from MeloNX/MeloNX
Add beta android build workflow
This commit is contained in:
parent
0f1b737b07
commit
c2deb9f3c9
73
.github/workflows/build-android.yml
vendored
Normal file
73
.github/workflows/build-android.yml
vendored
Normal file
@ -0,0 +1,73 @@
|
|||||||
|
name: Build MeloNX Android APK
|
||||||
|
|
||||||
|
on:
|
||||||
|
workflow_dispatch:
|
||||||
|
|
||||||
|
jobs:
|
||||||
|
build:
|
||||||
|
name: Build APK
|
||||||
|
runs-on: ubuntu-latest
|
||||||
|
|
||||||
|
steps:
|
||||||
|
- name: Checkout Repository
|
||||||
|
uses: actions/checkout@v4
|
||||||
|
with:
|
||||||
|
submodules: recursive
|
||||||
|
|
||||||
|
- name: Set Up JDK
|
||||||
|
uses: actions/setup-java@v3
|
||||||
|
with:
|
||||||
|
distribution: 'temurin'
|
||||||
|
java-version: '17'
|
||||||
|
|
||||||
|
- name: Setup Android SDK Tools
|
||||||
|
uses: android-actions/setup-android@v3.2.2
|
||||||
|
|
||||||
|
- name: Install Ninja and CMake
|
||||||
|
run: |
|
||||||
|
sudo apt-get update
|
||||||
|
sudo apt-get install -y ninja-build cmake
|
||||||
|
|
||||||
|
- name: Cache Gradle dependencies
|
||||||
|
uses: actions/cache@v4
|
||||||
|
with:
|
||||||
|
path: ~/.gradle/caches
|
||||||
|
key: gradle-${{ runner.os }}-${{ hashFiles('**/*.gradle*', '**/gradle-wrapper.properties') }}
|
||||||
|
restore-keys: gradle-${{ runner.os }}-
|
||||||
|
|
||||||
|
- name: Cache CMake build
|
||||||
|
uses: actions/cache@v4
|
||||||
|
with:
|
||||||
|
path: src/RyujinxAndroid/app/.cxx
|
||||||
|
key: cmake-${{ runner.os }}-${{ hashFiles('src/RyujinxAndroid/CMakeLists.txt', 'src/RyujinxAndroid/**/*.cpp', 'src/RyujinxAndroid/**/*.h') }}
|
||||||
|
restore-keys: cmake-${{ runner.os }}-
|
||||||
|
|
||||||
|
- name: Grant Execute Permission for Gradlew
|
||||||
|
run: chmod +x src/RyujinxAndroid/gradlew
|
||||||
|
|
||||||
|
- name: Build with Gradle
|
||||||
|
run: src/RyujinxAndroid/gradlew assembleDebug
|
||||||
|
working-directory: src/RyujinxAndroid
|
||||||
|
|
||||||
|
- name: Generate Debug Keystore
|
||||||
|
run: |
|
||||||
|
keytool -genkeypair -v -keystore debug.keystore -alias androiddebugkey \
|
||||||
|
-keyalg RSA -keysize 2048 -validity 10000 \
|
||||||
|
-storepass android -keypass android \
|
||||||
|
-dname "CN=Android Debug,O=Android,C=US"
|
||||||
|
|
||||||
|
- name: Sign APK
|
||||||
|
run: |
|
||||||
|
jarsigner -verbose -sigalg SHA256withRSA -digestalg SHA-256 \
|
||||||
|
-keystore debug.keystore -storepass android \
|
||||||
|
src/RyujinxAndroid/app/build/outputs/apk/debug/app-debug.apk androiddebugkey
|
||||||
|
|
||||||
|
- name: Verify APK Signature
|
||||||
|
run: |
|
||||||
|
apksigner verify --verbose src/RyujinxAndroid/app/build/outputs/apk/debug/app-debug.apk
|
||||||
|
|
||||||
|
- name: Upload Signed APK
|
||||||
|
uses: actions/upload-artifact@v4
|
||||||
|
with:
|
||||||
|
name: RyujinxAndroid-APK
|
||||||
|
path: src/RyujinxAndroid/app/build/outputs/apk/debug/app-debug.apk
|
Loading…
x
Reference in New Issue
Block a user