test_full.sh 1.3 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243
  1. #!/bin/bash
  2. set -ex
  3. echo Testing num on rustc ${TRAVIS_RUST_VERSION:=$1}
  4. # All of these packages should build and test everywhere.
  5. for package in bigint complex integer iter rational traits; do
  6. cargo build --manifest-path $package/Cargo.toml
  7. cargo test --manifest-path $package/Cargo.toml
  8. done
  9. # Each isolated feature should also work everywhere.
  10. for feature in '' bigint rational complex; do
  11. cargo build --verbose --no-default-features --features="$feature"
  12. cargo test --verbose --no-default-features --features="$feature"
  13. done
  14. # Build test for the serde feature
  15. cargo build --verbose --features "serde"
  16. # Downgrade serde and build test the 0.7.0 channel as well
  17. cargo update -p serde --precise 0.7.0
  18. cargo build --verbose --features "serde"
  19. if [ "$TRAVIS_RUST_VERSION" = 1.8.0 ]; then exit; fi
  20. # num-derive should build on 1.15.0+
  21. cargo build --verbose --manifest-path=derive/Cargo.toml
  22. if [ "$TRAVIS_RUST_VERSION" != nightly ]; then exit; fi
  23. # num-derive testing requires compiletest_rs, which requires nightly
  24. cargo test --verbose --manifest-path=derive/Cargo.toml
  25. # num-macros only works on nightly, soon to be deprecated
  26. cargo build --verbose --manifest-path=macros/Cargo.toml
  27. cargo test --verbose --manifest-path=macros/Cargo.toml
  28. # benchmarks only work on nightly
  29. cargo bench --verbose