mirror of
https://github.com/tokio-rs/tokio.git
synced 2026-08-23 00:00:10 +02:00
This patch adds a `blocking` to `tokio-threadpool`. This function serves as a way to annotate sections of code that will perform blocking operations. This informs the thread pool that an additional thread needs to be spawned to replace the current thread, which will no longer be able to process the work queue.
99 lines
3.1 KiB
YAML
99 lines
3.1 KiB
YAML
---
|
|
language: rust
|
|
sudo: false
|
|
cache:
|
|
- apt
|
|
- cargo
|
|
addons:
|
|
apt:
|
|
packages:
|
|
# to x-compile miniz-sys from sources
|
|
- gcc-multilib
|
|
|
|
matrix:
|
|
include:
|
|
# This represents the minimum Rust version supported by Tokio. Updating this
|
|
# should be done in a dedicated PR and cannot be greater than two 0.x
|
|
# releases prior to the current stable.
|
|
- rust: 1.21.0
|
|
- rust: stable
|
|
- rust: beta
|
|
- rust: nightly
|
|
- os: osx
|
|
- env: TARGET=x86_64-unknown-freebsd
|
|
- env: TARGET=i686-unknown-freebsd
|
|
- env: TARGET=i686-unknown-linux-gnu
|
|
|
|
script:
|
|
- |
|
|
set -e
|
|
if [[ "$TRAVIS_RUST_VERSION" == nightly ]]
|
|
then
|
|
# Pin the nightly version until rust-lang/rust#49436 is resolved.
|
|
rustup override set nightly-2018-03-26
|
|
|
|
# Make sure the benchmarks compile
|
|
cargo build --benches --all
|
|
|
|
export ASAN_OPTIONS="detect_odr_violation=0 detect_leaks=0"
|
|
export TSAN_OPTIONS="suppressions=`pwd`/ci/tsan"
|
|
|
|
# === tokio-timer ====
|
|
|
|
# Run address sanitizer
|
|
RUSTFLAGS="-Z sanitizer=address" \
|
|
cargo test -p tokio-timer --test hammer --target x86_64-unknown-linux-gnu
|
|
|
|
# Run thread sanitizer
|
|
RUSTFLAGS="-Z sanitizer=thread" \
|
|
cargo test -p tokio-timer --test hammer --target x86_64-unknown-linux-gnu
|
|
|
|
# === tokio-threadpool ====
|
|
|
|
# Run address sanitizer
|
|
RUSTFLAGS="-Z sanitizer=address" \
|
|
cargo test -p tokio-threadpool --tests
|
|
|
|
# Run thread sanitizer
|
|
RUSTFLAGS="-Z sanitizer=thread" \
|
|
cargo test -p tokio-threadpool --tests
|
|
fi
|
|
- |
|
|
set -e
|
|
if [[ "$TARGET" ]]
|
|
then
|
|
rustup target add $TARGET
|
|
cargo check --all --target $TARGET
|
|
cargo check --tests --all --target $TARGET
|
|
else
|
|
cargo test --all
|
|
# Disable these tests for now as they are buggy
|
|
#
|
|
# cargo test --features unstable-futures
|
|
# cargo test --manifest-path tokio-threadpool/Cargo.toml --features unstable-futures
|
|
# cargo test --manifest-path tokio-reactor/Cargo.toml --features unstable-futures
|
|
fi
|
|
|
|
before_deploy:
|
|
- cargo doc --all --no-deps
|
|
|
|
deploy:
|
|
provider: pages
|
|
skip_cleanup: true
|
|
github_token: $GH_TOKEN
|
|
target_branch: gh-pages
|
|
local_dir: target/doc
|
|
on:
|
|
branch: master
|
|
repo: tokio-rs/tokio
|
|
rust: stable
|
|
condition: $TRAVIS_OS_NAME = linux
|
|
|
|
env:
|
|
global:
|
|
- secure: iwlN1zfUCp/5BAAheqIRSFIqiM9zSwfIGcVDw/V7jHveqXyNzmCs7H58/cd90WLqonqpPX0t5GF66oTjms4v0DFjgXr/k4358qeSZaV082V3baNrVpCDHeCQV0SvKsfiYxDDJGSUL1WIUP+tqqDm4+ksZQP3LnwZojkABjWz5CBNt4kX+Wz5ZbYqtQoxyuZba5UyPY2CXJtubvCVPGMJULuUpklYxXZ4dWM2olzGgVJ8rE8udhSZ4ER4JgxB0KUx3/5TwHHzgyPEsWR4bKN6JzBjIczQofXUcUXXdoZBs23H/VhCpzKcn3/oJ8btVYPzwtdj5FmVB1aVR/gjPo2bSGi/sofq+LwL/1HJXkM+kjl8m2dLLcDBKqNYNERtVA1++LhkMWAFRgGYe8v8Ryxjiue1NF5LgAIA/fjK0uI1DELTzTf/TKrM+AtPDNTvhOft4/YD+hoImjwk6nv6PBb2TiTYnc79Qf4AZ65tv1qtsAUPuw4plLaccHQAO4ldYVXn4u9c+iisJwvovs6jo06bF3U3qtdI5gXsrI9+T25TrXvYb+IREo0MHzYEM0KlPFnscEArzC3eajuSd36ARFP3lDc+gp2RPs89iJjowms0eRyepp7Cu6XO3Cd2pfAX8AqvnmttZf4Nm51ONeiBPXPXItUkJm49MCpMJywU1IZcWZg=
|
|
|
|
notifications:
|
|
email:
|
|
on_success: never
|