-
Notifications
You must be signed in to change notification settings - Fork 3
/
.travis.yml
117 lines (104 loc) · 3.44 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
language: android
jdk: oraclejdk8
if: type == pull_request OR tag IS present OR type == cron
env:
global:
- API_LEVEL=28
- EMULATOR_LEVEL=25
- BUILD_TOOLS_VERSION=28.0.3
- ABI=x86
android:
components:
- tools
- platform-tools
- build-tools-${BUILD_TOOLS_VERSION}
- android-${API_LEVEL}
- android-${EMULATOR_LEVEL}
- sys-img-${ABI}-android-${EMULATOR_LEVEL}
licenses:
- android-sdk-preview-license-.+
- android-sdk-license-.+
- google-gdk-license-.+
cache:
directories:
- $HOME/.gradle/caches/
- $HOME/.gradle/wrapper/
- $HOME/.android/build-cache
before_install:
- yes | sdkmanager "platforms;android-28"
stages:
- name: compile tools
- name: compile and test uikit
- name: compile and test modules
- name: compile and test sample app
# TODO: MS-5902
#- name: ui tests
- name: deploy
if: tag =~ ^\d+\.\d+\.\d+$
jobs:
include:
- stage: compile tools
name: tool-annotation-processor
script: ./gradlew :tool-annotation-processor:check
- stage: compile tools
name: tool-viewmodel-factory
script: ./gradlew :tool-viewmodel-factory:check
- stage: compile and test uikit
name: uikit-views
script: ./gradlew :uikit-views:check
- stage: compile and test uikit
name: uikit-viewmodels
script: ./gradlew :uikit-viewmodels:check
- stage: compile and test modules
name: module-common
script: ./gradlew :module-common:check
- stage: compile and test modules
name: module-browsemap
script: ./gradlew :module-browsemap:check
- stage: compile and test modules
name: module-navigation
script: ./gradlew :module-navigation:check
- stage: compile and test modules
name: module-search
script: ./gradlew :module-search:check
- stage: compile and test sample app
name: sample-app
script:
- ./gradlew :app-samples:check
# TODO: MS-5902
# - stage: ui tests
# name: sample-app
# before_script:
# - echo no | android create avd --force -n test -t android-${EMULATOR_LEVEL} --abi ${ABI} -c 1024M
# - emulator -avd test -memory 1500 -no-accel -gpu swiftshader -skin 720x1280 -camera-back none -camera-front none -no-boot-anim -no-window &
# - android-wait-for-emulator
# - adb shell input keyevent 82 &
# script:
# - ./gradlew :app-samples:connectedAndroidTest -P"sygic.sdk.key"=$SYGIC_API_KEY
# after_failure:
# - adb -e logcat -d '*:E';
- stage: deploy
name: assembleRelease
before_script:
- echo $RELEASE_KEYSTORE_BASE64 | base64 -d > $RELEASE_KEYSTORE_FILE
- echo $GP_KEY_JSON_BASE64 | base64 -d > $GP_KEY_JSON_FILE
script:
- ./gradlew clean assembleRelease bintrayUpload publishReleaseApk -PbintrayUser=$BINTRAY_USERNAME -PbintrayKey=$BINTRAY_KEY -P"sygic.sdk.key"=$SYGIC_API_KEY
deploy:
provider: releases
api_key: $TRAVIS_RELEASE
name: SygicMapsKit Android $TRAVIS_TAG
file_glob: true
file:
- $TRAVIS_BUILD_DIR/app/samples/build/outputs/apk/release/*.apk
- $TRAVIS_BUILD_DIR/modules/common/build/outputs/aar/*.aar
- $TRAVIS_BUILD_DIR/modules/browsemap/build/outputs/aar/*.aar
- $TRAVIS_BUILD_DIR/modules/navigation/build/outputs/aar/*.aar
- $TRAVIS_BUILD_DIR/modules/search/build/outputs/aar/*.aar
- $TRAVIS_BUILD_DIR/uikit/views/build/outputs/aar/*.aar
- $TRAVIS_BUILD_DIR/uikit/viewmodels/build/outputs/aar/*.aar
- $TRAVIS_BUILD_DIR/tools/viewmodel-factory/build/outputs/aar/*.aar
skip_cleanup: true
on:
all_branches: true
tags: true