Improve Travis.

This commit is contained in:
kennytm 2017-05-22 20:32:13 +08:00
parent 0e1c1fe1f6
commit fab0705ef8

View file

@ -1,8 +1,7 @@
# Copied from https://github.com/kennytm/extprim/blob/master/.travis.yml :)
language: rust language: rust
sudo: false
sudo: false
dist: trusty
addons: addons:
apt: apt:
packages: packages:
@ -10,6 +9,7 @@ addons:
- libelf-dev - libelf-dev
- libdw-dev - libdw-dev
- binutils-dev - binutils-dev
- libiberty-dev
- gcc-multilib - gcc-multilib
os: os:
@ -21,28 +21,22 @@ rust:
- beta - beta
- nightly - nightly
env: matrix:
matrix: allow_failures:
- ARCH=x86_64 - rust: beta
- ARCH=i686
install: install:
- if [ "$TRAVIS_OS_NAME" = 'linux' ]; then OS=unknown-linux-gnu; else OS=apple-darwin; fi - if [ "$TRAVIS_OS_NAME" = 'linux' ]; then OS=unknown-linux-gnu; else OS=apple-darwin; fi
- export HOST=$ARCH-$OS - rustup target add i686-$OS
- curl -SfLO "https://static.rust-lang.org/rustup/dist/$HOST/rustup-init"
- chmod u+x rustup-init
- ./rustup-init -y --default-host "$HOST" --default-toolchain "$TRAVIS_RUST_VERSION"
- export PATH=$HOME/.cargo/bin:$HOME/.local/bin:$PATH
- rustc -vV
- cargo -vV
script: script:
- cargo test --no-default-features - cargo test --no-default-features
- cargo test - cargo test
- if [ "$TRAVIS_RUST_VERSION" = 'nightly' ]; then cargo bench --features=bench; fi - if [ "$TRAVIS_RUST_VERSION" = 'nightly' ]; then cargo bench --features=bench; fi
- cargo test --target i686-$OS
after_success: after_success:
- cargo install cargo-kcov - cargo install cargo-kcov
- cargo kcov --print-install-kcov-sh | bash - cargo kcov --print-install-kcov-sh | bash
- cargo kcov --coveralls -- --verify - cargo kcov --coveralls