-
Notifications
You must be signed in to change notification settings - Fork 71
/
.travis.yml
88 lines (80 loc) · 2.26 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
aliases:
- &android
components:
- build-tools-28.0.3
- android-29
- 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-baidumap-sdk@next
jobs:
include:
- stage: "build test for example"
language: android
android: *android
before_cache:
- rm ~/.gradle/caches/modules-2/modules-2.lock
cache: *android-cache
script:
- ./scripts/download-sdk.sh
- nvm install node
- npm i && npm i typescript
- npm run build
- cd android && TERM=dumb ./gradlew build
- ls -lh app/build/outputs/apk/debug
- ls -lh app/build/outputs/apk/release
# - stage: "build test for example"
# language: objective-c
# os: osx
# osx_image: xcode11.3
# cache: *ios-cache
# script:
# - npm i && npm i typescript
# - npm run build
# - cd ios && pod install && cd ..
# - npm run run-ios
- stage: "build test for new project"
language: android
android: *android
before_cache:
- rm ~/.gradle/caches/modules-2/modules-2.lock
cache: *android-cache
script:
- nvm install node
- npx react-native init app && cd app
- npm i react-native-amap3d@next
- cd android && TERM=dumb ./gradlew build
- ls -lh app/build/outputs/apk/debug
- ls -lh app/build/outputs/apk/release
- stage: "build test for new project"
language: objective-c
os: osx
osx_image: xcode11.3
cache: *ios-cache
script:
- npm i && npm i typescript
- npx react-native init app && cd app
- npm i react-native-amap3d@next
- cd ios && pod install && cd ..
- npx react-native run-ios
stages:
- "test js"
- name: "build test for example"
if: branch = master
- name: "build test for new project"
if: branch = release