File tree Expand file tree Collapse file tree 2 files changed +21
-7
lines changed
Expand file tree Collapse file tree 2 files changed +21
-7
lines changed Original file line number Diff line number Diff line change 11# GitHub Actions-specific Gradle settings
2- # High-performance settings for 64GB/16CPU runners
2+ # Optimized for E2E builds on GitHub Actions runners
33
4- # JVM configuration - high-performance for GitHub Actions
5- org.gradle.jvmargs=-Xmx32g -XX:MaxMetaspaceSize=2g -XX:+UseG1GC -XX:G1HeapRegionSize=32m -XX:+UseStringDeduplication -XX:+OptimizeStringConcat
4+ # JVM configuration - balanced settings to avoid OOM while maintaining performance
5+ # Using 16GB heap to leave room for parallel workers and native memory
6+ org.gradle.jvmargs=-Xmx16g -XX:MaxMetaspaceSize=1g -XX:+UseG1GC -XX:G1HeapRegionSize=16m -XX:+UseStringDeduplication -XX:+OptimizeStringConcat
67
7- # Enable all performance optimizations for GitHub Actions
8+ # Enable performance optimizations but limit parallelism to prevent OOM
89org.gradle.parallel=true
910org.gradle.configureondemand=true
1011org.gradle.caching=true
1112org.gradle.daemon=true
12- org.gradle.workers.max=12
13- org.gradle.vfs.watch=true
13+ org.gradle.workers.max=6
14+ org.gradle.vfs.watch=false
1415
1516# CI-specific optimizations - enabled for GitHub Actions
1617kotlin.incremental=true
Original file line number Diff line number Diff line change @@ -606,7 +606,16 @@ buildAndroidReleaseE2E(){
606606 cp android/gradle.properties.github android/gradle.properties
607607 # E2E builds only need x86_64 for emulator testing, reducing build time and memory usage
608608 echo " Building E2E APKs for $flavor flavor..."
609- cd android && ./gradlew assemble${flavor} Release app:assemble${flavor} ReleaseAndroidTest -PminSdkVersion=26 -DtestBuildType=release
609+ cd android
610+
611+ # Try building with optimized settings
612+ if ! ./gradlew assemble${flavor} Release app:assemble${flavor} ReleaseAndroidTest -PminSdkVersion=26 -DtestBuildType=release; then
613+ echo " ⚠️ Build failed, retrying with reduced parallelism..."
614+ # Kill any remaining daemon
615+ ./gradlew --stop || true
616+ # Retry with no parallel builds to reduce memory pressure
617+ ./gradlew assemble${flavor} Release app:assemble${flavor} ReleaseAndroidTest -PminSdkVersion=26 -DtestBuildType=release --no-parallel --max-workers=2
618+ fi
610619
611620 # Verify APK files were created
612621 echo " "
@@ -618,12 +627,16 @@ buildAndroidReleaseE2E(){
618627 echo " ✅ App APK found: $appApkPath ($( du -h " $appApkPath " | cut -f1) )"
619628 else
620629 echo " ❌ App APK NOT found at: $appApkPath "
630+ cd ..
631+ return 1
621632 fi
622633
623634 if [ -f " $testApkPath " ]; then
624635 echo " ✅ Test APK found: $testApkPath ($( du -h " $testApkPath " | cut -f1) )"
625636 else
626637 echo " ❌ Test APK NOT found at: $testApkPath "
638+ cd ..
639+ return 1
627640 fi
628641 echo " "
629642
You can’t perform that action at this time.
0 commit comments