forked from fossasia/susi_android
-
Notifications
You must be signed in to change notification settings - Fork 0
/
circle.yml
40 lines (33 loc) · 1.55 KB
/
circle.yml
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
#Install android build tools, platforms
#Supported versions here https://circleci.com/docs/android
dependencies:
override:
- ( sleep 5 && while [ 1 ]; do sleep 1; echo y; done ) | android update sdk --no-ui --all --filter "tools,platform-tools,android-25,extra-google-m2repository,extra-android-m2repository,extra-android-support,extra-google-google_play_services"
- echo y | android update sdk --no-ui --all --filter "build-tools-26.0.2"
- ANDROID_HOME=/usr/local/android-sdk-linux ./gradlew dependencies
#Pull any submodules
#-PdisablePreDex is a must else gradle just dies due to memory limit
#Replace
test:
override:
- (./gradlew assemble -PdisablePreDex):
timeout: 360
- cp -r ${HOME}/${CIRCLE_PROJECT_REPONAME}/app/build/outputs/apk/ $CIRCLE_ARTIFACTS
- emulator -avd circleci-android22 -no-audio -no-window:
background: true
parallel: true
# Wait for it to have booted
- circle-android wait-for-boot
# Tun tests against the emulator.
- ./gradlew connectedCheck
# Run Lint
- ./gradlew lint
# Copy lint report
- mkdir $CIRCLE_TEST_REPORTS/Lint
- cp app/build/reports/lint-results.* $CIRCLE_TEST_REPORTS/Lint
# Copy tests report
- mkdir $CIRCLE_TEST_REPORTS/AndroidTests
- cp -r app/build/reports/androidTests/connected/* $CIRCLE_TEST_REPORTS/AndroidTests
- bash exec/prep-key.sh
- chmod +x exec/apk-gen.sh
- ./exec/apk-gen.sh