diff --git a/.github/workflows/apk.yml b/.github/workflows/apk.yml index 8c37a355..67140405 100644 --- a/.github/workflows/apk.yml +++ b/.github/workflows/apk.yml @@ -46,8 +46,15 @@ jobs: working-directory: 3rdparty/glslang run: python update_glslang_sources.py - - name: Build APKs - run: gradle --no-daemon -p android-plugin :app:assembleRelease :app:assembleEsprytTraceRelease :app:assembleMagmaTraceRelease --parallel --max-workers "$(nproc)" + - name: Build plugin APKs + 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: SIGNING_STORE_PASSWORD: ${{ secrets.SIGNING_STORE_PASSWORD }} SIGNING_KEY_ALIAS: ${{ secrets.SIGNING_KEY_ALIAS }} @@ -85,16 +92,6 @@ jobs: path: android-plugin/app/build/outputs/apk/*Trace/release/*.apk 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: runs-on: ubuntu-latest needs: build @@ -113,11 +110,12 @@ jobs: - name: Setup Android SDK uses: android-actions/setup-android@v3 - - name: Download emulator retrace APKs + - name: Download retrace APKs uses: actions/download-artifact@v4 with: - name: mobilegl-android-retrace-apk-x86_64 + pattern: MobileGL-retrace-apk-* path: android-retrace-apks + merge-multiple: true - name: Enable KVM run: | @@ -142,8 +140,8 @@ jobs: 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/golden.png /data/local/tmp/mobilegl-golden.png - ESPRYT_APK="$(find android-retrace-apks -name 'MobileGL-EsprytTrace-debug.apk' -print -quit)" - MAGMA_APK="$(find android-retrace-apks -name 'MobileGL-MagmaTrace-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-release.apk' -print -quit)" test -n "${ESPRYT_APK}" test -n "${MAGMA_APK}" diff --git a/android-plugin/app/build.gradle b/android-plugin/app/build.gradle index ca4e3c8f..a7c3ee37 100644 --- a/android-plugin/app/build.gradle +++ b/android-plugin/app/build.gradle @@ -18,7 +18,11 @@ def releaseSigningReady = signingStoreFile.exists() && signingKeyAlias && signingKeyPassword 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(',') .collect { it.trim() } .findAll { !it.isEmpty() } @@ -36,7 +40,10 @@ android { versionName 'dev' ndk { - abiFilters(*mobileGlAbiFilters()) + def abiFiltersOverride = mobileGlAbiFilters() + if (!abiFiltersOverride.isEmpty()) { + abiFilters(*abiFiltersOverride) + } } } diff --git a/android-plugin/build.gradle b/android-plugin/build.gradle index 51cb9ba1..7aebeb20 100644 --- a/android-plugin/build.gradle +++ b/android-plugin/build.gradle @@ -4,7 +4,11 @@ plugins { } 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(',') .collect { it.trim() } .findAll { !it.isEmpty() } @@ -15,7 +19,10 @@ subprojects { subproject -> subproject.android { defaultConfig { ndk { - abiFilters(*mobileGlAbiFilters()) + def abiFiltersOverride = mobileGlAbiFilters() + if (!abiFiltersOverride.isEmpty()) { + abiFilters(*abiFiltersOverride) + } } externalNativeBuild { cmake {