File tree Expand file tree Collapse file tree 2 files changed +44
-12
lines changed
Expand file tree Collapse file tree 2 files changed +44
-12
lines changed Original file line number Diff line number Diff line change 1- name : Build All Architectures
1+ name : Build
22
33on : [push, pull_request]
44
55jobs :
6- build :
7- name : Build on ${{ matrix.os }}
6+ desktop :
7+ name : Desktop ${{ matrix.os }}
88 runs-on : ${{ matrix.os }}
99 strategy :
1010 fail-fast : false
@@ -27,20 +27,45 @@ jobs:
2727
2828 - name : Install Dependencies (Linux)
2929 if : contains(matrix.os, 'ubuntu')
30- run : |
31- sudo apt-get install -y libgles2-mesa-dev
30+ run : sudo apt-get install -y libgles2-mesa-dev
31+
32+ - name : Build Desktop
33+ run : python3 scripts/build.py desktop
34+
35+ - name : Upload Artifacts
36+ uses : actions/upload-artifact@v4
37+ with :
38+ name : live2d-desktop-${{ matrix.os }}
39+ path : out/*.jar
40+
41+ android :
42+ name : Android Build
43+ runs-on : ubuntu-latest
44+
45+ steps :
46+ - uses : actions/checkout@v4
47+
48+ - name : Set up JDK 21
49+ uses : actions/setup-java@v4
50+ with :
51+ java-version : ' 21'
52+ distribution : ' temurin'
53+
54+ - name : Set up Python
55+ uses : actions/setup-python@v5
56+ with :
57+ python-version : ' 3.x'
3258
3359 - name : Setup Android NDK
34- if : contains(matrix.os, 'ubuntu')
3560 uses : nttld/setup-ndk@v1
3661 with :
3762 ndk-version : r26b
3863
39- - name : Build and Package
40- run : python3 scripts/build.py
64+ - name : Build Android
65+ run : python3 scripts/build.py android
4166
4267 - name : Upload Artifacts
4368 uses : actions/upload-artifact@v4
4469 with :
45- name : live2d-jars-${{ matrix.os }}
46- path : out/*.jar
70+ name : live2d-android
71+ path : out/*.jar
Original file line number Diff line number Diff line change @@ -157,6 +157,13 @@ def package_jars():
157157 download_sdk ()
158158 download_headers ()
159159 compile_java ()
160- build_desktop ()
161- build_android ()
160+
161+ targets = sys .argv [1 :]
162+ if not targets :
163+ build_desktop ()
164+ build_android ()
165+ else :
166+ if "desktop" in targets : build_desktop ()
167+ if "android" in targets : build_android ()
168+
162169 package_jars ()
You can’t perform that action at this time.
0 commit comments