feat: use optimized debug build for CI tests
This commit is contained in:
1 parent
96d42f5182
commit
b70017bdbd
2 files changed
+24
-3
No files matched your search
@@ -61,17 +61,23 @@ jobs:
|
||||
fi
|
||||
|
||||
- name: Build ${{ matrix.variant }}
|
||||
run: ./gradlew assemble${VARIANT^}Debug --scan --configuration-cache
|
||||
run: ./gradlew assemble${VARIANT^}Debug assemble${VARIANT^}Optimized --scan --configuration-cache
|
||||
env:
|
||||
ETCHDROID_ENABLE_SENTRY: ${{ matrix.variant == 'Gplay' }}
|
||||
VARIANT: ${{ matrix.variant }}
|
||||
|
||||
- name: Upload built APK
|
||||
- name: Upload built debug APK
|
||||
uses: actions/upload-artifact@v5
|
||||
with:
|
||||
name: app-${{ matrix.variant }}-debug
|
||||
path: app/build/outputs/apk/${{ matrix.variant }}/debug/app-${{ matrix.variant }}-debug.apk
|
||||
|
||||
- name: Upload built optimized APK
|
||||
uses: actions/upload-artifact@v5
|
||||
with:
|
||||
name: app-${{ matrix.variant }}-optimized
|
||||
path: app/build/outputs/apk/${{ matrix.variant }}/optimized/app-${{ matrix.variant }}-optimized.apk
|
||||
|
||||
unit-tests:
|
||||
name: Unit tests for ${{ matrix.variant }}
|
||||
runs-on: ubuntu-latest
|
||||
@@ -151,7 +157,7 @@ jobs:
|
||||
- name: Download APK
|
||||
uses: actions/download-artifact@v5
|
||||
with:
|
||||
name: app-${{ matrix.variant }}-debug
|
||||
name: app-${{ matrix.variant }}-optimized
|
||||
path: apk
|
||||
|
||||
- name: Install QEMU
|
||||
|
||||
@@ -51,6 +51,15 @@ android {
|
||||
isMinifyEnabled = false
|
||||
isPseudoLocalesEnabled = true
|
||||
}
|
||||
create("optimized") {
|
||||
// Optimized like release (minify + shrinkResources + proguard) but debug-signed
|
||||
// and non-debuggable, so it installs in CI and runs fast on the slow e2e VM.
|
||||
initWith(getByName("release"))
|
||||
signingConfig = signingConfigs.getByName("debug")
|
||||
isDebuggable = false
|
||||
isMinifyEnabled = true
|
||||
isShrinkResources = true
|
||||
}
|
||||
}
|
||||
flavorDimensions += "store"
|
||||
productFlavors {
|
||||
@@ -146,3 +155,9 @@ dependencies {
|
||||
implementation(libs.firebase.crashlytics)
|
||||
}
|
||||
}
|
||||
|
||||
if (System.getProperty("etchdroid.isGPlayFlavor") == "true" || System.getenv("ETCHDROID_ENABLE_SENTRY") == "true") {
|
||||
tasks.matching {
|
||||
it.name.startsWith("uploadCrashlyticsMappingFile") && it.name.contains("Optimized")
|
||||
}.configureEach { enabled = false }
|
||||
}
|
||||
Reference in new issue
Block a user