Skip to content

Commit

Permalink
make android ci
Browse files Browse the repository at this point in the history
  • Loading branch information
YuriSizuku committed Feb 25, 2023
1 parent c5e3d71 commit 9eccb14
Show file tree
Hide file tree
Showing 7 changed files with 68 additions and 11 deletions.
31 changes: 31 additions & 0 deletions .github/workflows/build_android.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,31 @@
name: build android
on:
push: {tags: ['v*']} # Push events to matching v*, i.e. v1.0, v20.15.10

permissions:
contents: write

env:
BUILD_NAME: onsyuri_android

jobs:
build_android:
runs-on: ubuntu-20.04
steps:
- uses: actions/checkout@v3

- uses: actions/setup-java@v3
with:
java-version: '11'
distribution: 'temurin'
cache: gradle

- name: build onsyuri_android
run: cd script && bash ./cross_android.sh

- name: create release
uses: ncipollo/release-action@v1
with:
artifacts: "./build_android/outputs/apk/debug/*.apk"
allowUpdates: "true"
token: ${{ secrets.GITHUB_TOKEN }}
3 changes: 2 additions & 1 deletion .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -19,4 +19,5 @@ src/onsyuri_android/.idea/navEditor.xml
src/onsyuri_android/.idea/assetWizardSettings.xml
src/onsyuri_android/.idea/deploymentTargetDropDown.xml
src/onsyuri_android/.idea/inspectionProfiles
src/onsyuri_android/app/cpp/thirdparty/*
src/onsyuri_android/app/cpp/thirdparty/**
src/onsyuri_android/app/.cxx/**
6 changes: 3 additions & 3 deletions README.md
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
# Onscripter (Yuri)
# Onscripter-Yuri

![GitHub release (latest by date)](https://img.shields.io/github/v/release/YuriSizuku/OnscripterYuri?color=green&label=OnsYuri&logo=4chan&style=flat-square) ![GitHub Workflow Status](https://img.shields.io/github/actions/workflow/status/YuriSizuku/OnscripterYuri/build_web.yml?label=web&style=flat-square) ![GitHub Workflow Status](https://img.shields.io/github/actions/workflow/status/YuriSizuku/OnscripterYuri/build_win.yml?label=win(x86|x64)&style=flat-square) ![GitHub Workflow Status](https://img.shields.io/github/actions/workflow/status/YuriSizuku/OnscripterYuri/build_linux.yml?label=linux(x86|x64|arm32|arm64)&style=flat-square)
![GitHub release (latest by date)](https://img.shields.io/github/v/release/YuriSizuku/OnscripterYuri?color=green&label=onsyuri&logo=4chan&style=flat-square) ![GitHub Workflow Status](https://img.shields.io/github/actions/workflow/status/YuriSizuku/OnscripterYuri/build_web.yml?label=web&style=flat-square) ![GitHub Workflow Status](https://img.shields.io/github/actions/workflow/status/YuriSizuku/OnscripterYuri/build_win.yml?label=win(x86|x64)&style=flat-square) ![GitHub Workflow Status](https://img.shields.io/github/actions/workflow/status/YuriSizuku/OnscripterYuri/build_linux.yml?label=linux(x86|x64|arm|arm64)&style=flat-square) ![GitHub Workflow Status](https://img.shields.io/github/actions/workflow/status/YuriSizuku/OnscripterYuri/build_android.yml?label=android(arm|arm64)&style=flat-square)

☘️ An ehancement Onscripter porting to many platforms, especially **web**
We also support for `windows`, `linux`, `android` and `psv`. This project is base on [ONScripter-Jh](https://github.com/jh10001/ONScripter-Jh) by `SDL2`.
Expand Down Expand Up @@ -292,4 +292,4 @@ chmod +x ./gradlew && ./gradlew assembleDebug
## 5. Todo
- video support (future plan)
- preloading (future plan)
- preloading (future plan)
7 changes: 4 additions & 3 deletions script/cross_android.sh
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
# bash -c "export BUILD_TYPE=Debug && export SKIP_PORTS=1 && ./cross_linuxa64.sh"
# bash -c "export SKIP_PORTS=yes && ./cross_android.sh"
PLATFORM=android
BUILD_PATH=./../build_${PLATFORM}
CMAKELISTS_PATH=$(pwd)/..
Expand Down Expand Up @@ -36,7 +36,8 @@ fi
if [ -z "$BUILD_TYPE" ]; then BUILD_TYPE=MinSizeRel; fi
if [ -z "$TARGETS" ]; then TARGETS=assembleDebug; fi


pushd ${CMAKELISTS_PATH}/src/onsyuri_android
# use gradlew.bat in windows, or it might failed
chmod +x ./gradlew && ./gradlew $TARGETS
echo "ANDROID_HOME=$ANDROID_HOME" # use ANDROID_HOME or local.properties
chmod +x ./gradlew && ./gradlew $TARGETS --no-daemon
popd
25 changes: 25 additions & 0 deletions src/onsyuri_android/.idea/vcs.xml

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

5 changes: 2 additions & 3 deletions src/onsyuri_android/app/build.gradle
Original file line number Diff line number Diff line change
Expand Up @@ -21,7 +21,6 @@ android {
}
ndk {
abiFilters 'armeabi-v7a', 'arm64-v8a'
debugSymbolLevel 'FULL'
}
externalNativeBuild {
cmake {
Expand All @@ -43,7 +42,6 @@ android {
debug {
minifyEnabled false
debuggable true
jniDebuggable true
}
}

Expand All @@ -58,7 +56,8 @@ android {
cmake {
version '3.22.1'
path 'cpp/CMakeLists.txt'
buildStagingDirectory './../../../build_android'
// this might be some problem with ninja
// buildStagingDirectory './../../../build_android'
}
}
android.applicationVariants.all { variant ->
Expand Down
2 changes: 1 addition & 1 deletion src/onsyuri_android/app/res/values/strings.xml
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@
<string name="app_name">ONScripter-Yuri</string>
<string name="app_version">v0.7.0</string>
<string name="app_about">
An enhancement of ONScripter, developed by YuriSizuku \n
An enhancement of ONScripter, developed by YuriSizuku \n\n
1. Game Dir \n
use SAF or put game files in app, ext app dir \n
/storage/emulated/0/Android/data/com.yuri.onscripter/files \n
Expand Down

0 comments on commit 9eccb14

Please sign in to comment.