language: rust
sudo: false
script:
  - cargo build --verbose --features="$FEATURE"
  - cargo test --verbose --features="$FEATURE"
  - cargo doc --features="$FEATURE"
after_success: |
  [ $TRAVIS_BRANCH = master ] &&
  [ $TRAVIS_PULL_REQUEST = false ] &&
  echo '<meta http-equiv=refresh content=0;url=uuid/index.html>' > target/doc/index.html &&
  pip install ghp-import --user $USER &&
  $HOME/.local/bin/ghp-import -n target/doc &&
  git push -qf https://${TOKEN}@github.com/${TRAVIS_REPO_SLUG}.git gh-pages
env:
  global:
    secure: OiQj6NSyu634pS+qWCAeaibuBdiRsDMz5k0bi8hhdom3W24L8I9KkdWlBm2K8Ef97Uzgg6Xsr7LSWX0CONxX2eU3QaB1v3mXNxModa7ftW/w9y7B8MThxS5nRTUmHZC17OvoQ3EoNyrktnTAkyIr0E0YxBruJYAi4EH+54guRN8=
  matrix:
    - FEATURE=""
    - FEATURE="v5"
notifications:
  email:
    on_success: never

language: rust
sudo: false
script:
  - cargo build --verbose --features="$FEATURE"
  - cargo test --verbose --features="$FEATURE"
  - cargo doc --features="$FEATURE"
after_success: |
  [ $TRAVIS_BRANCH = master ] &&
  [ $TRAVIS_PULL_REQUEST = false ] &&
  cargo doc --features="v5" &&  # build a full documentation
  echo '<meta http-equiv=refresh content=0;url=uuid/index.html>' > target/doc/index.html &&
  pip install ghp-import --user $USER &&
  $HOME/.local/bin/ghp-import -n target/doc &&
  git push -qf https://${TOKEN}@github.com/${TRAVIS_REPO_SLUG}.git gh-pages
env:
  global:
    secure: OiQj6NSyu634pS+qWCAeaibuBdiRsDMz5k0bi8hhdom3W24L8I9KkdWlBm2K8Ef97Uzgg6Xsr7LSWX0CONxX2eU3QaB1v3mXNxModa7ftW/w9y7B8MThxS5nRTUmHZC17OvoQ3EoNyrktnTAkyIr0E0YxBruJYAi4EH+54guRN8=
  matrix:
    - FEATURE=""
    - FEATURE="v5"
notifications:
  email:
    on_success: never

Build a documentation with all features after all tests success
Build a documentation with all features after all tests success
