From 3796692b816f37dd245ba82e23e3529baffe2988 Mon Sep 17 00:00:00 2001 From: Andre Pimenta Date: Fri, 5 Jun 2020 00:43:14 +0100 Subject: [PATCH] Fix android circleci (#1618) * test separating into different steps * Fix command * Trying more memory * fix param * other params * increasing docker memory * Trying setting different resource * try 3g * Test from a circleci blog android config * trying another config * Final circleci config * Revert package json --- .circleci/config.yml | 5 +++-- android/gradle.properties | 2 +- scripts/build.sh | 2 +- 3 files changed, 5 insertions(+), 4 deletions(-) diff --git a/.circleci/config.yml b/.circleci/config.yml index 7c4685350f6..36f0a0dd174 100644 --- a/.circleci/config.yml +++ b/.circleci/config.yml @@ -109,8 +109,9 @@ jobs: publish-pre-release-android: working_directory: ~/MetaMask environment: - _JAVA_OPTIONS: "-Xms1024m -Xmx2048m" - GRADLE_OPTS: '-Dorg.gradle.jvmargs="-Xms1024m -Xmx2048m"' + JAVA_OPTS: "-Xms512m -Xmx1024m" + _JAVA_OPTIONS: "-XX:+UnlockExperimentalVMOptions -XX:+UseCGroupMemoryLimitForHeap" + GRADLE_OPTS: '-Dorg.gradle.jvmargs="-Xmx2048m -XX:+HeapDumpOnOutOfMemoryError"' docker: - image: circleci/android:api-28-node8-alpha steps: diff --git a/android/gradle.properties b/android/gradle.properties index 4e83b07283c..b63abba255f 100644 --- a/android/gradle.properties +++ b/android/gradle.properties @@ -10,7 +10,7 @@ # Specifies the JVM arguments used for the daemon process. # The setting is particularly useful for tweaking memory settings. # Default value: -Xmx10248m -XX:MaxPermSize=256m -org.gradle.jvmargs=-Xmx2048m -XX:MaxPermSize=2048m -XX:+HeapDumpOnOutOfMemoryError -Dfile.encoding=UTF-8 +org.gradle.jvmargs=-Xmx2048m -XX:MaxPermSize=512m -XX:+HeapDumpOnOutOfMemoryError -Dfile.encoding=UTF-8 # org.gradle.daemon=false AsyncStorage_db_size_in_MB=10 diff --git a/scripts/build.sh b/scripts/build.sh index e5ab45518ac..ed0902be0ea 100755 --- a/scripts/build.sh +++ b/scripts/build.sh @@ -225,7 +225,7 @@ buildAndroidRelease(){ fi # GENERATE APK - cd android && ./gradlew assembleRelease --max-workers 2 + cd android && ./gradlew assembleRelease --no-daemon --max-workers 2 # GENERATE BUNDLE if [ "$GENERATE_BUNDLE" = true ] ; then