This repository has been archived by the owner on Aug 27, 2023. It is now read-only.
forked from ryanjohn1/onboarding
-
Notifications
You must be signed in to change notification settings - Fork 11
/
.travis.yml
83 lines (72 loc) · 2.45 KB
/
.travis.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
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
language: android
jdk: oraclejdk8
android:
components:
# The BuildTools version used by your project
- tools
- platform-tools
- build-tools-25.0.0
- build-tools-23.0.1
- build-tools-23.0.3
# The SDK version used to compile your project
- android-25
- android-24
- android-23
- android-22
- android-21
- android-19
- android-18
- android-15
- android-10
- android-8
# Additional components
- extra-android-m2repository
- sys-img-armeabi-android-8
- sys-img-armeabi-android-10
- sys-img-armeabi-android-15
- sys-img-armeabi-android-19
- sys-img-armeabi-android-21
- sys-img-armeabi-v7a-android-15
- sys-img-armeabi-v7a-android-19
- sys-img-x86-android-22
- sys-img-x86-android-23
sudo: required
# fun fact, travis doesn't really support multiple AVDs running currently for a single build (tried it, build timed out constantly while starting up the AVDs)
# thus we're using a build matrix (which makes more sense anyhow)
env:
global:
#minutes (2 minutes by default), prevents CommandShellUnresponsiveExceptions
- ADB_INSTALL_TIMEOUT=14
matrix:
#note when changing these, updating the gradle build file for the GoogleWrapper project
# first env var is just for display purposes
#api8
- API=8 ANDROID_TARGET=1 ANDROID_ABI=armeabi
#api10
- API=10 ANDROID_TARGET=2 ANDROID_ABI=armeabi
#api15
#- API=15 ANDROID_TARGET=3 ANDROID_ABI=armeabi-v7a
#api19
- API=19 ANDROID_TARGET=5 ANDROID_ABI=armeabi-v7a
before_install:
# create and start emulators
- android list targets
- echo no | android create avd --force -n test$ANDROID_TARGET -t $ANDROID_TARGET --abi $ANDROID_ABI --sdcard 200M
- emulator -memory 1536 -avd test$ANDROID_TARGET -no-skin -no-audio -no-window &
- android-wait-for-emulator
- adb shell input keyevent 82 &
# mvn sdk deploy
before_script:
- android-wait-for-emulator
- adb shell input keyevent 82 &
#build
script:
#build using gradle
# travis_wait 30 https://docs.travis-ci.com/user/common-build-problems/#My-builds-are-timing-out
- ./gradlew -version
- travis_wait 60 ./gradlew clean install connectedCheck -Pprofile=ci
# fun fact, maven runs android tests concurrently for all connected devices, gradle does not
# since we're using build matrix, each build target compiles the source, fires up it's specific vm, runs the tests, then exits.
# --stacktrace
after_failure:
- adb logcat -d