Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Travis CI memory usage #27

Merged
merged 1 commit into from
May 27, 2016
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
7 changes: 5 additions & 2 deletions build.sh
Original file line number Diff line number Diff line change
Expand Up @@ -6,6 +6,9 @@ set -e
# List of all samples
samples=( admob analytics app-indexing auth config crash database dynamiclinks invites messaging storage )

# Limit memory usage
OPTS='-Dorg.gradle.jvmargs="-Xmx2048m -XX:+HeapDumpOnOutOfMemoryError"'

for sample in "${samples[@]}"
do
echo "Building ${sample}"
Expand All @@ -14,7 +17,7 @@ do
# For a merged commit, build all configurations.
cd $sample && \
cp ../mock-google-services.json ./app/google-services.json && \
./gradlew clean build
GRADLE_OPTS=$OPTS ./gradlew clean build

# Back to parent directory.
cd -
Expand All @@ -23,7 +26,7 @@ do
# obvious errors.
cd $sample && \
cp ../mock-google-services.json ./app/google-services.json && \
./gradlew clean :app:assembleDebug
GRADLE_OPTS=$OPTS ./gradlew clean :app:assembleDebug

# Back to parent directory.
cd -
Expand Down