-
Notifications
You must be signed in to change notification settings - Fork 0
/
.travis.yml
55 lines (49 loc) · 1.85 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
language: android
sudo: false
env:
global:
- ADB_INSTALL_TIMEOUT=20
- ANDROID_API_LEVEL=24
- ANDROID_BUILD_TOOLS_VERSION=24.0.1
- ANDROID_ABI=armeabi-v7a
- ANDROID_NDK=android-ndk-r10e
- QEMU_AUDIO_DRV=none # QEMU2 doesnt support -noaudio flag (https://stackoverflow.com/a/40605323/3270542)
android:
components:
- platform-tools
- tools
- build-tools-$ANDROID_BUILD_TOOLS_VERSION
- android-$ANDROID_API_LEVEL
- sys-img-$ANDROID_ABI-android-$ANDROID_API_LEVEL
addons:
apt:
sources:
- ubuntu-toolchain-r-test
packages:
# Latest GCC for gcov
- gcc-6
- ant
before_install:
# Download and build android-ndk
- curl -L http://dl.google.com/android/ndk/android-ndk-r10e-linux-x86_64.bin -O
- chmod u+x android-ndk-r10e-linux-x86_64.bin
- ./android-ndk-r10e-linux-x86_64.bin > /dev/null
- rm android-ndk-r10e-linux-x86_64.bin
# - export ANDROID_NDK_HOME=`pwd`/${ANDROID_NDK}
# - export PATH=${ANDROID_NDK_HOME}:${PATH}
# Download latest lcov package inside precise dist
- git clone https://github.com/linux-test-project/lcov.git
- gem install coveralls-lcov
before_script:
# Emulator Management: Create, Start and Wait
- echo no | android create avd --force -n test -t android-$ANDROID_API_LEVEL --abi $ANDROID_ABI
- emulator -avd test -no-window -no-boot-anim & # -cpu-delay 0 depricated
- android-wait-for-emulator
script:
- $ANDROID_NDK/ndk-build APP_ABI=$ANDROID_ABI
- ant test
after_success:
# Send coverage report
- adb pull /data/local/tmp$TRAVIS_BUILD_DIR/obj/local/$ANDROID_ABI/objs-debug/unittests/ obj/local/$ANDROID_ABI/objs-debug/
- lcov/bin/lcov --capture --directory obj/local/$ANDROID_ABI/objs-debug/unittests/ --output-file coverage.info -b jni/src/ --gcov-tool /usr/bin/gcov-6 --no-external --no-recursion
- coveralls-lcov -t $COVERALLS_REPO_TOKEN coverage.info