[Fix] (ci): package retrace APK for all ABIs

This commit is contained in:
2026-06-16 14:36:17 +08:00
parent 3fa89640cd
commit e3c4b94b11
3 changed files with 32 additions and 20 deletions
+14 -16
View File
@@ -46,8 +46,15 @@ jobs:
working-directory: 3rdparty/glslang working-directory: 3rdparty/glslang
run: python update_glslang_sources.py run: python update_glslang_sources.py
- name: Build APKs - name: Build plugin APKs
run: gradle --no-daemon -p android-plugin :app:assembleRelease :app:assembleEsprytTraceRelease :app:assembleMagmaTraceRelease --parallel --max-workers "$(nproc)" run: gradle --no-daemon -p android-plugin :app:assembleEsprytPluginRelease :app:assembleMagmaPluginRelease --parallel --max-workers "$(nproc)"
env:
SIGNING_STORE_PASSWORD: ${{ secrets.SIGNING_STORE_PASSWORD }}
SIGNING_KEY_ALIAS: ${{ secrets.SIGNING_KEY_ALIAS }}
SIGNING_KEY_PASSWORD: ${{ secrets.SIGNING_KEY_PASSWORD }}
- name: Build retrace APKs
run: gradle --no-daemon -p android-plugin :app:assembleEsprytTraceRelease :app:assembleMagmaTraceRelease -Pmobilegl.abis=all --parallel --max-workers "$(nproc)"
env: env:
SIGNING_STORE_PASSWORD: ${{ secrets.SIGNING_STORE_PASSWORD }} SIGNING_STORE_PASSWORD: ${{ secrets.SIGNING_STORE_PASSWORD }}
SIGNING_KEY_ALIAS: ${{ secrets.SIGNING_KEY_ALIAS }} SIGNING_KEY_ALIAS: ${{ secrets.SIGNING_KEY_ALIAS }}
@@ -85,16 +92,6 @@ jobs:
path: android-plugin/app/build/outputs/apk/*Trace/release/*.apk path: android-plugin/app/build/outputs/apk/*Trace/release/*.apk
if-no-files-found: error if-no-files-found: error
- name: Build emulator retrace APKs
run: gradle --no-daemon -p android-plugin :app:assembleEsprytTraceDebug :app:assembleMagmaTraceDebug -Pmobilegl.abis=x86_64 --parallel --max-workers "$(nproc)"
- name: Upload emulator retrace APKs
uses: actions/upload-artifact@v4
with:
name: mobilegl-android-retrace-apk-x86_64
path: android-plugin/app/build/outputs/apk/*Trace/debug/*.apk
if-no-files-found: error
retrace: retrace:
runs-on: ubuntu-latest runs-on: ubuntu-latest
needs: build needs: build
@@ -113,11 +110,12 @@ jobs:
- name: Setup Android SDK - name: Setup Android SDK
uses: android-actions/setup-android@v3 uses: android-actions/setup-android@v3
- name: Download emulator retrace APKs - name: Download retrace APKs
uses: actions/download-artifact@v4 uses: actions/download-artifact@v4
with: with:
name: mobilegl-android-retrace-apk-x86_64 pattern: MobileGL-retrace-apk-*
path: android-retrace-apks path: android-retrace-apks
merge-multiple: true
- name: Enable KVM - name: Enable KVM
run: | run: |
@@ -142,8 +140,8 @@ jobs:
cp tools/trace_replay/fixtures/minecraft-1.21.4-startup.0000092195.png android-retrace-fixture/golden.png cp tools/trace_replay/fixtures/minecraft-1.21.4-startup.0000092195.png android-retrace-fixture/golden.png
adb push android-retrace-fixture/trace.trace /data/local/tmp/mobilegl-trace.trace adb push android-retrace-fixture/trace.trace /data/local/tmp/mobilegl-trace.trace
adb push android-retrace-fixture/golden.png /data/local/tmp/mobilegl-golden.png adb push android-retrace-fixture/golden.png /data/local/tmp/mobilegl-golden.png
ESPRYT_APK="$(find android-retrace-apks -name 'MobileGL-EsprytTrace-debug.apk' -print -quit)" ESPRYT_APK="$(find android-retrace-apks -name 'MobileGL-EsprytTrace-release.apk' -print -quit)"
MAGMA_APK="$(find android-retrace-apks -name 'MobileGL-MagmaTrace-debug.apk' -print -quit)" MAGMA_APK="$(find android-retrace-apks -name 'MobileGL-MagmaTrace-release.apk' -print -quit)"
test -n "${ESPRYT_APK}" test -n "${ESPRYT_APK}"
test -n "${MAGMA_APK}" test -n "${MAGMA_APK}"
+9 -2
View File
@@ -18,7 +18,11 @@ def releaseSigningReady = signingStoreFile.exists()
&& signingKeyAlias && signingKeyAlias
&& signingKeyPassword && signingKeyPassword
def mobileGlAbiFilters = { def mobileGlAbiFilters = {
((findProperty('mobilegl.abis') ?: System.getenv('MOBILEGL_ABIS') ?: 'arm64-v8a') as String) def abiList = (findProperty('mobilegl.abis') ?: System.getenv('MOBILEGL_ABIS') ?: 'arm64-v8a') as String
if (abiList.equalsIgnoreCase('all')) {
return ['arm64-v8a', 'x86_64']
}
abiList
.split(',') .split(',')
.collect { it.trim() } .collect { it.trim() }
.findAll { !it.isEmpty() } .findAll { !it.isEmpty() }
@@ -36,7 +40,10 @@ android {
versionName 'dev' versionName 'dev'
ndk { ndk {
abiFilters(*mobileGlAbiFilters()) def abiFiltersOverride = mobileGlAbiFilters()
if (!abiFiltersOverride.isEmpty()) {
abiFilters(*abiFiltersOverride)
}
} }
} }
+9 -2
View File
@@ -4,7 +4,11 @@ plugins {
} }
def mobileGlAbiFilters = { def mobileGlAbiFilters = {
((rootProject.findProperty('mobilegl.abis') ?: System.getenv('MOBILEGL_ABIS') ?: 'arm64-v8a') as String) def abiList = (rootProject.findProperty('mobilegl.abis') ?: System.getenv('MOBILEGL_ABIS') ?: 'arm64-v8a') as String
if (abiList.equalsIgnoreCase('all')) {
return ['arm64-v8a', 'x86_64']
}
abiList
.split(',') .split(',')
.collect { it.trim() } .collect { it.trim() }
.findAll { !it.isEmpty() } .findAll { !it.isEmpty() }
@@ -15,7 +19,10 @@ subprojects { subproject ->
subproject.android { subproject.android {
defaultConfig { defaultConfig {
ndk { ndk {
abiFilters(*mobileGlAbiFilters()) def abiFiltersOverride = mobileGlAbiFilters()
if (!abiFiltersOverride.isEmpty()) {
abiFilters(*abiFiltersOverride)
}
} }
externalNativeBuild { externalNativeBuild {
cmake { cmake {