From 728878e98f460fe8383a954d19d44e81ef76b2a2 Mon Sep 17 00:00:00 2001 From: Jason Lunn Date: Thu, 7 Oct 2021 18:45:38 -0400 Subject: [PATCH] Add JRuby test targets for JRuby 9.2.x and 9.3.x. Standardize on JRuby 9.2.19.0 for building and for testing the 9.2.x branch. --- kokoro/linux/jruby92/build.sh | 18 ++++++++++++++++++ kokoro/linux/jruby92/continuous.cfg | 11 +++++++++++ kokoro/linux/jruby92/presubmit.cfg | 11 +++++++++++ kokoro/linux/jruby93/build.sh | 18 ++++++++++++++++++ kokoro/linux/jruby93/continuous.cfg | 11 +++++++++++ kokoro/linux/jruby93/presubmit.cfg | 11 +++++++++++ ruby/pom.xml | 2 +- ruby/travis-test.sh | 2 +- tests.sh | 13 ++++++++++--- 9 files changed, 92 insertions(+), 5 deletions(-) create mode 100755 kokoro/linux/jruby92/build.sh create mode 100644 kokoro/linux/jruby92/continuous.cfg create mode 100644 kokoro/linux/jruby92/presubmit.cfg create mode 100755 kokoro/linux/jruby93/build.sh create mode 100644 kokoro/linux/jruby93/continuous.cfg create mode 100644 kokoro/linux/jruby93/presubmit.cfg diff --git a/kokoro/linux/jruby92/build.sh b/kokoro/linux/jruby92/build.sh new file mode 100755 index 0000000000..5820115759 --- /dev/null +++ b/kokoro/linux/jruby92/build.sh @@ -0,0 +1,18 @@ +#!/bin/bash +# +# This is the top-level script we give to Kokoro as the entry point for +# running the "pull request" project: +# +# This script selects a specific Dockerfile (for building a Docker image) and +# a script to run inside that image. Then we delegate to the general +# build_and_run_docker.sh script. + +# Change to repo root +cd $(dirname $0)/../../.. + +export DOCKERHUB_ORGANIZATION=protobuftesting +export DOCKERFILE_DIR=kokoro/linux/dockerfile/test/ruby +export DOCKER_RUN_SCRIPT=kokoro/linux/pull_request_in_docker.sh +export OUTPUT_DIR=testoutput +export TEST_SET="jruby92" +./kokoro/linux/build_and_run_docker.sh diff --git a/kokoro/linux/jruby92/continuous.cfg b/kokoro/linux/jruby92/continuous.cfg new file mode 100644 index 0000000000..3339584149 --- /dev/null +++ b/kokoro/linux/jruby92/continuous.cfg @@ -0,0 +1,11 @@ +# Config file for running tests in Kokoro + +# Location of the build script in repository +build_file: "protobuf/kokoro/linux/jruby92/build.sh" +timeout_mins: 120 + +action { + define_artifacts { + regex: "**/sponge_log.xml" + } +} diff --git a/kokoro/linux/jruby92/presubmit.cfg b/kokoro/linux/jruby92/presubmit.cfg new file mode 100644 index 0000000000..3339584149 --- /dev/null +++ b/kokoro/linux/jruby92/presubmit.cfg @@ -0,0 +1,11 @@ +# Config file for running tests in Kokoro + +# Location of the build script in repository +build_file: "protobuf/kokoro/linux/jruby92/build.sh" +timeout_mins: 120 + +action { + define_artifacts { + regex: "**/sponge_log.xml" + } +} diff --git a/kokoro/linux/jruby93/build.sh b/kokoro/linux/jruby93/build.sh new file mode 100755 index 0000000000..24c54d0b20 --- /dev/null +++ b/kokoro/linux/jruby93/build.sh @@ -0,0 +1,18 @@ +#!/bin/bash +# +# This is the top-level script we give to Kokoro as the entry point for +# running the "pull request" project: +# +# This script selects a specific Dockerfile (for building a Docker image) and +# a script to run inside that image. Then we delegate to the general +# build_and_run_docker.sh script. + +# Change to repo root +cd $(dirname $0)/../../.. + +export DOCKERHUB_ORGANIZATION=protobuftesting +export DOCKERFILE_DIR=kokoro/linux/dockerfile/test/ruby +export DOCKER_RUN_SCRIPT=kokoro/linux/pull_request_in_docker.sh +export OUTPUT_DIR=testoutput +export TEST_SET="jruby93" +./kokoro/linux/build_and_run_docker.sh diff --git a/kokoro/linux/jruby93/continuous.cfg b/kokoro/linux/jruby93/continuous.cfg new file mode 100644 index 0000000000..706d8488f7 --- /dev/null +++ b/kokoro/linux/jruby93/continuous.cfg @@ -0,0 +1,11 @@ +# Config file for running tests in Kokoro + +# Location of the build script in repository +build_file: "protobuf/kokoro/linux/jruby93/build.sh" +timeout_mins: 120 + +action { + define_artifacts { + regex: "**/sponge_log.xml" + } +} diff --git a/kokoro/linux/jruby93/presubmit.cfg b/kokoro/linux/jruby93/presubmit.cfg new file mode 100644 index 0000000000..706d8488f7 --- /dev/null +++ b/kokoro/linux/jruby93/presubmit.cfg @@ -0,0 +1,11 @@ +# Config file for running tests in Kokoro + +# Location of the build script in repository +build_file: "protobuf/kokoro/linux/jruby93/build.sh" +timeout_mins: 120 + +action { + define_artifacts { + regex: "**/sponge_log.xml" + } +} diff --git a/ruby/pom.xml b/ruby/pom.xml index 5ba45156d8..0b13996d82 100644 --- a/ruby/pom.xml +++ b/ruby/pom.xml @@ -81,7 +81,7 @@ org.jruby jruby-complete - 9.2.11.1 + 9.2.19.0 provided diff --git a/ruby/travis-test.sh b/ruby/travis-test.sh index edca986fff..438d612da4 100755 --- a/ruby/travis-test.sh +++ b/ruby/travis-test.sh @@ -8,7 +8,7 @@ test_version() { RUBY_CONFORMANCE=test_ruby - if [ "$version" == "jruby-9.2.11.1" ] ; then + if [[ $version == jruby-9* ] ; then bash --login -c \ "rvm install $version && rvm use $version && rvm get head && \ which ruby && \ diff --git a/tests.sh b/tests.sh index f7397c1a17..06cbc6ce6d 100755 --- a/tests.sh +++ b/tests.sh @@ -452,10 +452,16 @@ build_ruby30() { cd ruby && bash travis-test.sh ruby-3.0.2 && cd .. } -build_jruby() { +build_jruby92() { internal_build_cpp # For conformance tests. internal_build_java jdk8 && cd .. # For Maven protobuf jar with local changes - cd ruby && bash travis-test.sh jruby-9.2.11.1 && cd .. + cd ruby && bash travis-test.sh jruby-9.2.19.0 && cd .. +} + +build_jruby93() { + internal_build_cpp # For conformance tests. + internal_build_java jdk8 && cd .. # For Maven protobuf jar with local changes + cd ruby && bash travis-test.sh jruby-9.3.0.0 && cd .. } build_javascript() { @@ -610,7 +616,8 @@ Usage: $0 { cpp | ruby26 | ruby27 | ruby30 | - jruby | + jruby92 | + jruby93 | ruby_all | php_all | php_all_32 |