diff --git a/.github/workflows/status_check.yml b/.github/workflows/status_check.yml index 0852665..e7ffb64 100644 --- a/.github/workflows/status_check.yml +++ b/.github/workflows/status_check.yml @@ -171,7 +171,15 @@ jobs: # SwiftShader's JIT, which is a known crash source. emulator-options: -no-window -gpu swiftshader_indirect -noaudio -no-boot-anim -camera-back none disable-animations: true - script: ./gradlew :app:connectedDebugAndroidTest + # The default userdata partition is not big enough for this APK once the + # FFmpeg libraries are in it. API 37's system image leaves the least room and + # was the level that actually failed, with "Requested internal only, but not + # enough space" -- but the margin was thin everywhere, so give them all room. + disk-size: 8G + # Build only the ABI the emulator can execute. FFmpeg's native libraries + # dominate the APK, so shipping arm64 to an x86_64 emulator doubles the + # install for code that can never run: 114 MB against 80 MB. + script: ./gradlew :app:connectedDebugAndroidTest -PabiFilters=x86_64 - uses: actions/upload-artifact@043fb46d1a93c77aae656e7c1c64a875d1fc6a0a # v7.0.1 if: always() diff --git a/app/build.gradle.kts b/app/build.gradle.kts index 25a08d5..e2b917c 100644 --- a/app/build.gradle.kts +++ b/app/build.gradle.kts @@ -23,8 +23,22 @@ android { // 64-bit only. The 16 KB page-size rules apply to these ABIs; 32-bit is not // required by Play and would add ~2 more copies of the FFmpeg .so files. + // + // Overridable so a test run can build for just the ABI it will execute on. + // FFmpeg's native libraries dominate the APK, so shipping both ABIs to an + // x86_64 emulator doubles it for no benefit -- and on API 37, whose system + // image leaves less free userdata, the full APK does not fit at all: + // "Requested internal only, but not enough space". + // + // ./gradlew :app:connectedDebugAndroidTest -PabiFilters=x86_64 + // + // Release builds ignore this and always ship both. ndk { - abiFilters += listOf("arm64-v8a", "x86_64") + val requested = (findProperty("abiFilters") as String?) + ?.split(",") + ?.map { it.trim() } + ?.filter { it.isNotEmpty() } + abiFilters += requested ?: listOf("arm64-v8a", "x86_64") } }