forked from qiuxiang/react-native-amap3d
-
Notifications
You must be signed in to change notification settings - Fork 0
/
.travis.yml
122 lines (113 loc) · 3.49 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
aliases:
- &android
components:
- build-tools-28.0.3
- android-28
- 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.58.4"
cd App
yarn add react-native-amap3d@next
jobs:
include:
- stage: "test js"
language: node_js
node_js: node
cache: yarn
script:
- node node_modules/react-native/local-cli/cli.js bundle --entry-file index.js --bundle-output bundle.js
- ls -lh bundle.*
- 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 -lh app/build/outputs/apk
- stage: "build test for example"
language: objective-c
osx_image: xcode10.1
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 -lh app/build/outputs/apk/
- stage: "build test for new project"
language: objective-c
osx_image: xcode10.1
cache: *ios-cache
script:
- brew install yarn
- *init-new-project
- cd ios
- |
cat << EOF > Podfile
platform :ios, '9.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
post_install do |installer|
installer.pods_project.targets.each do |target|
if target.name == "React"
target.remove_from_project
end
end
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