forked from apache/incubator-weex
-
Notifications
You must be signed in to change notification settings - Fork 0
/
.travis.yml
122 lines (122 loc) · 3.33 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
119
120
121
122
os:
- osx
- linux
language: node_js
node_js: 7.6
rvm: 2.0.0
env:
- TEST_SUITE=ios
- TEST_SUITE=danger
- TEST_SUITE=jsfm
- TEST_SUITE=android
- TEST_SUITE=release
matrix:
fast_finish: true
exclude:
- os: linux
env: TEST_SUITE=ios
- os: osx
env: TEST_SUITE=danger
- os: osx
env: TEST_SUITE=jsfm
- os: osx
env: TEST_SUITE=android
- os: osx
env: TEST_SUITE=ios
- os: linux
env: TEST_SUITE=android
- os: osx
env: TEST_SUITE=release
- os: linux
env: TEST_SUITE=release
include:
- os: osx
env: TEST_SUITE=release
osx_image: xcode8.1
language: objective-c
- os: osx
env: TEST_SUITE=ios
osx_image: xcode8.1
language: objective-c
- os: linux
env: TEST_SUITE=android
jdk: oraclejdk8
language: android
android:
components:
- platform-tools
- tools
- build-tools-23.0.3
- android-23
- extra-google-m2repository
- extra-android-m2repository
- sys-img-armeabi-v7a-android-22
cache:
directories:
- node_modules
- $HOME/.m2
- $HOME/.gradle
before_script:
- |
if [[ $TEST_SUITE = "android" ]]; then
curl -o- https://raw.githubusercontent.com/creationix/nvm/v0.33.2/install.sh | bash
nvm install 7.0
npm install
fi
- |
if [[ $TEST_SUITE = "ios" ]]; then
brew update
fi
- |
if [[ $TEST_SUITE = "release" ]]; then
brew update
#manual install android sdk
brew cask install android-sdk
brew install gradle
export ANDROID_HOME=/usr/local/share/android-sdk
export PATH=$PATH:$ANDROID_HOME/tools:$ANDROID_HOME/tools/bin:$ANDROID_HOME/platform-tools
echo yes | sdkmanager platform-tools
echo yes | sdkmanager tools #tools
echo yes | sdkmanager "build-tools;23.0.3" #build-tool
echo yes | sdkmanager "platforms;android-23" #compile target
echo yes | sdkmanager "extras;android;m2repository" #support
fi
script:
- |
if [[ $TEST_SUITE = "android" ]]; then
cd android
./gradlew clean assembleDebug :weex_sdk:testDebugUnitTest --info -PdisableCov=true -Dorg.gradle.daemon=true -Dorg.gradle.parallel=true -Dorg.gradle.jvmargs="-Xmx512m -XX:+HeapDumpOnOutOfMemoryError" -Dfile.encoding=UTF-8 &&
cd $TRAVIS_BUILD_DIR
fi
- |
if [[ $TEST_SUITE = "ios" ]]; then
xcodebuild -project ios/sdk/WeexSDK.xcodeproj test -scheme WeexSDKTests CODE_SIGN_IDENTITY="" CODE_SIGNING_REQUIRED=NO -destination 'platform=iOS Simulator,name=iPhone 6'
fi
- |
if [[ $TEST_SUITE = "jsfm" ]]; then
npm run build &&
npm run test
fi
- |
if [[ $TEST_SUITE = "danger" ]]; then
npm run danger
fi
- |
if [[ $TEST_SUITE = "release" ]]; then
bash scripts/generate_apache_release.sh &&
cd apache_release_temp &&
bash scripts/build_from_source.sh &&
cd $TRAVIS_BUILD_DIR
fi
notifications:
webhooks:
on_pull_requests: false
urls:
- https://oapi.dingtalk.com/robot/send?access_token=5a6be5eb6ad180fa4d04bdda0b24857ee49c3dd985361efdf0964aa9134ee623
on_success: never
on_failure: always
email:
recipients:
on_success: never
on_failure: always