language: rust
matrix:
include:
- os: linux
rust: stable
dist: trusty
- os: linux
env: TARGET=armv7-unknown-linux-gnueabihf
rust: stable
dist: trusty
- os: linux
env: TARGET=arm-linux-androideabi
rust: stable
dist: trusty
- os: linux
env: TARGET=x86_64-apple-darwin
rust: stable
dist: trusty
- os: linux
env: TARGET=i686-unknown-linux-gnu
rust: stable
dist: trusty
- os: linux
env: TARGET=i686-unknown-linux-musl
rust: stable
dist: trusty
- os: linux
rust: nightly
dist: trusty
- os: linux
env: TARGET=armv7-unknown-linux-gnueabihf
rust: nightly
dist: trusty
- os: linux
env: TARGET=arm-linux-androideabi
rust: nightly
dist: trusty
- os: linux
env: TARGET=x86_64-apple-darwin
rust: nightly
dist: trusty
- os: linux
env: TARGET=i686-unknown-linux-gnu
rust: nightly
dist: trusty
- os: linux
env: TARGET=i686-unknown-linux-musl
rust: nightly
dist: trusty
- os: osx
rust: stable
- os: osx
rust: nightly
script:
- rustc --version
- sysctl -a | grep mem
- if [[ "$TRAVIS_RUST_VERSION" == "nightly" ]]; then
(rustup component add clippy-preview && cargo clippy) || touch clippy_install_failed;
fi
- if [[ "$TRAVIS_OS_NAME" == "osx" ]]; then
cargo build --features debug;
elif [[ -n "$TARGET" ]]; then
rustup target add $TARGET;export EXTRA="--target=$TARGET";
fi
- echo $EXTRA
- if [[ -n "$EXTRA" ]]; then
RUST_BACKTRACE=1 cargo check $EXTRA;
else
RUST_BACKTRACE=1 cargo build;
fi
- if [[ "$TRAVIS_RUST_VERSION" == "nightly" && -z "$EXTRA" ]]; then
RUST_BACKTRACE=1 cargo bench;
fi
- if [[ -z "$EXTRA" ]]; then
RUST_BACKTRACE=1 cargo test;
fi
- cd examples
- if [[ -z "$EXTRA" ]]; then
RUST_BACKTRACE=1 cargo build;
fi
- if [[ "$TRAVIS_RUST_VERSION" == "nightly" && -z "$EXTRA" && ! -f clippy_install_failed ]]; then
cargo clippy $EXTRA || echo "clippy failed";
fi
- cd ..
- if [[ -z "$EXTRA" ]]; then
make;
fi
- if [[ -z "$EXTRA" ]]; then
LD_LIBRARY_PATH=./target/debug ./simple;
fi