forked from qiuxiang/react-native-amap3d
-
Notifications
You must be signed in to change notification settings - Fork 1
/
.travis.yml
112 lines (103 loc) · 3.1 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
aliases:
- &android
components:
- build-tools-23.0.1
- android-23
- extra-android-m2repository
- extra-android-support
- &android-cache
directories:
- ~/.cache/yarn
- ~/.gradle/caches/modules-2
- ~/.gradle/wrapper
- &ios-cache
directories:
- ~/.rncache
- ~/Library/Caches/Yarn
- ~/Library/Caches/CocoaPods
- &init-new-project
|
nvm install node
yarn global add react-native-cli
react-native init App --version="0.52.3"
cd App
yarn add react-native-amap3d
jobs:
include:
- stage: "test js"
language: node_js
node_js: node
cache: yarn
- stage: "build test for example"
language: android
jdk: oraclejdk8
android: *android
before_cache:
- rm ~/.gradle/caches/modules-2/modules-2.lock
cache: *android-cache
script:
- nvm install node
- yarn
- cd android
- ./gradlew build
- ls -l app/build/outputs/apk
- stage: "build test for example"
language: objective-c
osx_image: xcode9.3
cache: *ios-cache
before_install:
script:
- nvm install node
- brew install yarn
- yarn
- cd ios
- pod install --repo-update
- xcodebuild -workspace RNAMap3D.xcworkspace -scheme RNAMap3D -sdk iphonesimulator -quiet
- stage: "build test for new project"
language: android
jdk: oraclejdk8
android: *android
before_cache:
- rm ~/.gradle/caches/modules-2/modules-2.lock
cache: *android-cache
script:
- *init-new-project
- react-native link
- cd android
- ./gradlew build
- ls -l app/build/outputs/apk/
- stage: "build test for new project"
language: objective-c
osx_image: xcode9.3
cache: *ios-cache
script:
- brew install yarn
- *init-new-project
- cd ios
- |
cat << EOF > Podfile
platform :ios, '8.0'
target 'App' do
pod 'React', :path => '../node_modules/react-native', :subspecs => [
'Core',
'CxxBridge',
'DevSupport',
'RCTText',
'RCTNetwork',
'RCTWebSocket',
]
pod 'yoga', :path => '../node_modules/react-native/ReactCommon/yoga'
pod 'DoubleConversion', :podspec => '../node_modules/react-native/third-party-podspecs/DoubleConversion.podspec'
pod 'GLog', :podspec => '../node_modules/react-native/third-party-podspecs/GLog.podspec'
pod 'Folly', :podspec => '../node_modules/react-native/third-party-podspecs/Folly.podspec'
pod 'react-native-amap3d', path: '../node_modules/react-native-amap3d/lib/ios'
end
EOF
- pod install --repo-update
- xcodebuild -workspace App.xcworkspace -scheme App -sdk iphonesimulator -quiet
stages:
- "test js"
- name: "build test for example"
if: branch = master
- name: "build test for new project"
if: branch = release