forked from osmdroid/osmdroid
-
Notifications
You must be signed in to change notification settings - Fork 0
/
.travis.yml
139 lines (129 loc) · 5 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
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
language: android
jdk: oraclejdk7
android:
components:
# The BuildTools version used by your project
- tools
- platform-tools
- build-tools-23.0.2 # 23.0.2 was not available on build
- build-tools-23.0.1
- build-tools-23.0.3
# The SDK version used to compile your project
- android-24
- android-23
- android-22
- android-21
- android-19
- android-18
- android-15
- android-10
- android-8
- addon-google_apis-google-10
- addon-google_apis-google-15
- addon-google_apis-google-18
- addon-google_apis-google-19
- addon-google_apis-google-21
- addon-google_apis-google-22
- addon-google_apis-google-23
- addon-google_apis-google-8
# Additional components
- extra-google-google_play_services
- extra-google-m2repository
- extra-android-m2repository
- addon-google_apis-google-19
- 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-x86-android-22
- sys-img-x86-android-23
- addon-google_apis-google-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 with google
- API=8g ANDROID_TARGET=13 ANDROID_ABI=armeabi
#api8
- API=8 ANDROID_TARGET=1 ANDROID_ABI=armeabi
#api10
- API=10 ANDROID_TARGET=2 ANDROID_ABI=armeabi
#api10 with google
- API=10g ANDROID_TARGET=13 ANDROID_ABI=armeabi
#api15
- API=15 ANDROID_TARGET=3 ANDROID_ABI=armeabi-v7a
#api15 with google
- API=15g ANDROID_TARGET=15 ANDROID_ABI=armeabi-v7a
#api19
- API=19 ANDROID_TARGET=7 ANDROID_ABI=armeabi-v7a
#api19 with google
# disabling, the system image is no longer available on travis - API=19g ANDROID_TARGET=16 ANDROID_ABI=armeabi-v7a
#api21
#- ANDROID_TARGET=17 ANDROID_ABI=armeabi-v7a no abi available with google apis
#api22
# ANDROID_TARGET=18 ANDROID_ABI=x86 not currently possible with travis, missing some kind of hardware acceleration driver
#api23
# ANDROID_TARGET=19 ANDROID_ABI=x86 not currently possible with travis, missing some kind of hardware acceleration driver
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 list
# TEMPORARY comment out of the maven build since it's broken at the moment
#- mkdir temp
#- cd temp
#- git clone https://github.com/simpligility/maven-android-sdk-deployer
#- cd maven-android-sdk-deployer
#- mvn clean install -fn -B -U
#- cd ..
#- cd ..
- android-wait-for-emulator
- adb shell input keyevent 82 &
#setup for maps forge adapter
#- wget http://download.mapsforge.org/maps/world/world.map
- adb shell ls /
- adb shell ls /sdcard/
- adb shell ls /sdcard/osmdroid
- adb root
- adb shell mount -o rw,remount rootfs /
- adb shell chmod 777 /mnt/sdcard
- adb shell mkdir /sdcard/osmdroid/
- adb push osmdroid-forge-app/world.map /sdcard/osmdroid/world.map
#- adb push resources/usgsbase.gemf /sdcard/osmdroid/usgsbase.gemf
#- adb push resources/usgstopo.sqlite /sdcard/osmdroid/usgstopo.sqlite
#- adb push resources/usgssat.zip /sdcard/osmdroid/usgssat.zip
#build
script:
#build using maven with integration tests
#we build 3 times due to issues with the maven-android-plugin. root cause is unknown but seems to be related to how artifacts are resolved for android projects
#in case you're wondering -fn means fail never, which loosely means, if the build fails, the exit code is always 0, which is basically all CI engines look for.
#the dist profile adds the zip and tar outputs of all javadocs and source jars
#- ./travis.sh
#- mvn install -fn -B -U -Pdist
#- mvn install -Pdist
#- mvn android:undeploy
#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 connectedCheck
# 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:
# run this on failure
- adb pull /sdcard/osmdroid/crash.log
- cat crash.log
# dumps the log then exits
- adb logcat -d