forked from cordova-rtc/cordova-plugin-iosrtc
-
Notifications
You must be signed in to change notification settings - Fork 0
/
.travis.yml
118 lines (118 loc) · 3.95 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
118
sudo: required
branches:
only:
- master
git:
depth: 1
env:
global:
- CORDOVA_PLATFORM=browser
- NODE_VERSION=10
- CORDOVA_VERSION=8
- ANGULAR_CLI_VERSION=8
- IONIC_VERSION=6
- ANDROID_API_LEVEL=28
- ANDROID_SDK_VERSION=28
- ANDROID_BUILD_TOOLS_VERSION=28.0.3
- ANDROID_ABI=armeabi-v7a
- JAVA_HOME=/usr/lib/jvm/java-8-oracle
install:
- "nvm install $NODE_VERSION"
- "npm install -g gulp-cli"
- "npm install -g cordova@$CORDOVA_VERSION"
- "npm install -g @angular/cli@$ANGULAR_CLI_VERSION"
- "npm install -g @ionic/cli@$IONIC_VERSION"
- "npm install -g cordova-res"
- "npm ci"
matrix:
include:
- language: node_js
env: CORDOVA_PLATFORM=browser
node_js:
- "12"
cache:
directories:
- node_modules
- plugins
- platforms
- language: android
os: linux
env: CORDOVA_PLATFORM=android
jdk: oraclejdk8
dist: xenial
addons:
apt:
packages:
- oracle-java8-installer
- oracle-java8-set-default
- jq
android:
components:
- tools
- platform-tools-28.0.2
- platform-tools-29.0.2
# The BuildTools version used by your project
- build-tools-28.0.3
- build-tools-29.0.2
# The SDK version used to compile your project
- android-29
- android-28
# Additional components
- extra-google-google_play_services
- extra-google-m2repository
- extra-android-m2repository
# Specify at least one system image,
# if you need to run emulator(s) during your tests
licenses:
- android-sdk-preview-license-.+
- android-sdk-license-.+
- android-sdk-license-28
- android-sdk-license-29
- google-gdk-license-.+
before_install:
- export LANG=en_US.UTF-8
- touch $HOME/.android/repositories.cfg
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
- node_modules
- language: objective-c
os: osx
osx_image: xcode11
env: CORDOVA_PLATFORM=ios
before_install:
- rvm use system
#- sudo gem install bundler
#- sudo gem install xcpretty --no-rdoc --no-ri --no-document --quiet
#- sudo gem install xcpretty-travis-formatter --no-rdoc --no-ri --no-document --quiet
#- sudo gem install cocoapods --pre # Since Travis is not always on latest version
cache:
directories:
- node_modules
after_script:
# Test ios_arch
- "cordova platform remove $CORDOVA_PLATFORM --verbose"
- "cordova platform add $CORDOVA_PLATFORM@latest --verbose"
#- "cordova build $CORDOVA_PLATFORM --verbose --device"
script:
# Get current branch and repository
- export BRANCH=$(if [ "$TRAVIS_PULL_REQUEST" == "false" ]; then echo $TRAVIS_BRANCH; else echo $TRAVIS_PULL_REQUEST_BRANCH; fi)
- export REPO_SLUG=$(if [ "$TRAVIS_PULL_REQUEST" == "false" ]; then echo $TRAVIS_REPO_SLUG; else echo $TRAVIS_PULL_REQUEST_SLUG; fi)
# Lint and Build plugin
- "npm run lint"
- "gulp browserify"
# Test Plugin platform build with ionic
- "ionic start myApp blank; cd myApp;"
- "ionic cordova platform add $CORDOVA_PLATFORM@latest --verbose"
- "ionic cordova plugin add https://github.com/$REPO_SLUG.git#$BRANCH --verbose"
- "ionic cordova build $CORDOVA_PLATFORM --verbose"
# Test Plugin platform build with cordova only
- "cordova create myApp org.apache.cordova.myApp myApp; cd myApp;"
- "cordova platform add $CORDOVA_PLATFORM@latest --verbose"
- "cordova plugin add https://github.com/$REPO_SLUG.git#$BRANCH --verbose"
- "cordova build $CORDOVA_PLATFORM --verbose"