File: travis-test.sh

package info (click to toggle)
protobuf 3.21.12-15
  • links: PTS
  • area: main
  • in suites: forky, sid
  • size: 43,408 kB
  • sloc: cpp: 179,373; java: 88,098; objc: 60,661; ansic: 37,810; cs: 28,526; python: 22,565; php: 11,464; ruby: 6,127; sh: 3,635; makefile: 3,341; pascal: 2,352; xml: 2,317; javascript: 311; lisp: 87; awk: 17
file content (35 lines) | stat: -rwxr-xr-x 917 bytes parent folder | download | duplicates (7)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
#!/usr/bin/env bash

# Exit on any error.
set -ex

test_version() {
  version=$1

  RUBY_CONFORMANCE=test_ruby

  if [[ $version == jruby-9* ]] ; then
    bash --login -c \
      "rvm install $version && rvm use $version && rvm get head && \
       which ruby && \
       git clean -f && \
       gem install --no-document bundler && bundle && \
       rake test && \
       rake gc_test && \
       cd ../conformance && make test_jruby && \
       cd ../ruby/compatibility_tests/v3.0.0 && ./test.sh"
  else
    bash --login -c \
      "rvm install $version && rvm use $version && \
       which ruby && \
       git clean -f && \
       gem install --no-document bundler -v 1.17.3 && bundle && \
       rake test && \
       rake gc_test && \
       cd ../conformance && make ${RUBY_CONFORMANCE} && \
       cd ../ruby/compatibility_tests/v3.0.0 && \
       cp -R ../../lib lib && ./test.sh"
  fi
}

test_version $1