Skip to content

Commit

Permalink
travis add fir.im
Browse files Browse the repository at this point in the history
  • Loading branch information
Richard-Cao committed Jul 29, 2016
1 parent 442c329 commit 4ce16b7
Show file tree
Hide file tree
Showing 6 changed files with 49 additions and 52 deletions.
94 changes: 48 additions & 46 deletions .travis.yml
@@ -1,57 +1,59 @@
matrix:
include:
- os: osx
language: objective-c
sudo: false
osx_image: xcode7.3
- os: linux
language: android
sudo: required
jdk: oraclejdk8
android:
components:
- build-tools-23.0.1
- android-23
- extra-android-m2repository
- extra-android-support
- os: osx
language: objective-c
sudo: false
osx_image: xcode7.3
- os: linux
language: android
sudo: required
jdk: oraclejdk8
android:
components:
- build-tools-23.0.1
- android-23
- extra-android-m2repository
- extra-android-support
env:
global:
- PROJECT_MOBILE=reading
- PROJECT_MOBILE=reading
cache:
directories:
- reading/node_modules
- reading/node_modules
before_install:
- openssl aes-256-cbc -K $encrypted_549897007358_key -iv $encrypted_549897007358_iv
-in .travis/id_rsa.enc -out ~/.ssh/id_rsa -d
- chmod 600 ~/.ssh/id_rsa
- eval $(ssh-agent)
- ssh-add ~/.ssh/id_rsa
- cp .travis/ssh_config ~/.ssh/config
- if [[ $TRAVIS_OS_NAME == 'osx' ]]; then brew update ; fi
- if [[ $TRAVIS_OS_NAME == 'linux' ]]; then sudo apt-get update ; fi
- rvm get head
- openssl aes-256-cbc -K $encrypted_549897007358_key -iv $encrypted_549897007358_iv
-in .travis/secrets.tar.enc -out secrets.tar -d
- tar xvf secrets.tar
- if [[ $TRAVIS_OS_NAME == 'linux' ]]; then mv gradle.properties android ; fi
- if [[ $TRAVIS_OS_NAME == 'linux' ]]; then mv reading.keystore android/app ; fi
- if [[ $TRAVIS_OS_NAME == 'osx' ]]; then brew update ; fi
- if [[ $TRAVIS_OS_NAME == 'linux' ]]; then sudo apt-get update ; fi
- rvm get head
- gem install fir-cli
install:
- if [[ $TRAVIS_OS_NAME == 'osx' ]]; then brew reinstall watchman xctool ; fi
- if [[ $TRAVIS_OS_NAME == 'osx' ]]; then mkdir -p /Users/travis/build/reading/.nvm ; fi
- if [[ $TRAVIS_OS_NAME == 'osx' ]]; then export NVM_DIR="/Users/travis/build/reading/.nvm" ; fi
- if [[ $TRAVIS_OS_NAME == 'osx' ]]; then brew install nvm ; fi
- if [[ $TRAVIS_OS_NAME == 'osx' ]]; then source $(brew --prefix nvm)/nvm.sh ; fi
- if [[ $TRAVIS_OS_NAME == 'linux' ]]; then curl -o- https://raw.githubusercontent.com/creationix/nvm/v0.30.0/install.sh | bash ; fi
- if [[ $TRAVIS_OS_NAME == 'linux' ]]; then source ~/.bashrc ; fi
- nvm install 5
- npm config set spin=false
- npm config set progress=false
- travis_wait npm install
- if [[ $TRAVIS_OS_NAME == 'osx' ]]; then brew reinstall watchman xctool ; fi
- if [[ $TRAVIS_OS_NAME == 'osx' ]]; then mkdir -p /Users/travis/build/reading/.nvm
; fi
- if [[ $TRAVIS_OS_NAME == 'osx' ]]; then export NVM_DIR="/Users/travis/build/reading/.nvm"
; fi
- if [[ $TRAVIS_OS_NAME == 'osx' ]]; then brew install nvm ; fi
- if [[ $TRAVIS_OS_NAME == 'osx' ]]; then source $(brew --prefix nvm)/nvm.sh ; fi
- if [[ $TRAVIS_OS_NAME == 'linux' ]]; then curl -o- https://raw.githubusercontent.com/creationix/nvm/v0.30.0/install.sh | bash ; fi
- if [[ $TRAVIS_OS_NAME == 'linux' ]]; then source ~/.bashrc ; fi
- nvm install 5
- npm config set spin=false
- npm config set progress=false
- travis_wait npm install
branches:
only:
- master
- master
script:
# react-native-wechat library maybe throw ios error: 'RCTBridgeModule.h' file not found
- npm run lint app
- npm test
- if [[ $TRAVIS_OS_NAME == 'osx' ]]; then xctool \
-project ios/$PROJECT_MOBILE.xcodeproj \
-scheme $PROJECT_MOBILE -sdk iphonesimulator9.3
test ; fi
- if [[ $TRAVIS_OS_NAME == 'linux' ]]; then cd android && ./gradlew test --stacktrace ; fi

- npm run lint app
- npm test
- if [[ $TRAVIS_OS_NAME == 'osx' ]]; then xctool -project ios/$PROJECT_MOBILE.xcodeproj
-scheme $PROJECT_MOBILE -sdk iphonesimulator9.3 test ; fi
- if [[ $TRAVIS_OS_NAME == 'linux' ]]; then cd android && ./gradlew clean && ./gradlew resguard --stacktrace
; fi
after_success:
- if [[ $TRAVIS_OS_NAME == 'linux' ]]; then fir p /home/travis/build/attentiveness/reading/android/app/build/outputs/apk/AndResGuard_app-armeabi-v7a-release/app-armeabi-v7a-release_signed_7zip_aligned.apk
-T $FIR_TOKEN -c "$TRAVIS_TAG" ; fi
Binary file removed .travis/id_rsa.enc
Binary file not shown.
Binary file added .travis/secrets.tar.enc
Binary file not shown.
5 changes: 0 additions & 5 deletions .travis/ssh_config

This file was deleted.

Binary file removed android/app/doc/zipalign
Binary file not shown.
2 changes: 1 addition & 1 deletion android/build.gradle
Expand Up @@ -5,7 +5,7 @@ buildscript {
jcenter()
}
dependencies {
classpath 'com.android.tools.build:gradle:1.5.0'
classpath 'com.android.tools.build:gradle:1.3.1'
classpath 'com.tencent.mm:AndResGuard-gradle-plugin:1.1.9'
// NOTE: Do not place your application dependencies here; they belong
// in the individual module build.gradle files
Expand Down

0 comments on commit 4ce16b7

Please sign in to comment.