branches:
  only:
    - master
    - /^release-.*$/

language: objective-c
rvm: 2.0.0

bundler_args: --without documentation --without development --deployment --jobs=3 --retry=3

script:
  - if [[ "$SKIP_CI" != "YES" ]]; then
      fastlane ci_all;
    fi
  - if [[ "$UPDATE_DOCUMENTATION" == "YES" ]]; then
      fastlane update_docs;
    fi
  # This is a workaround for a Travis-CI bug where the log might get cut-off.
  # See the [Travis-CI issue #4716](https://github.com/travis-ci/travis-ci/issues/4716).
  - sleep 3

env:
  global:
    - LC_CTYPE=en_US.UTF-8
    - LANG=en_US.UTF-8
     # Make fastlane open the simulator before running tests. A workaround for error 65.
    - FASTLANE_EXPLICIT_OPEN_SIMULATOR=2
    - TEST_DEVICE_NAME="iPhone 6s"

matrix:
  fast_finish: true
  include:
    # Main job; builds and runs everything.
    - osx_image: xcode8
      env: UPDATE_DOCUMENTATION=YES
    # Compatibility job; makes sure the library is buildable by Xcode 7.3.1
    - osx_image: xcode7.3
      env: BUILD_DEMO_APP=NO

cache: bundler

notifications:
  email: false

branches:
  only:
    - master
    - /^release-.*$/

language: objective-c

bundler_args: --without documentation --without development --deployment --jobs=3 --retry=3

script:
  - if [[ "$SKIP_CI" != "YES" ]]; then
      fastlane ci_all;
    fi
  - if [[ "$UPDATE_DOCUMENTATION" == "YES" ]]; then
      fastlane update_docs;
    fi
  # This is a workaround for a Travis-CI bug where the log might get cut-off.
  # See the [Travis-CI issue #4716](https://github.com/travis-ci/travis-ci/issues/4716).
  - sleep 3

env:
  global:
    - LC_CTYPE=en_US.UTF-8
    - LANG=en_US.UTF-8
     # Make fastlane open the simulator before running tests. A workaround for error 65.
    - FASTLANE_EXPLICIT_OPEN_SIMULATOR=2
    - TEST_DEVICE_NAME="iPhone 6s"

matrix:
  fast_finish: true
  include:
    # Main job; builds and runs everything.
    - osx_image: xcode8
      rvm: 2.0.0
      env: UPDATE_DOCUMENTATION=YES
    # Compatibility job; makes sure the library is buildable by Xcode 7.3.1
    - osx_image: xcode7.3
      rvm: 2.0.0
      env: BUILD_DEMO_APP=NO

cache: bundler

notifications:
  email: false

Move Ruby version selection into matrix
Move Ruby version selection into matrix

- By having it at the top level we accidentally triggered 3 builds.
