Skip to content

Commit 641a245

Browse files
committed
ci: add Android job to collect https.so artifacts
1 parent 218554b commit 641a245

File tree

1 file changed

+57
-1
lines changed

1 file changed

+57
-1
lines changed

.github/workflows/build.yml

+57-1
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
name: "Build & Test"
22
on: [push, pull_request]
33

4-
jobs:
4+
jobs:
55
macOS:
66
runs-on: macos-latest
77
timeout-minutes: 30
@@ -130,3 +130,59 @@ jobs:
130130
with:
131131
name: https-windows-${{ matrix.arch }}.zip
132132
path: install/https.dll
133+
134+
Android:
135+
runs-on: ubuntu-20.04
136+
steps:
137+
- name: Checkout love-android
138+
uses: actions/checkout@v4
139+
with:
140+
repository: love2d/love-android
141+
ref: 11.5a
142+
submodules: recursive
143+
path: ./tools/love-android
144+
- name: Checkout lua-https
145+
uses: actions/checkout@v4
146+
with:
147+
submodules: recursive
148+
path: ./tools/love-android/love/src/jni/lua-modules/lua-https
149+
- name: Get Java 17
150+
uses: actions/setup-java@v4
151+
with:
152+
cache: gradle
153+
distribution: temurin
154+
java-version: 17
155+
- name: Setup Android SDK
156+
uses: android-actions/[email protected]
157+
with:
158+
cmdline-tools-version: 11076708
159+
packages: >-
160+
tools
161+
platform-tools
162+
platforms;android-34
163+
build-tools;33.0.1
164+
ndk;25.2.9519653
165+
log-accepted-android-sdk-licenses: false
166+
- name: Build Android release .apk
167+
run: |
168+
pushd ./tools/love-android
169+
./gradlew assembleEmbedNoRecordRelease
170+
popd
171+
# Extract the https.so files with preserved directory structure
172+
for ARCH in arm64-v8a armeabi-v7a; do
173+
mkdir -p "./tools/https/lib/$ARCH"
174+
unzip -j ./tools/love-android/app/build/outputs/apk/embedNoRecord/release/app-embed-noRecord-release-unsigned.apk "lib/$ARCH/https.so" -d "./tools/https/lib/$ARCH/"
175+
ls -la "./tools/https/lib/$ARCH/"
176+
done
177+
- name: Artifact arm64-v8a
178+
if: always()
179+
uses: actions/upload-artifact@v4
180+
with:
181+
name: https-android-arm64-v8a.zip
182+
path: ./tools/https/lib/arm64-v8a/https.so
183+
- name: Artifact armeabi-v7a
184+
if: always()
185+
uses: actions/upload-artifact@v4
186+
with:
187+
name: https-android-armeabi-v7a.zip
188+
path: ./tools/https/lib/armeabi-v7a/https.so

0 commit comments

Comments
 (0)