2022-03-20 03:37:48 +00:00
|
|
|
name: Manual Generate APK
|
|
|
|
on:
|
|
|
|
workflow_dispatch:
|
|
|
|
inputs:
|
|
|
|
|
|
|
|
buildVariant:
|
|
|
|
type: choice
|
|
|
|
description: 'Build Variant'
|
|
|
|
required: true
|
|
|
|
default: 'NormalOptimized'
|
|
|
|
options:
|
|
|
|
- NormalOptimized
|
|
|
|
- NormalDebug
|
|
|
|
|
|
|
|
jobs:
|
|
|
|
|
|
|
|
apk:
|
|
|
|
name: Generate ${{ github.event.inputs.buildVariant }} APK
|
|
|
|
runs-on: ubuntu-latest
|
|
|
|
|
|
|
|
steps:
|
2022-10-26 07:18:14 +00:00
|
|
|
- uses: actions/checkout@v3
|
2022-03-20 03:37:48 +00:00
|
|
|
with:
|
|
|
|
fetch-depth: 0
|
|
|
|
submodules: recursive
|
|
|
|
|
|
|
|
- name: Setup JDK
|
2022-10-26 07:18:14 +00:00
|
|
|
uses: actions/setup-java@v2
|
2022-03-20 03:37:48 +00:00
|
|
|
with:
|
2022-10-26 07:18:14 +00:00
|
|
|
distribution: 'zulu'
|
2023-12-20 15:09:39 +00:00
|
|
|
java-version: '17'
|
2022-03-20 03:37:48 +00:00
|
|
|
|
|
|
|
#- name: Setup SDK
|
|
|
|
# uses: android-actions/setup-android@v2
|
|
|
|
|
|
|
|
#- name: Setup NDK
|
|
|
|
# uses: nttld/setup-ndk@v1
|
|
|
|
# with:
|
2022-07-25 00:45:01 +00:00
|
|
|
# ndk-version: r21e
|
2022-03-20 03:37:48 +00:00
|
|
|
|
|
|
|
- name: Assemble APK
|
|
|
|
run: bash ./gradlew assemble${{ github.event.inputs.buildVariant }} --stacktrace
|
|
|
|
|
|
|
|
#- name: Gradle Test
|
|
|
|
# run: bash ./gradlew test${{ github.event.inputs.buildVariant }}UnitTest --stacktrace
|
|
|
|
|
|
|
|
- name: Package build
|
|
|
|
run: |
|
|
|
|
find . -name "*.apk"
|
|
|
|
mkdir ppsspp
|
|
|
|
if [ -e android/build/*/apk/*/*/android-normal-optimized.apk ]; then
|
|
|
|
cp android/build/*/apk/*/*/android-normal-optimized.apk ppsspp/
|
|
|
|
elif [ -e android/build/*/apk/*/*/android-normal-debug.apk ]; then
|
|
|
|
cp android/build/*/apk/*/*/android-normal-debug.apk ppsspp/
|
|
|
|
fi
|
|
|
|
|
|
|
|
- name: Upload APK
|
2022-10-26 07:18:14 +00:00
|
|
|
uses: actions/upload-artifact@v3
|
2022-03-20 03:37:48 +00:00
|
|
|
with:
|
|
|
|
name: android-${{ github.event.inputs.buildVariant }} build
|
|
|
|
path: ppsspp/
|