travis-test.sh 917 B

1234567891011121314151617181920212223242526272829303132333435
  1. #!/usr/bin/env bash
  2. # Exit on any error.
  3. set -ex
  4. test_version() {
  5. version=$1
  6. RUBY_CONFORMANCE=test_ruby
  7. if [[ $version == jruby-9* ]] ; then
  8. bash --login -c \
  9. "rvm install $version && rvm use $version && rvm get head && \
  10. which ruby && \
  11. git clean -f && \
  12. gem install --no-document bundler && bundle && \
  13. rake test && \
  14. rake gc_test && \
  15. cd ../conformance && make test_jruby && \
  16. cd ../ruby/compatibility_tests/v3.0.0 && ./test.sh"
  17. else
  18. bash --login -c \
  19. "rvm install $version && rvm use $version && \
  20. which ruby && \
  21. git clean -f && \
  22. gem install --no-document bundler -v 1.17.3 && bundle && \
  23. rake test && \
  24. rake gc_test && \
  25. cd ../conformance && make ${RUBY_CONFORMANCE} && \
  26. cd ../ruby/compatibility_tests/v3.0.0 && \
  27. cp -R ../../lib lib && ./test.sh"
  28. fi
  29. }
  30. test_version $1