forked from zarelint/cordova-plugin-googlemaps
-
Notifications
You must be signed in to change notification settings - Fork 8
/
.travis.yml
98 lines (85 loc) · 2.48 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
sudo: false
env:
global:
- NODE_VERSION="10.12.0"
- ANDROID_API="28"
- ANDROID_BUILD_TOOLS="28.0.3"
- CORDOVA_VERSION="9.0.0"
notifications:
email: false
before_cache:
# Do not cache a few Gradle files/directories (see https://docs.travis-ci.com/user/languages/java/#Caching)
- rm -f $HOME/.gradle/caches/modules-2/modules-2.lock
- rm -fr $HOME/.gradle/caches/*/plugin-resolution/
cache:
directories:
# Gradle dependencies
- $HOME/.gradle/caches/
- $HOME/.gradle/wrapper/
# Android directory
- $HOME/.android
# NVM
- $HOME/.nvm
matrix:
include:
- os: linux
env: CORDOVA_PLATFORM="browser"
language: node_js
node_js: '${NODE_VERSION}'
- if: branch = master
os: osx
env: CORDOVA_PLATFORM="ios"
language: objective-c
cache:
- bundler
- cocoapods
node_js: '${NODE_VERSION}'
osx_image: xcode9.4
before_script:
- exist=$(which ios-deploy); if [[ -z "${exist}" ]]; then
npm -g install ios-deploy > /dev/null;
fi
- if: branch = master
env: CORDOVA_PLATFORM="android"
os: linux
node_js: '${NODE_VERSION}'
language: android
jdk: oraclejdk8
android:
components:
- tools
- android-${ANDROID_API}
- platform-tools
# The BuildTools version used by your project
- build-tools-${ANDROID_BUILD_TOOLS}
# The SDK version used to compile your project
- android-${ANDROID_API}
# Additional components
- extra-android-m2repository
- extra-google-m2repository
- sys-img-x86-android-${ANDROID_API}
licenses:
- 'android-sdk-license-.+'
- '.+'
install:
- exist=$(which nvm); if [[ -z "${exist}" ]]; then
rm -rf ~/.nvm > /dev/null;
git clone https://github.com/creationix/nvm.git ~/.nvm > /dev/null;
(cd ~/.nvm && git checkout `git describe --abbrev=0 --tags` > /dev/null);
source ~/.nvm/nvm.sh && nvm > /dev/null;
fi
- exist=$(nvm list | grep ${NODE_VERSION}); if [[ -z "${exist}" ]]; then
nvm install ${NODE_VERSION} > /dev/null;
fi
- nvm use ${NODE_VERSION} > /dev/null;
- node --version
- exist=$(which cordova); if [[ -z "${exist}" ]]; then
npm -g install cordova@${CORDOVA_VERSION} > /dev/null;
fi
- cordova --version
- exist=$(which cordova-paramedic); if [[ -z "${exist}" ]]; then
npm -g install https://github.com/apache/cordova-paramedic;
fi
- npm i > /dev/null
script:
- /bin/bash build_test.sh