onig 3.1.1

Rust-Onig is a set of rust bindings for the oniguruma regular expression library.
Documentation
language: rust

os:
- osx
- linux

rust:
- stable
- beta
- nightly

branches:
  only:
    - master
env:
  - ONIG_FEATURES=

script:
- cargo build --features="$ONIG_FEATURES" --verbose
- |
  if [ "$TRAVIS_OS_NAME" == "linux" ]
  then
    p=$(cd ./target/debug/build/onig_sys-*/out/lib/ && pwd)
    echo "adding $p to linker path"
    export LD_LIBRARY_PATH="${p}:${LD_LIBRARY_PATH}"
  fi
- cargo test --features="$ONIG_FEATURES" --verbose
- cargo doc --features="$ONIG_FEATURES" --verbose

# Build the docs if we have had a successful master build
after_success:
- |
  if [ "$TRAVIS_PULL_REQUEST" == "false" ] && \
     [ "$TRAVIS_BRANCH" == "master" ] && \
     [ "$TRAVIS_OS_NAME" == "linux" ] && \
     [ "$TRAVIS_RUST_VERSION" == "stable" ]
  then
    git clone https://github.com/davisp/ghp-import
    ./ghp-import/ghp-import -n target/doc
    git push -fq https://$GH_TOKEN@github.com/rust-onig/rust-onig.git gh-pages
  fi

# Allow failures in the nightly build. We don't want to fail just
# because of Rust instability.
matrix:
  allow_failures:
    - rust: nightly
  include:
    - rust: stable
      os: osx
      env: RUSTONIG_STATIC_LIBONIG=1
    - rust: stable
      os: linux
      env: RUSTONIG_STATIC_LIBONIG=1
    - rust: nightly
      os: linux
      env: ONIG_FEATURES=std-pattern
    - rust: nightly
      os: osx
      env: ONIG_FEATURES=std-pattern