language: python
cache: cargo
os:
- linux
env:
- TRAVIS_RUST_VERSION=nightly
- TRAVIS_RUST_VERSION=beta
- TRAVIS_RUST_VERSION=stable
python:
- "3.7"
- "3.8"
before_script:
- |
curl https://sh.rustup.rs -sSf | sh -s -- --default-toolchain=$TRAVIS_RUST_VERSION --profile=minimal -y &&
export PATH=$PATH:$HOME/.cargo/bin &&
travis_wait rustup component add rustfmt &&
travis_wait rustup component add clippy &&
PYTHON_LIB=$(python -c "import sysconfig; print(sysconfig.get_config_var('LIBDIR'))") &&
export LD_LIBRARY_PATH="$LD_LIBRARY_PATH:$PYTHON_LIB" &&
echo $LD_LIBRARY_PATH
script:
- |
cargo test --all &&
cargo doc --no-deps &&
cargo clippy --all --tests -- --deny clippy::all &&
cargo fmt -- --check