Prerequisite is to have the build and deploy process already running and set-up via fastlane
.
Parallel Build Jobs
Has to be done because:
- You probably want to speed up the process
- The Mac Environment on Travis can’t build Android due to a Java version it bundles
Mac Environment
Travis has macOS environment where additional tools need to be installed: yarn
, react-native-cli
, watchman
, fastlane
:
1- name: "iOS App Build and Deploy to iTunesConnect"2 language: objective-c3 os: osx4 osx_image: xcode10.25 node_js:6 - "8"7 before_install:8 - brew update9 - brew install watchman10 - travis_retry npm install -g yarn11 - travis_retry npm install -g react-native-cli12 - gem install fastlane --version 2.112.0 --no-document --quiet
Android Environment
Travis has a Linux environment, with an additional support for Android.
1- name: "Android App Build and Deploy to Google Play"2 language: android3 components:4 - platform-tools5 - tools6 - extra-android-m2repository7 - extra-google-google_play_services8 - extra-google-m2repository9 - add-on10 - extra11 licenses:12 - android-sdk-preview-license-.+13 - android-sdk-license-.+14 - google-gdk-license-.+15 before_install:16 - nvm install 817 - travis_retry npm install -g yarn18 - travis_retry npm install -g react-native-cli19 - gem install fastlane --version 2.112.0 --no-document --quiet20 - touch $HOME/.android/repositories.cfg21 - yes | sdkmanager "platforms;android-27"22 - yes | sdkmanager "build-tools;27.0.3"23 - sudo apt-get install automake autoconf python-dev build-essential24 - git clone https://github.com/facebook/watchman.git25 - cd watchman26 - git checkout v4.9.027 - ./autogen.sh28 - ./configure29 - make30 - sudo make install31 - cd ..32 - echo fs.inotify.max_user_watches=524288 | sudo tee -a /etc/sysctl.conf && sudo sysctl -p