A Cargo feature `runtime` is added, which is enabled by default, that includes the following: - The `client::HttpConnector`, which uses `tokio::net::TcpStream`. - The `server::AddrStream`, which uses `tokio::net::TcpListener`. - The `hyper::rt` module, which includes useful utilities to work with the runtime without needing to import `futures` or `tokio` explicity. Disabling the feature removes many of these niceties, but allows people to use hyper in environments that have an alternative runtime, without needing to download an unused one.
58 lines
1.8 KiB
YAML
58 lines
1.8 KiB
YAML
language: rust
|
|
sudo: false
|
|
dist: trusty
|
|
matrix:
|
|
fast_finish: true
|
|
include:
|
|
- rust: nightly
|
|
env: FEATURES="--features nightly"
|
|
- rust: beta
|
|
- rust: stable
|
|
env: HYPER_DOCS=1
|
|
- rust: stable
|
|
env: FEATURES="--no-default-features"
|
|
- rust: 1.21.0
|
|
|
|
cache:
|
|
apt: true
|
|
|
|
script:
|
|
- ./.travis/readme.py
|
|
- cargo build $FEATURES
|
|
- 'if [ "$BUILD_ONLY" != "1" ]; then cargo test $FEATURES; fi'
|
|
- 'if [ $TRAVIS_RUST_VERSION = nightly ]; then for f in ./benches/*.rs; do cargo test --bench $(basename $f .rs) $FEATURES; done; fi'
|
|
|
|
addons:
|
|
apt:
|
|
packages:
|
|
- libcurl4-openssl-dev
|
|
- libelf-dev
|
|
- libdw-dev
|
|
- binutils-dev
|
|
- libiberty-dev
|
|
|
|
|
|
after_success:
|
|
- '[ "$HYPER_DOCS" = "1" ] &&
|
|
LOCAL="~/.local" && export PATH=$LOCAL/bin:$PATH &&
|
|
wget https://github.com/SimonKagstrom/kcov/archive/master.tar.gz &&
|
|
tar xzf master.tar.gz && mkdir kcov-master/build && cd kcov-master/build &&
|
|
cmake -DCMAKE_INSTALL_PREFIX:PATH=$LOCAL .. && make && make install && cd ../.. &&
|
|
ls target/debug &&
|
|
RUSTFLAGS="-C link-dead-code" cargo test --no-run &&
|
|
for file in target/debug/*; do
|
|
if [[ -x $file ]]; then
|
|
mkdir -p "target/cov/$(basename $file)";
|
|
kcov --exclude-pattern=/.cargo,/usr/lib --verify "target/cov/$(basename $file)" "$file";
|
|
fi;
|
|
done &&
|
|
kcov --coveralls-id=$TRAVIS_JOB_ID --merge target/cov target/cov/*'
|
|
- '[ $TRAVIS_PULL_REQUEST = false ] && [ "$HYPER_DOCS" = "1" ] &&
|
|
{ [ "$TRAVIS_TAG" != "" ] || [ "$TRAVIS_BRANCH" == "master" ]; } &&
|
|
./.travis/docs.sh'
|
|
|
|
env:
|
|
global:
|
|
- RUST_BACKTRACE=1
|
|
- secure: KipdEhZsGIrb2W0HsDbC95x8FJ1RKEWPq8uSK8wSZwGw6MtvoZDX0edfrtf4o3/skA0h84yn35ZWF/rpo1ZEesgFY1g+l+me+jtyGvMwEsXTGjNP4oNR2MrDizjO8eYDm4hRUCLEmJVvsq4j7oNVdLGHfdrcnwqk8/NxJsRzqXM=
|