forked from retyui/react-native-ci-cd-compare
-
Notifications
You must be signed in to change notification settings - Fork 0
/
.travis.yml
74 lines (61 loc) · 2.12 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
env:
global:
- ANDROID_API_LEVEL=30
- ANDROID_BUILD_TOOLS_VERSION=30.0.2
- NODE_VERSION=16
matrix:
include:
- os: osx
podfile: ios/Podfile
language: objective-c
osx_image: xcode13.2
cache:
yarn: true
cocoapods: true
directories:
- node_modules
- ~/Library/Caches/CocoaPods
- ~/.cocoapods
script:
- cd ios
- pod install
- xcodebuild clean archive -workspace testCiCdReactNative.xcworkspace -scheme testCiCdReactNative -archivePath testCiCdReactNative.xcarchive CODE_SIGNING_ALLOWED=NO
- os: linux
language: android
dist: trusty
jdk: oraclejdk8
sudo: required
before_install:
- touch $HOME/.android/repositories.cfg
# Fix "Failed to install the following Android SDK packages as some licences have not been accepted."
- yes | sdkmanager "build-tools;30.0.2"
- yes | sdkmanager "platforms;android-30"
android:
licenses:
- 'android-sdk-preview-license-52d11cd2'
- 'android-sdk-license-.+'
- 'google-gdk-license-.+'
components:
# The SDK version used to compile your project, see `compileSdkVersion` in (android/build.gradle)
- android-$ANDROID_API_LEVEL
# The BuildTools version used by your project
- build-tools-$ANDROID_BUILD_TOOLS_VERSION
# Additional components
- extra-google-google_play_services
- extra-google-m2repository
- extra-android-m2repository
before_cache:
- rm -rf $HOME/.gradle/caches/modules-2/modules-2.lock
- rm -rf $HOME/.gradle/caches/*/plugin-resolution/
cache:
yarn: true
directories:
- $HOME/.gradle/caches/
- $HOME/.gradle/wrapper/
- $HOME/.android/build-cache/
- node_modules
script:
- cd android && ./gradlew bundleRelease assembleRelease
install:
- nvm install $NODE_VERSION && nvm use $NODE_VERSION && nvm alias default $NODE_VERSION && node --version && npm i -g yarn
- yarn install --frozen-lockfile