test_full.sh 810 B

123456789101112131415161718192021222324252627
  1. #!/bin/bash
  2. set -ex
  3. echo Testing num-traits on rustc ${TRAVIS_RUST_VERSION}
  4. # num-traits should build and test everywhere.
  5. cargo build --verbose
  6. cargo test --verbose
  7. # test `no_std`
  8. cargo build --verbose --no-default-features
  9. cargo test --verbose --no-default-features
  10. if [[ "$TRAVIS_RUST_VERSION" =~ ^(nightly|beta|stable)$ ]]; then
  11. # test `i128`
  12. cargo build --verbose --features=i128
  13. cargo test --verbose --features=i128
  14. # test with std and libm (libm build fails on Rust 1.26 and earlier)
  15. cargo build --verbose --features "libm"
  16. cargo test --verbose --features "libm"
  17. # test `no_std` with libm (libm build fails on Rust 1.26 and earlier)
  18. cargo build --verbose --no-default-features --features "libm"
  19. cargo test --verbose --no-default-features --features "libm"
  20. fi