language: rust
rust:
- stable
- beta
- nightly
os:
- linux
- osx
# from http://hoverbear.org/2015/03/07/rust-travis-github-pages/
after_success: |
  [ $TRAVIS_BRANCH = master ] &&
  [ $TRAVIS_PULL_REQUEST = false ] &&
  cargo doc &&
  echo "<meta http-equiv=refresh content=0;url=human_name/index.html>" > target/doc/index.html &&
  sudo pip install ghp-import &&
  ghp-import -n target/doc &&
  git push -fq https://${GH_TOKEN}@github.com/${TRAVIS_REPO_SLUG}.git gh-pages
env:
  global:
    secure: BdT/2UF6nfn07X2oycWW6SNPUrYJHXwcm0rTngcj/t24GsbmJKMUS6ekQ525lUC+BYWnVb4479+c7hu9SM6XXXFsfTfadc/Wz4lBlDKQJxfFdzyO3lZ1ZjwW8VZspVVhZsFURskvoVhCVfv9A92kQyoCpzpCyZrIf1ggw9U1GcSIfH9KUbGhHMVPyVoztFUpS7BBc/SwyyIJLbQfAiFSGTczmRAYXzo/DbEgS5I8lnJ20PN2evxC31ZE9auoKLsNaB4/2WT4rWAYLQeDP/ZC2qzQVnzeTBz4N5CA8kUmDdiAWssnnOAb30OgjFbwCVA7ZWUkFRZyYF0p99DxNaK2LvCSk3VQYXjA+9BiqUS1O98jNLY+kx0ZyLqS4KiZ5qBIBMZavZg8Tsn6zE8PgSn1NSKTC8F5870QxPrdniCMj6jz5umg9yn/pnqEeWGlz5u6B2edxBW7F2QS1R04jY4r+1hrnKORzH+XEM4VuO1tuOiCRiiA1SQLAwozn9kMPLs1YVPg1VbZRACoWAcjdBrPFWQ2oD2eJs2joZsZc11dak7NayI+JXeNv6LfO53MJXjahjxBWtLwzmIhZOCARJdF/4tHH2HKOssZinfScFuFUnm1L3yj4PMxLe1opdSIlt4HkTe2WRNkpt4Qn8OUWh40RcU6KJqie4UVzL2tjPbt7Jk=
before_deploy:
  cargo build --release
deploy:
  provider: releases
  api_key: $GH_TOKEN
  file:
    - target/release/human_name
    - target/release/libhuman_name.so
    - target/release/libhuman_name.dylib
  skip_cleanup: true
  on:
    branch: master
    rust: nightly
    tags: true
