forked from onecityuni/connectbot
-
Notifications
You must be signed in to change notification settings - Fork 0
/
.travis.yml
82 lines (76 loc) · 3.64 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
language: android
jdk: oraclejdk8
sudo: true # For the 7.5GB limit
env:
global:
- ANDROID_TOOLS_URL="https://dl.google.com/android/repository/tools_r25.2.3-linux.zip"
- ANDROID_NDK_HOME="$ANDROID_HOME/ndk-bundle"
# Coverity
- secure: "DTBBKdwZE5yxPjJQG8/wU/+LJ1A3MtUYNaf8O/yhmQNo4UcxQF+3KOoY5OK4vvoTewisUqnVRhXhD8rMYzBZiNtaGF8eSMGXVWUVb6YhOPQ0oMHKSmVgopEHzhoGa+9HDJ6xyQZdALJB8GVlwamTwO/1qk/xI02mjUNEtdk8cuc="
cache:
directories:
- $HOME/.gradle/caches/
- $HOME/.gradle/wrapper/dists/
- $HOME/.cache/ci-support
- $HOME/.cache/lint
- $HOME/.cache/ndk
before_cache:
- find $HOME/.gradle -name "*.lock" -exec rm {} \;
- rm -rf $HOME/.gradle/caches/[1-9]*
addons:
apt:
sources:
- ubuntu-toolchain-r-test
packages:
- xqilla # ./scripts/check-lint-count.bash
- libstdc++6-4.7-dev
coverity_scan:
project:
name: "connectbot/connectbot"
description: "The first SSH client for Android."
notification_email: [email protected]
build_command_prepend: "./gradlew clean"
build_command: "./gradlew assemble"
branch_pattern: coverity_scan
before_script:
# Install Android stuff
- curl -L $ANDROID_TOOLS_URL -o $HOME/tools.zip
- unzip -oq $HOME/tools.zip -d $ANDROID_HOME
- mkdir $ANDROID_HOME/licenses
- echo -ne "\n8933bad161af4178b1185d1a37fbf41ea5269c55" >> $ANDROID_HOME/licenses/android-sdk-license
- echo -ne "\n84831b9409646a918e30573bab4c9c91346d8abd\n504667f4c0de7af1a06de9f4b1727b84351f2910" >> $ANDROID_HOME/licenses/android-sdk-preview-license
- $ANDROID_HOME/tools/bin/sdkmanager tools
- $ANDROID_HOME/tools/bin/sdkmanager platform-tools
- $ANDROID_HOME/tools/bin/sdkmanager 'emulator'
- $ANDROID_HOME/tools/bin/sdkmanager 'system-images;android-22;default;armeabi-v7a'
# Create and start emulator as early as possible
- $ANDROID_HOME/tools/bin/avdmanager create avd --force --name test --package 'system-images;android-22;default;armeabi-v7a' --abi armeabi-v7a --device 'Nexus 4' --sdcard 128M
- $ANDROID_HOME/emulator/emulator -avd test -skin 768x1280 -no-audio -no-window &
- $ANDROID_HOME/tools/bin/sdkmanager 'build-tools;23.0.3'
- $ANDROID_HOME/tools/bin/sdkmanager 'platforms;android-23'
- $ANDROID_HOME/tools/bin/sdkmanager 'platforms;android-22' # for emulator
- $ANDROID_HOME/tools/bin/sdkmanager 'extras;android;m2repository'
- $ANDROID_HOME/tools/bin/sdkmanager 'extras;google;m2repository'
- $ANDROID_HOME/tools/bin/sdkmanager 'extras;google;google_play_services'
- $ANDROID_HOME/tools/bin/sdkmanager ndk-bundle
# Download the emulator support stuff
- mkdir -p $HOME/.cache/ci-support
- curl -L https://github.com/connectbot/ci-support/archive/master.zip -z $HOME/.cache/ci-support/master.zip -o $HOME/.cache/ci-support/master.zip
- unzip -oq $HOME/.cache/ci-support/master.zip -d $HOME
# For the lint checking mechanism
- mkdir -p $HOME/.cache/lint
### The rest of the commands need the emulator running
- android-wait-for-emulator
- adb shell input keyevent 82 &
# Install our ci-support stuff to make the emulator tests more reliable.
- adb install -r $HOME/ci-support-master/apk/android_emulator_hacks.apk
- adb shell pm grant no.finn.android_emulator_hacks android.permission.SET_ANIMATION_SCALE
- adb shell am start -n no.finn.android_emulator_hacks/no.finn.android_emulator_hacks.HackActivity
script:
# Split up to reduce memory requirements
- ./gradlew --stacktrace clean
- ./gradlew --stacktrace assemble
- ./gradlew --stacktrace check
- ./gradlew --stacktrace connectedCheck
- ./scripts/check-lint-count.bash app/build/reports/lint-results.xml $HOME/.cache/lint/lint-results.xml
after_success: ./gradlew coveralls