Skip to content

Commit

Permalink
Add travis
Browse files Browse the repository at this point in the history
  • Loading branch information
RobertSasak committed Sep 30, 2019
1 parent aad3f18 commit 013d7d8
Showing 1 changed file with 78 additions and 0 deletions.
78 changes: 78 additions & 0 deletions .travil.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,78 @@
matrix:
include:
- language: android
jdk: oraclejdk8
before_install:
- nvm install 8
- echo yes | sdkmanager "platforms;android-28"
- curl -o- -L https://yarnpkg.com/install.sh | bash -s -- --version 1.16.0
- export PATH=$HOME/.yarn/bin:$PATH
android:
components:
- tools
- platform-tools
- build-tools-28.0.3
- tools
cache:
bundler: true
yarn: true
directories:
- example/node_modules
- $HOME/.gradle/caches/
- $HOME/.gradle/wrapper/
before_cache:
- rm -f example/node_modules/react-native-openalpr/
- rm -f $HOME/.gradle/caches/modules-2/modules-2.lock
- rm -fr $HOME/.gradle/caches/*/plugin-resolution/
- os: osx
osx_image: xcode10.2
node_js: 8
cache:
bundler: true
yarn: true
cocoapods: true
directories:
- example/node_modules
- $HOME/Library/Caches/Homebrew
before_cache:
- rm -f example/node_modules/react-native-openalpr/
- brew cleanup
podfile: example/ios/Podfile

before_install:
- curl -o- -L https://yarnpkg.com/install.sh | bash -s -- --version 1.16.0
- export PATH=$HOME/.yarn/bin:$PATH

install:
- cd $TRAVIS_BUILD_DIR/example
- yarn install
- echo $TRAVIS_OS_NAME
- |
if [ "$TRAVIS_OS_NAME" == "osx" ]; then
cd $TRAVIS_BUILD_DIR/example/ios
pod install
pod update
gem install xcpretty
fi
script:
- |
if [ "$TRAVIS_OS_NAME" == "osx" ]; then
cd $TRAVIS_BUILD_DIR/example/ios
set -o pipefail
rm -f build
xcodebuild -arch x86_64 -sdk iphonesimulator12.2 -workspace ./RNOpenALPRExample.xcworkspace -scheme RNOpenALPRExample | xcpretty -c
fi
- |
if [ "$TRAVIS_OS_NAME" == "linux" ]; then
cd $TRAVIS_BUILD_DIR/example/android
TERM=dumb ./gradlew assemble
fi
deploy:
provider: npm
email: [email protected]
api_key:
secure: TO-BE-ADDED-LATER
on:
tags: true
repo: robertsasak/react-native-openalpr
branch: master

0 comments on commit 013d7d8

Please sign in to comment.