language: rust
sudo: false
cache: cargo
rust:
- 1.45.0
- stable
- beta
- nightly
os:
- linux
- osx
matrix:
allow_failures:
- rust: nightly
fast_finish: true
before_script:
- rustup toolchain install nightly-2020-07-12
- rustup component add rustfmt --toolchain nightly-2020-07-12
- rustup component add clippy --toolchain nightly-2020-07-12
- if [[ "$TRAVIS_OS_NAME" = "osx" ]]; then
brew update;
brew install llvm;
export PATH="/usr/local/opt/llvm/bin:$PATH";
export LDFLAGS="-L/usr/local/opt/llvm/lib";
export CPPFLAGS="-I/usr/local/opt/llvm/include";
fi
script:
- cargo +nightly-2020-07-12 fmt --all -- --check
- CC="clang" cargo +nightly-2020-07-12 clippy --all-features -- -D warnings
- cargo build --verbose
- export RUST_BACKTRACE=1
- cargo test --all --verbose
- cargo test --lib --no-default-features --verbose
- cargo test --lib --no-default-features --features "db-dup-sort" --verbose
- cargo test --lib --no-default-features --features "db-int-key" --verbose
- cargo test --release --all --verbose
- ./run-all-examples.sh