Skip to content

Commit

Permalink
Drop Ruby 2.7.
Browse files Browse the repository at this point in the history
This updates the required ruby version to >= 3.0 and removes Ruby 2.7 tests from main branch, in anticipation for end of Ruby 2.7 support on 3/31 in 27.x

See https://cloud.google.com/ruby/getting-started/supported-ruby-versions

PiperOrigin-RevId: 612841114
  • Loading branch information
zhangskz authored and Copybara-Service committed Mar 5, 2024
1 parent c78b189 commit 360531c
Show file tree
Hide file tree
Showing 2 changed files with 11 additions and 16 deletions.
25 changes: 10 additions & 15 deletions .github/workflows/test_ruby.yml
Original file line number Diff line number Diff line change
Expand Up @@ -19,10 +19,9 @@ jobs:
include:
# Test both FFI and Native implementations on the highest and lowest
# Ruby versions for CRuby and JRuby, but only on Bazel 5.x.
- { name: Ruby 2.7, ruby: ruby-2.7.0, ffi: NATIVE }
- { name: Ruby 3.0, ruby: ruby-3.0.2, ffi: NATIVE }
# TODO Re-enable these once flakes are fixed
#- { name: Ruby 2.7, ruby: ruby-2.7.0, ffi: FFI }
- { name: Ruby 3.0, ruby: ruby-3.0.2 }
#- { name: Ruby 3.0, ruby: ruby-3.0.2, ffi: FFI }
- { name: Ruby 3.1, ruby: ruby-3.1.0 }
- { name: Ruby 3.2, ruby: ruby-3.2.0 }
- { name: Ruby 3.3, ruby: ruby-3.3.0, ffi: NATIVE }
Expand Down Expand Up @@ -66,12 +65,11 @@ jobs:
- name: Run tests
uses: protocolbuffers/protobuf-ci/docker@v2
with:
image: i386/ruby:2.7.3-buster
image: i386/ruby:3.0.2-buster
credentials: ${{ secrets.GAR_SERVICE_ACCOUNT }}
# Pin to Ruby 2.7 compatible bundler version.
command: >-
/bin/bash -cex '
gem install bundler -v 2.4.22;
gem install bundler -v 2.5.6;
cd /workspace/ruby;
bundle;
PROTOC=/workspace/${{ steps.cross-compile.outputs.protoc }} rake;
Expand All @@ -98,12 +96,11 @@ jobs:
- name: Run tests
uses: protocolbuffers/protobuf-ci/docker@v2
with:
image: arm64v8/ruby:2.7.3-buster
image: arm64v8/ruby:3.0.2-buster
credentials: ${{ secrets.GAR_SERVICE_ACCOUNT }}
# Pin to Ruby 2.7 compatible bundler version.
command: >-
/bin/bash -cex '
gem install bundler -v 2.4.22;
gem install bundler -v 2.5.6;
cd /workspace/ruby;
bundle;
PROTOC=/workspace/${{ steps.cross-compile.outputs.protoc }} rake;
Expand All @@ -118,10 +115,9 @@ jobs:
# Test both FFI and Native implementations on the highest and lowest
# Ruby versions for CRuby, but only on Bazel 5.x.
# Quote versions numbers otherwise 3.0 will render as 3
- { version: "2.7", ffi: NATIVE }
- { version: "3.0", ffi: NATIVE }
# TODO Re-enable these once flakes are fixed
#- { version: "2.7", ffi: FFI }
- { version: "3.0" }
#- { version: "3.0", ffi: FFI }
- { version: "3.1" }
- { version: "3.2" }
- { version: "3.3", ffi: NATIVE }
Expand Down Expand Up @@ -158,9 +154,8 @@ jobs:
include:
# Test both FFI and Native implementations on the highest and lowest
# Ruby versions for CRuby and JRuby, but only on Bazel 5.x.
- { name: Ruby 2.7, ruby: ruby-2.7.0, ffi: NATIVE }
- { name: Ruby 2.7, ruby: ruby-2.7.0, ffi: FFI }
- { name: Ruby 3.0, ruby: ruby-3.0.2}
- { name: Ruby 3.0, ruby: ruby-3.0.2, ffi: NATIVE}
- { name: Ruby 3.0, ruby: ruby-3.0.2, ffi: FFI}
- { name: Ruby 3.1, ruby: ruby-3.1.0}
- { name: Ruby 3.2, ruby: ruby-3.2.0}
- { name: Ruby 3.3, ruby: ruby-3.3.0, ffi: NATIVE }
Expand Down
2 changes: 1 addition & 1 deletion ruby/google-protobuf.gemspec
Original file line number Diff line number Diff line change
Expand Up @@ -31,7 +31,7 @@ Gem::Specification.new do |s|
]
s.add_development_dependency "rake-compiler-dock", "= 1.2.1"
end
s.required_ruby_version = '>= 2.7'
s.required_ruby_version = '>= 3.0'
# TODO: evaluate removing Rakefile and moving logic to extconf.rb, so that we
# can remove this runtime dependency on rake. See the discussion here for
# more details:
Expand Down

0 comments on commit 360531c

Please sign in to comment.