# Copied from https://github.com/kennytm/extprim/blob/master/.travis.yml :) language: rust sudo: false addons: apt: packages: - libcurl4-openssl-dev - libelf-dev - libdw-dev - binutils-dev - gcc-multilib os: - linux - osx rust: - 1.8.0 - 1.9.0 - nightly env: matrix: - ARCH=x86_64 - ARCH=i686 matrix: allow_failures: - env: ARCH=i686 rust: 1.8.0 # Note: on 1.8.0, all i686 build panics with the message "Box", cause all `should_panic` tests to fail. install: - if [ "$TRAVIS_OS_NAME" = 'linux' ]; then OS=unknown-linux-gnu; else OS=apple-darwin; fi - SYSROOT=$(rustc --print sysroot) - export HOST=$ARCH-$OS - | if [ ! -d "$SYSROOT/lib/rustlib/$HOST" ]; then curl -SfLO "https://static.rust-lang.org/dist/rust-$TRAVIS_RUST_VERSION-$HOST.tar.gz" && tar xf "rust-$TRAVIS_RUST_VERSION-$HOST.tar.gz" "rust-$TRAVIS_RUST_VERSION-$HOST/rust-std-$HOST/lib/rustlib/$HOST" && mv "rust-$TRAVIS_RUST_VERSION-$HOST/rust-std-$HOST/lib/rustlib/$HOST" "$SYSROOT/lib/rustlib" fi script: - cargo test --target "$HOST" - if [ "$TRAVIS_RUST_VERSION" = 'nightly' ]; then cargo bench --target "$HOST" --features bench; fi after_success: - export PATH=$HOME/.cargo/bin:$HOME/.local/bin:$PATH - cargo install cargo-kcov - cargo kcov --print-install-kcov-sh | bash - cargo kcov --target "$HOST" --coveralls -- --verify