test_full.sh 1.5 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849
  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. # They all should build with minimal features too
  10. for package in bigint complex integer iter rational traits; do
  11. cargo build --manifest-path $package/Cargo.toml --no-default-features
  12. cargo test --manifest-path $package/Cargo.toml --no-default-features
  13. done
  14. # Each isolated feature should also work everywhere.
  15. for feature in '' bigint rational complex; do
  16. cargo build --verbose --no-default-features --features="$feature"
  17. cargo test --verbose --no-default-features --features="$feature"
  18. done
  19. # Build test for the serde feature
  20. cargo build --verbose --features "serde"
  21. # Downgrade serde and build test the 0.7.0 channel as well
  22. cargo update -p serde --precise 0.7.0
  23. cargo build --verbose --features "serde"
  24. if [ "$TRAVIS_RUST_VERSION" = 1.8.0 ]; then exit; fi
  25. # num-derive should build on 1.15.0+
  26. cargo build --verbose --manifest-path=derive/Cargo.toml
  27. if [ "$TRAVIS_RUST_VERSION" != nightly ]; then exit; fi
  28. # num-derive testing requires compiletest_rs, which requires nightly
  29. cargo test --verbose --manifest-path=derive/Cargo.toml
  30. # num-macros only works on nightly, soon to be deprecated
  31. cargo build --verbose --manifest-path=macros/Cargo.toml
  32. cargo test --verbose --manifest-path=macros/Cargo.toml
  33. # benchmarks only work on nightly
  34. cargo bench --verbose