2016-09-11 11:41:29 -05:00
|
|
|
language: rust
|
2016-09-11 13:53:01 -05:00
|
|
|
cache: cargo
|
2016-09-11 11:41:29 -05:00
|
|
|
|
|
|
|
rust:
|
2017-02-04 04:52:27 -06:00
|
|
|
- stable
|
|
|
|
- beta
|
|
|
|
- nightly
|
|
|
|
|
2017-06-14 02:08:01 -05:00
|
|
|
# Prevent accidentally breaking older Rust versions
|
|
|
|
- 1.17.0
|
2017-06-14 02:24:37 -05:00
|
|
|
- 1.18.0
|
2016-09-11 13:31:16 -05:00
|
|
|
|
2016-09-11 11:41:29 -05:00
|
|
|
matrix:
|
2016-09-11 13:31:16 -05:00
|
|
|
allow_failures:
|
|
|
|
- rust: nightly
|
2016-09-11 11:41:29 -05:00
|
|
|
|
2016-09-11 14:12:31 -05:00
|
|
|
env:
|
|
|
|
global:
|
2016-09-11 14:55:16 -05:00
|
|
|
- secure: "SsepHEYRmW9ee3RhxPpqGuPigZINFfA/yOwUJFseQt4t+Zs90r1xdl3Q8eDfPlnvBsL7Rd0QQrFDO7JUaimVLlgQkUnrl62o0CYzkodp+qtocyAHS00W6WTqi8Y6E6KBxPshCl03dRLaySUfx5TqTLTIHkJ0G6vDW35k7hRrA3221lRphs5rrpvAZ21pqsDsNLH3HVo792L6A0kOtBa3ocw1pgHLxnBbArIViu2htUuFvY/TgsmVbAdlow0efw/xkcJ/p0/r5q7igLek6Iqk8udfRc7CktvoiFQ2vUnhtNtQu/zYll3Q7OUx5d+w5lhbzz2QINmsezBEisH9k1haL7dMviLPp0pn4WZed60KovO0Iqfgjy1utTaKvJVfNWYsgkfU8c9a/z2rcZOKwXNKQW2ptBrtVjaB9dk7eMoyuFCDZwNtKqvG+ZKmvMpun+R8mmx+buOmN8Vlf5ygIoGxz3nbEtlLYGVTXHfdXXqRkFIwtiYVJEO7SLRKT9pbx1E++ARsi2+y8bXJT4e4z0osYMq9EsiFUpw3J2gcshrgseqkB7UgCZ3SXuitJnJNfDAU3a3nwwS/JiAunZMNnC4rKUBbl7WbTB4Cpw7EgVOlCqcyyzlkNl3xabLzTFzLOfSHLTVX5FmGNsD21vBoS5/8ejftx9wuV3rGHxuO3i3+A3k="
|
2016-09-11 14:12:31 -05:00
|
|
|
|
2016-09-12 13:57:42 -05:00
|
|
|
script:
|
2017-06-14 08:59:36 -05:00
|
|
|
# Build library standalone, with Iron, and with Rocket integrations enabled, respectively
|
2017-06-24 06:21:11 -05:00
|
|
|
- cargo build --all --verbose
|
|
|
|
- cargo build --all --verbose --features iron-handlers
|
2017-06-14 08:59:36 -05:00
|
|
|
- |
|
|
|
|
if [ "$TRAVIS_RUST_VERSION" = "nightly" ]; then
|
2017-06-24 06:21:11 -05:00
|
|
|
cargo build --all --verbose --features rocket-handlers
|
2017-06-14 08:59:36 -05:00
|
|
|
fi
|
|
|
|
|
|
|
|
# Build example binaries; first Iron, then Rocket examples
|
2017-06-24 06:21:11 -05:00
|
|
|
- cargo build --all --verbose --example server --features "iron-handlers expose-test-schema"
|
2017-06-14 08:59:36 -05:00
|
|
|
- |
|
|
|
|
if [ "TRAVIS_RUST_VERSION" = "nightly" ]; then
|
2017-06-24 06:21:11 -05:00
|
|
|
cargo build --all --verbose --example rocket-server --features "rocket-handlers expose-test-schema"
|
2017-06-14 08:59:36 -05:00
|
|
|
fi
|
|
|
|
|
|
|
|
# Run all tests for the base library and available integrations
|
|
|
|
- export TEST_FEATURES="iron-handlers expose-test-schema"
|
|
|
|
- |
|
|
|
|
if [ "$TRAVIS_RUST_VERSION" = "nightly" ]; then
|
2017-06-14 11:21:05 -05:00
|
|
|
export TEST_FEATURES="$TEST_FEATURES rocket-handlers rocket/testing"
|
2017-06-14 08:59:36 -05:00
|
|
|
fi
|
|
|
|
|
2017-06-24 06:21:11 -05:00
|
|
|
- cargo test --all --verbose --features "$TEST_FEATURES"
|
2017-06-14 08:59:36 -05:00
|
|
|
|
2016-09-11 13:53:01 -05:00
|
|
|
|
2017-06-14 03:28:41 -05:00
|
|
|
before_deploy:
|
|
|
|
- rm -rf target/package/
|
|
|
|
- cargo package --verbose
|
|
|
|
|
2016-09-11 14:12:31 -05:00
|
|
|
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*
|
2016-09-11 14:20:35 -05:00
|
|
|
rm -rf target/debug/libjuniper*
|
|
|
|
rm -rf target/debug/.fingerprint/juniper*
|
|
|
|
|
2016-09-11 14:12:31 -05:00
|
|
|
rm -rf target/release/juniper*
|
2016-09-11 14:20:35 -05:00
|
|
|
rm -rf target/release/libjuniper*
|
|
|
|
rm -rf target/release/.fingerprint/juniper*
|
|
|
|
|
2016-09-11 14:12:31 -05:00
|
|
|
rm -rf target/package/
|