This repository has been archived by the owner on Mar 26, 2024. It is now read-only.
-
Notifications
You must be signed in to change notification settings - Fork 220
/
.travis.yml
94 lines (83 loc) · 2.7 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
language: android
sudo: required
jdk: oraclejdk8
addons:
sonarqube:
branches:
- master
- develop
env:
global:
- ANDROID_API=26
- EMULATOR_API=26
- ANDROID_BUILD_TOOLS=26.0.2
- ADB_INSTALL_TIMEOUT=5
android:
components:
- tools
- platform-tools
- build-tools-$ANDROID_BUILD_TOOLS
- android-$ANDROID_API
- android-$EMULATOR_API_LEVEL
- extra-google-m2repository
- extra-android-m2repository
- extra-android-support
- extra-google-google_play_services
- addon-google_apis-google-19
- sys-img-armeabi-v7a-addon-google_apis-google-$ANDROID_API_LEVEL
- sys-img-armeabi-v7a-addon-google_apis-google-$EMULATOR_API_LEVEL
licenses:
- android-sdk-preview-license-.+
- android-sdk-license-.+
- google-gdk-license-.+
before_install:
- openssl aes-256-cbc -K $encrypted_1f39e1523faf_key -iv $encrypted_1f39e1523faf_iv -in secrets.tar.enc -out secrets.tar -d
- tar xvf secrets.tar
# - sudo apt-get update
install:
# - sudo apt-get install python-numpy
before_script:
# Compile OpenCV and set it to path
# - wget https://github.com/opencv/opencv/archive/3.2.0.zip
# - unzip 3.2.0.zip >/dev/null
# - mv opencv-3.2.0 opencv
# - cd opencv
# - mkdir build
# - cd build
# - cmake -DCMAKE_BUILD_TYPE=Release -DCMAKE_INSTALL_PREFIX=/usr/local -DBUILD_SHARED_LIBS=OFF -DBUILD_EXAMPLES=OFF -DBUILD_TESTS=OFF -DBUILD_PERF_TESTS=OFF -DBUILD_opencv_python=OFF .. >/dev/null
# - make -j8 >/dev/null
# - sudo make -j8 install >/dev/null
# - cd ../..
# - mkdir opencv_lib
# - cp opencv/build/lib/libopencv_java320.so opencv_lib/libopencv_java320.so
# - export LD_LIBRARY_PATH=$LD_LIBRARY_PATH:$PWD/opencv_lib/
- chmod +x gradlew
script:
# Compile and run lint
- ./gradlew clean assembleProdRelease lint --stacktrace
# Deploy app to Google Play
- if [ "$TRAVIS_BRANCH" == "develop" ]; then ./gradlew publishApkDevRelease; fi
- if [ "$TRAVIS_BRANCH" == "master" ]; then ./gradlew publishApkProdRelease; fi
# Run test coverage report
# - ./gradlew jacocoTestMockDebugUnitTestReport
# Run SonarQube analysis
# - ./gradlew sonarqube
# Build test app
# ./gradlew assembleAndroidTest
# Create and lunch emulator
# - echo no | android create avd --force -n test -t $ANDROID_TARGET --abi $ANDROID_ABI
# - emulator -avd test -no-audio -no-window &
# - android-wait-for-emulator
# - adb shell setprop dalvik.vm.dexopt-flags v=n,o=v
# - ./gradlew connectedMockDebugAndroidTest
after_success:
# - bash <(curl -s https://codecov.io/bash)
before_cache:
- rm -f $HOME/.gradle/caches/modules-2/modules-2.lock
- rm -fr $HOME/.gradle/caches/*/plugin-resolution/
cache:
directories:
- $HOME/.gradle/caches/
- $HOME/.gradle/wrapper/
- $HOME/.android/build-cache
- $HOME/.sonar/cache