Update default ruby version to 3.2 on linux/macos ruby builds (#32010)

* Use ruby 3.2 in macos and linux ruby builds
pull/31974/head^2
apolcyn 2 years ago committed by GitHub
parent a414dbd304
commit e31cfaaa11
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
  1. 4
      grpc.gemspec
  2. 759
      src/ruby/.rubocop_todo.yml
  3. 2
      src/ruby/end2end/grpc_class_init_client.rb
  4. 2
      src/ruby/lib/grpc/generic/bidi_call.rb
  5. 4
      templates/grpc.gemspec.template
  6. 11
      tools/internal_ci/helper_scripts/prepare_build_linux_ruby_artifact_rc
  7. 10
      tools/internal_ci/helper_scripts/prepare_build_macos_rc

4
grpc.gemspec generated

@ -36,12 +36,12 @@ Gem::Specification.new do |s|
s.add_development_dependency 'bundler', '>= 1.9'
s.add_development_dependency 'facter', '~> 2.4'
s.add_development_dependency 'logging', '~> 2.0'
s.add_development_dependency 'simplecov', '~> 0.14.1'
s.add_development_dependency 'simplecov', '~> 0.22'
s.add_development_dependency 'rake', '~> 13.0'
s.add_development_dependency 'rake-compiler', '<= 1.1.1'
s.add_development_dependency 'rake-compiler-dock', '~> 1.2'
s.add_development_dependency 'rspec', '~> 3.6'
s.add_development_dependency 'rubocop', '~> 0.49.1'
s.add_development_dependency 'rubocop', '~> 1.41.0'
s.add_development_dependency 'signet', '~> 0.7'
s.add_development_dependency 'googleauth', '>= 0.5.1', '< 0.10'

File diff suppressed because it is too large Load Diff

@ -66,6 +66,7 @@ def run_default_test(test_proc)
thd.join
end
# rubocop:disable Metrics/CyclomaticComplexity
def get_test_proc(grpc_class)
case grpc_class
when 'channel'
@ -117,6 +118,7 @@ def get_test_proc(grpc_class)
fail "bad --grpc_class=#{grpc_class} param"
end
end
# rubocop:enable Metrics/CyclomaticComplexity
def main
grpc_class = ''

@ -139,6 +139,7 @@ module GRPC
end
# set_output_stream_done is relevant on client-side
# rubocop:disable Metrics/PerceivedComplexity
def write_loop(requests, is_client: true, set_output_stream_done: nil)
GRPC.logger.debug('bidi-write-loop: starting')
count = 0
@ -182,6 +183,7 @@ module GRPC
ensure
set_output_stream_done.call if is_client
end
# rubocop:enable Metrics/PerceivedComplexity
# Provides an enumerator that yields results of remote reads
def read_loop(set_input_stream_done, is_client: true)

@ -38,12 +38,12 @@
s.add_development_dependency 'bundler', '>= 1.9'
s.add_development_dependency 'facter', '~> 2.4'
s.add_development_dependency 'logging', '~> 2.0'
s.add_development_dependency 'simplecov', '~> 0.14.1'
s.add_development_dependency 'simplecov', '~> 0.22'
s.add_development_dependency 'rake', '~> 13.0'
s.add_development_dependency 'rake-compiler', '<= 1.1.1'
s.add_development_dependency 'rake-compiler-dock', '~> 1.2'
s.add_development_dependency 'rspec', '~> 3.6'
s.add_development_dependency 'rubocop', '~> 0.49.1'
s.add_development_dependency 'rubocop', '~> 1.41.0'
s.add_development_dependency 'signet', '~> 0.7'
s.add_development_dependency 'googleauth', '>= 0.5.1', '< 0.10'

@ -28,10 +28,11 @@ set +ex
# but we want to exit if there's a failure
set -e
echo "rvm install ruby-2.5.7"
time rvm install ruby-2.5.7
echo "rvm --default use ruby-2.5.7"
rvm --default use ruby-2.5.7
RUBY_VERSION=3.2.0
echo "Installing ruby-${RUBY_VERSION}"
time rvm install "ruby-${RUBY_VERSION}"
echo "Setting default ruby version."
rvm use "$RUBY_VERSION" --default
# restore the original echo and exit on failure behavior
set -ex
@ -40,7 +41,7 @@ set -ex
ruby --version
# Bundler is required for grpc ruby artifact build.
gem install bundler -v 1.17.3
gem install bundler -v 2.4
# log gem versions for easier debugging if things go wrong
gem list || true

@ -80,13 +80,13 @@ then
set +x
source $HOME/.rvm/scripts/rvm
for RUBY_VERSION in 2.5.0 2.7.0 3.0.0 3.1.0; do
echo "Installing ruby-${RUBY_VERSION}"
time rvm install "ruby-${RUBY_VERSION}"
done;
RUBY_VERSION=3.2.0
echo "Installing ruby-${RUBY_VERSION}"
time rvm install "ruby-${RUBY_VERSION}"
echo "Setting default ruby version."
rvm use 2.7.0 --default
rvm use "$RUBY_VERSION" --default
echo "Updating osx-ssl-certs."
gem install bundler -v 2.4
rvm osx-ssl-certs status all
rvm osx-ssl-certs update all

Loading…
Cancel
Save