fd/.travis.yml
2017-10-22 10:38:20 +02:00

116 lines
2.9 KiB
YAML

language: rust
cache: cargo
matrix:
allow_failures:
- rust: nightly
include:
# Stable channel.
- os: linux
rust: stable
env: TARGET=x86_64-unknown-linux-gnu
- os: linux
rust: stable
env: TARGET=x86_64-unknown-linux-musl
- os: linux
rust: stable
env: TARGET=i686-unknown-linux-gnu
- os: linux
rust: stable
env: TARGET=i686-unknown-linux-musl
- os: osx
rust: stable
env: TARGET=x86_64-apple-darwin
# Beta channel.
- os: linux
rust: beta
env: TARGET=x86_64-unknown-linux-gnu
# Disabled to reduce total CI time
# - os: linux
# rust: beta
# env: TARGET=x86_64-unknown-linux-musl
# - os: linux
# rust: beta
# env: TARGET=i686-unknown-linux-gnu
# - os: linux
# rust: beta
# env: TARGET=i686-unknown-linux-musl
# - os: osx
# rust: beta
# env: TARGET=x86_64-apple-darwin
# Nightly channel.
- os: linux
rust: nightly
env: TARGET=x86_64-unknown-linux-gnu
# Disabled to reduce total CI time
# - os: linux
# rust: nightly
# env: TARGET=x86_64-unknown-linux-musl
# - os: linux
# rust: nightly
# env: TARGET=i686-unknown-linux-gnu
# - os: linux
# rust: nightly
# env: TARGET=i686-unknown-linux-musl
# - os: osx
# rust: nightly
# env: TARGET=x86_64-apple-darwin
# Minimum Rust supported channel.
- os: linux
rust: 1.19.0
env: TARGET=x86_64-unknown-linux-gnu
- os: linux
rust: 1.19.0
env: TARGET=x86_64-unknown-linux-musl
- os: linux
rust: 1.19.0
env: TARGET=i686-unknown-linux-gnu
- os: linux
rust: 1.19.0
env: TARGET=i686-unknown-linux-musl
- os: osx
rust: 1.19.0
env: TARGET=x86_64-apple-darwin
# Code formatting check
- os: linux
rust: stable
# skip the global install step
install:
- which cargo-install-update || cargo install cargo-update
- cargo install-update rustfmt
script: cargo fmt -- --write-mode=diff
- os: linux
rust: nightly
# skip the global install step
install:
- which cargo-install-update || cargo install cargo-update
- cargo install-update rustfmt-nightly
script: cargo fmt -- --write-mode=diff
addons:
apt:
packages:
# needed for i686-unknown-linux-gnu target
- gcc-multilib
env:
global:
# Default target on travis-ci.
# Used as conditional check in the install stage
- HOST=x86_64-unknown-linux-gnu
install:
# prevent target re-add error from rustup
- if [[ $TRAVIS_OS_NAME = linux && $HOST != $TARGET ]]; then rustup target add $TARGET; fi
script:
# Incorporate TARGET env var to the build and test process
- cargo build --target $TARGET --verbose
- cargo test --target $TARGET --verbose
notifications:
email:
on_success: never