13. Good!!
• Easy setup with yml
• Build production app without
including secret keys into the
repo(http://docs.travis-ci.com/user/encrypting-
files/)
• Most of Mercari project
run CI on Travis CI
14. So-so…
• Need some tweaks to avoid Out of Memory
• Slow. Takes 12-15min/per build check
16. Good!!
• Has better features for testing and debugging
• Bit faster than Travis CI (1- 2min for each build)
• Mercari iOS project runs CI on CircleCI
17. So-so…
• Need some tweaks to avoid Out of Memory
• Building production app looked a bit tricky
(Haven’t tried yet)
31. Tip 1: Avoid OOM(CircleCI)
Tuning tips:
• Lower the total memory(JVM,Gradle) size to 4.0G
• Adjust Xmx and MaxPermSize
• Set timeout (>1000) for GC
Xmx -> Heap space (where object resources are allocated )
MaxPermSize -> Permgen(where class, methods are loaded)
32. Tip 1: Avoid OOM(CircleCI)
machine:
environment:
ANDROID_HOME: /usr/local/android-sdk-linux
_JAVA_OPTIONS: "-Xms256m -Xmx1280m -XX:MaxPermSize=350m"
GRADLE_OPTS: '-Dorg.gradle.jvmargs="-Xmx1536m -
XX:MaxPermSize=512m -XX:+HeapDumpOnOutOfMemoryError"'
…
override:
- ./gradlew assembleDev -PdisablePreDex:
timeout: 1500
Heap Perm Heap Perm other
JVM(dex) Gradle
4GB
• There is no best practice but I suggest that
large memory be allocated to Xmx
33. Tip 2: Save the JUnit test result(CircleCI)
test:
post:
- mkdir -p $CIRCLE_TEST_REPORTS/junit/
- find . -type f -regex ".*/test-results/*/.*xml" -exec cp {}
$CIRCLE_TEST_REPORTS/junit/ ;
• You can check Test result from ‘Test Failure’
http://qiita.com/tomoima525/items/b4a91d1624aaf0112b3f
Ref. CircleCIでJUnitの結果を見る
35. Tip 3: Continuous deployment for specific
branches(CircleCI)
• Set variables at `Environment variables`
36. Tip 4: Add dependencies manually
dependencies:
override:
- echo y | android update sdk --no-ui --all --filter extra-
google-m2repository,extra-android-m2repository,build-tools-23.0.1,
android-23
android:
components:
- build-tools-23.0.1
- android-23
- extra-android-m2repository
- extra-google-m2repository
.travis.yml
circle.yml
• The latest packages(ex. Android M) are not installed on
the VM
• Add manually with command line
37. • Tip 1: Check memory usage of JVM to
avoid OOM
• Tip 2: Save the JUnit test result on the VM
• Tip 3: Continuous deployment for specific
branches
• Tip 4: Add dependencies manually