language: rust
sudo: false

env:
  global:
    - secure: XE8/HJkcnRHyb6qxVcdWsztCMgvuGwtVpLhfvtv0lefq+BgdHCYvEWEalyxM5OPvex/oGsSwVXIPX1bs0F54DTV/vLb3F317yX01p3fzB4DhzC/p9RTTgwQyOIVW1oU/qbsc6szlyzKDZ75JICqhIthhDnKdiTOkGMmGM6+gJDc=

script:
  - cargo build --release --verbose
  - cargo test --verbose
  - cargo doc --verbose

after_script:
  - curl http://www.rust-ci.org/artifacts/put?t=$RUSTCI_TOKEN | sh

language: rust
sudo: false

env:
  global:
    - secure: d+r3ZOcTpOSMfY5Udey1E1De93HiuLnsH29+/cHu0Rtp+1cEfh3VYvEca2P1AJZes0ujodnQkYjh7P3ySZmhNRq//UIxXBcQ8mM9hmXDLf68mFButXaQ/hPP0YyiuZ+TEaX7SVMkljYrKcpzxWG1eowJeEhg+nTf3zZH27ZOEX0=

script:
  - cargo build --release --verbose
  - cargo test --verbose

before_deploy:
  - cargo doc --verbose
  - cargo package --verbose

deploy:
  provider: releases
  api-key:
    secure: SCvJD8WFvhaK1tSpigmVvbuKlGobfAvw/cDbZE59a0dj3hNfBqb/BiWuZ6goZq33ZBT4d+fvxc3rE846VopcURtIUmtF2wxVdFmMUF5t4N4dXv+YvZ2l0KKXD+HxzI4aUYQepQJmcP/01omjD/mYQB+lRBWQHEu/E1IdyoiLU7c=
  file: target/package/roaring-*.crate
  skip_cleanup: true
  on:
    tags: true
    all_branches: true

after_deploy:
  - git checkout gh-pages
  - mv target/doc docs/$TRAVIS_TAG
  - git add docs/$TRAVIS_TAG
  - git commit -m "Add API docs for $TRAVIS_TAG"
  - git push $GITHUB_TOKEN@github.com/$TRAVIS_REPO_SLUG gh-pages

Add crate and doc deploy for version tags
Add crate and doc deploy for version tags
