Skip to content

Commit

Permalink
Split build steps to avoid OOM. (artem-zinnatullin#210)
Browse files Browse the repository at this point in the history
  • Loading branch information
artem-zinnatullin authored Oct 25, 2016
1 parent 8b9389b commit cf9a7fe
Show file tree
Hide file tree
Showing 4 changed files with 21 additions and 4 deletions.
2 changes: 1 addition & 1 deletion .travis.yml
Original file line number Diff line number Diff line change
Expand Up @@ -24,7 +24,7 @@ before_script:
- adb shell input keyevent 82

script:
- sh ci.sh
- bash build.sh

after_success:
- codecov
Expand Down
11 changes: 11 additions & 0 deletions build.sh
Original file line number Diff line number Diff line change
@@ -0,0 +1,11 @@
#!/bin/bash
set -xe

# You can run it from any directory.
DIR="$( cd "$( dirname "${BASH_SOURCE[0]}" )" && pwd )"
PROJECT_DIR=$DIR/

# This will: compile the project, run lint, run tests under JVM, package apk, check the code quality and run tests on the device/emulator.
"$PROJECT_DIR"/gradlew --no-daemon --info clean
"$PROJECT_DIR"/gradlew --no-daemon --info build -PdisablePreDex -PwithDexcount -Dscan
"$PROJECT_DIR"/gradlew --no-daemon --info connectedAndroidTest -PdisablePreDex -PwithDexcount
10 changes: 8 additions & 2 deletions ci.sh
Original file line number Diff line number Diff line change
@@ -1,5 +1,11 @@
#!/bin/bash
# Please run it from root project directory
set -xe

# You can run it from any directory.
DIR="$( cd "$( dirname "${BASH_SOURCE[0]}" )" && pwd )"
PROJECT_DIR=$DIR/

# This will: compile the project, run lint, run tests under JVM, package apk, check the code quality and run tests on the device/emulator.
./gradlew clean build connectedAndroidTest -PdisablePreDex -PwithDexcount -Dscan
"$PROJECT_DIR"/gradlew --no-daemon --info clean
"$PROJECT_DIR"/gradlew --no-daemon --info build -PdisablePreDex -PwithDexcount -Dscan
"$PROJECT_DIR"/gradlew --no-daemon --info connectedAndroidTest -PdisablePreDex -PwithDexcount
2 changes: 1 addition & 1 deletion circle.yml
Original file line number Diff line number Diff line change
Expand Up @@ -16,5 +16,5 @@ test:
parallel: true
- circle-android wait-for-boot
- adb shell input keyevent 82
- sh ci.sh
- bash build.sh
- pip install --user codecov && codecov

0 comments on commit cf9a7fe

Please sign in to comment.