juniper/.travis.yml
2016-09-11 21:12:31 +02:00

74 lines
3 KiB
YAML

language: rust
cache: cargo
rust:
- stable
- beta
- nightly
matrix:
allow_failures:
- rust: nightly
env:
global:
- secure: "oqpp/KM1HSfFwMC0Zzi2ui7nKcWg7hD7zBHsd+TuPm7Ghs8sEskfIN2I+jt+N7GZW8txfyvd8k+ActUVZAExzNfNaYPppHB+EEeOk7+KybKi9KU8GLQhIWXhN7SBbIEyqy7TVJxs/019a2v6oxt+uFYu4G7rh7PA3cZOyHOW/aTdpg/JUcTT4qow2Ki5Ghq7JQJ2bWAJAyXM476y5gT/wo5SMyfguOfn/Yvon0D0HDW/RmxaJ92ogdQmvW27f36n/6E8kFkhe9BpfjguUM1kUqJeMmfS1ZOppIkOyh7j5FP0jU5/NXhtM35KmyA5KMU2G2ruLmRswhD+LG2nmR7CwfOqloNT0Cn5ZNbAw0kojE/MKWgA/cHNFUfaSbdaOaq+niBIzyrbVhHJSjbBnXi9YnqLwPDzG591l3LtQyRySA7XBG6CL4YaqXvOJ39591ROxtZKWyE10jvFINWtwxxIKceJpKCX90ymQAlZsxTaMx/N9YH3Ljq2zJLTf7aYKZwVEnn/WsOcV37b/HS9cL19E2g8DbajOb4ihK+mU0HxC+iC6BbgD4jQTvl6Yce6sJA9FBDzo0LnXv9McocV+vogOv78fVUSuGzw04EzYKRijClozrVwbUWZsALau9GDELls/dJ82x/756JZKjYyacHgPucxSA7LX7wIwZtTtSZnq78="
script:
- cargo build --verbose
- cargo build --verbose --release
- cargo build --verbose --features iron-handlers
- cargo build --verbose --features iron-handlers --release
- cargo test --verbose --features iron-handlers
- cargo test --verbose --features iron-handlers --release
before_deploy:
- rm -rf target/package/
- cargo package --verbose
after_success: |
if [ "$TRAVIS_BRANCH" = master -a "$TRAVIS_PULL_REQUEST" = false -a "$TRAVIS_RUST_VERSION" = stable ]; then
set -e
cargo doc --features iron-handlers
mkdir -p ~/.ssh
openssl aes-256-cbc -K $encrypted_7258158212d8_key -iv $encrypted_7258158212d8_iv -in _build/travis-juniper.enc -out ~/.ssh/id_rsa -d
chmod 600 ~/.ssh/id_rsa
git clone --branch gh-pages git@github.com:mhallin/juniper deploy_docs
cd deploy_docs
git config user.name 'Juniper Documentation Builder'
git config user.email 'nobody@example.com'
rm -rf *
mv ../target/doc/* .
echo '<meta http-equiv="refresh" content="0; url=juniper/index.html">' > index.html
git add -A *
git commit -qm 'Update documentation for Juniper'
git push -q origin gh-pages
fi
deploy:
provider: releases
api_key:
secure: "qsMOCWmD3+y30loMSqeEZrNvy2NQaIi4TixRtu7cZyOZwal4nzHJPhozDjbm3Po59s8lH7JaIuzpVJ62bfI/BHk+ZjXU+q93cHrVqiDtf6tScOMn6TYnVcF4Af36dYKNgjOXufT01cHQXWTBUW5oEYaL7z69d7UYFhYnFo54Dd5YA5Y1vTPFEC/nLD7wdnedG1y6V0vAkXQ0tgMauUx6JJ6iids4QVTT6wIFiZDV0vilHqRNjM9WkFTS9JQHsOwdLN71Ry1rxm4/PukUm4Ly/Ouup2i0buJa0FdZW/1Ym1Db4CitvrnulCjSahkNMPjRaQDiuYCuEq+PiVu0n6gucNS/WlC41qLl6TGjAWGlKKCQz2KnBweGYtghLuUujBPCLpkMEDf/XH+sDfiV6S5Fe6MbgcF/zGccqXwh4LFh1MIU389ZX6UDukF3Ovx5xsE8ha84RyNgzDfT1if/vAXJXaPODxk5/KKP/pvUpvQR2hGz6KhzMTGT/WPN49uW/WAHUEze2ZwuqVH7u8JubtHuGif1PReUnGzEK3o7CUb+Cd4/X9tnKd8cJxV2qU7MFORZbmZQ5qk7VcBQ4ur3uGpenQZQyAdTEgJaznLxjOW3brZ/JDe56QrAi6WzBGrfd26kgg2GmdQq7TACSryjAD4oH6hM4JAmYpPYLn8hXlzO4FE="
file: target/package/juniper-$TRAVIS_TAG.crate
skip_cleanup: true
on:
tags: true
branch: master
condition: "$TRAVIS_RUST_VERSION = stable"
after_deploy:
- cargo publish --token "$CRATES_IO_TOKEN"
before_cache:
rm -rf target/debug/juniper*
rm -rf target/release/juniper*
rm -rf target/package/