Skip to content

Commit

Permalink
[ruby] Build/test ruby 3.4 and build native gems with Ruby 3.4 support (
Browse files Browse the repository at this point in the history
grpc#38338)

Updates ruby-compiler-dock to `1.7.1` to [bring Ruby 3.4 support](https://github.com/rake-compiler/rake-compiler-dock/releases/tag/v1.7.0) and starts cross-compiling native gems for Ruby 3.4. Added a distribtest as well.

I believe from last year at grpc#35399 that this probably requires @apolcyn or another Googler to build+push+update the `grpc-testing` images, along with

- `tools/dockerfile/push_testing_images.sh`
- update the values within [the current_version files](https://github.com/grpc/grpc/tree/9b77138b71e04bb127ec1fb3ae280bca33c59ae1/third_party/rake-compiler-dock).
re-run generate_dockerimage_current_versions_bzl.sh and commit changes to dockerimage_current_versions.bzl.
- similar for the `ruby_debian11_x64_ruby_3_4` image added here (needs to be built and pushed)

Marking as draft until we are happy with approach. Note that fully pre-compiled install wont be possible until protobuf pushes their own 3.4 native versions via protocolbuffers/protobuf#19752 (and a release), but this does not seem to block things as protobuf compile seems to be working OK without code change right now.

Closes grpc#38338

PiperOrigin-RevId: 715431412
  • Loading branch information
chadlwilson authored and copybara-github committed Jan 14, 2025
1 parent 8a29b15 commit 18bebd3
Show file tree
Hide file tree
Showing 27 changed files with 162 additions and 31 deletions.
2 changes: 1 addition & 1 deletion Rakefile
Original file line number Diff line number Diff line change
Expand Up @@ -143,7 +143,7 @@ task 'gem:native', [:plat] do |t, args|
verbose = ENV['V'] || '0'

grpc_config = ENV['GRPC_CONFIG'] || 'opt'
ruby_cc_versions = ['3.3.0', '3.2.0', '3.1.0', '3.0.0'].join(':')
ruby_cc_versions = ['3.4.1', '3.3.5', '3.2.6', '3.1.6', '3.0.7'].join(':')
selected_plat = "#{args[:plat]}"

# use env variable to set artifact build paralellism
Expand Down
2 changes: 1 addition & 1 deletion grpc.gemspec

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

2 changes: 0 additions & 2 deletions src/ruby/ext/grpc/extconf.rb
Original file line number Diff line number Diff line change
Expand Up @@ -148,8 +148,6 @@ def env_append(name, string)

def have_ruby_abi_version()
return true if RUBY_ENGINE == 'truffleruby'
# ruby_abi_version is only available in development versions: https://github.com/ruby/ruby/pull/6231
return false if RUBY_PATCHLEVEL >= 0

m = /(\d+)\.(\d+)/.match(RUBY_VERSION)
if m.nil?
Expand Down
2 changes: 1 addition & 1 deletion templates/grpc.gemspec.template
Original file line number Diff line number Diff line change
Expand Up @@ -44,7 +44,7 @@
s.add_development_dependency 'simplecov', '~> 0.22'
s.add_development_dependency 'rake', '~> 13.0'
s.add_development_dependency 'rake-compiler', '~> 1.2.1'
s.add_development_dependency 'rake-compiler-dock', '~> 1.4'
s.add_development_dependency 'rake-compiler-dock', '~> 1.8'
s.add_development_dependency 'rspec', '~> 3.6'
s.add_development_dependency 'rubocop', '~> 1.41.0'
s.add_development_dependency 'signet', '~> 0.7'
Expand Down
Original file line number Diff line number Diff line change
@@ -0,0 +1,24 @@
%YAML 1.2
--- |
# Copyright 2024 gRPC authors.
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
#
# http://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applicable law or agreed to in writing, software
# distributed under the License is distributed on an "AS IS" BASIS,
# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
# See the License for the specific language governing permissions and
# limitations under the License.

FROM debian:11

<%include file="../../apt_get_basic.include"/>
<%include file="../../ruby_3_4_deps.include"/>
<%include file="../../rvm_mkdir_workaround.include"/>

# Define the default command.
CMD ["bash"]
16 changes: 16 additions & 0 deletions templates/tools/dockerfile/ruby_3_4_deps.include
Original file line number Diff line number Diff line change
@@ -0,0 +1,16 @@
#==================
# Ruby dependencies

# Install rvm
RUN apt-get update && apt-get install -y gnupg2 && apt-get clean
RUN gpg2 --recv-keys 409B6B1796C275462A1703113804BB82D39DC0E3 7D2BAF1CF37B13E2069D6956105BD0E739499BDB
RUN \curl -sSL https://get.rvm.io | bash -s stable

# Install Ruby 3.4
RUN apt-get update && apt-get install -y procps && apt-get clean
RUN /bin/bash -l -c "rvm install ruby-3.4.1"
RUN /bin/bash -l -c "rvm use --default ruby-3.4.1"
RUN /bin/bash -l -c "echo 'gem: --no-document' > ~/.gemrc"
RUN /bin/bash -l -c "echo 'export PATH=/usr/local/rvm/bin:$PATH' >> ~/.bashrc"
RUN /bin/bash -l -c "echo 'rvm --default use ruby-3.4.1' >> ~/.bashrc"
RUN /bin/bash -l -c "gem install bundler --no-document"
Original file line number Diff line number Diff line change
@@ -1 +1 @@
us-docker.pkg.dev/grpc-testing/testing-images-public/rake_aarch64-linux:b9951a211adf3534ac726c7575199423a543e317@sha256:1e00a00f331ece951ed53d6f317fd82ef7e8e696b41502346b2e85906668fd4d
us-docker.pkg.dev/grpc-testing/testing-images-public/rake_aarch64-linux:598bb49eefd0cc3e44ab5181df74b61beca1d09d@sha256:9ecc73e45f0a8d034f924227ccb84e0f8a1f05baec912f563400792a5cc8eb08
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
FROM ghcr.io/rake-compiler/rake-compiler-dock-image:1.4.0-mri-aarch64-linux
FROM ghcr.io/rake-compiler/rake-compiler-dock-image:1.8.0-mri-aarch64-linux

#=================
# Install ccache
Expand Down
Original file line number Diff line number Diff line change
@@ -1 +1 @@
us-docker.pkg.dev/grpc-testing/testing-images-public/rake_arm64-darwin:38eb91d4ddd8567f91c2e04f373f0cccd3425e5e@sha256:16bb1a0746215557f5577e4cd289e10cec593d74b5a3033c9bb2ab4bc3c6662f
us-docker.pkg.dev/grpc-testing/testing-images-public/rake_arm64-darwin:2c2b5086784f13accb4956d058f67a5b225eba47@sha256:0f816ad0b08b0826fe64a43750e3e56663d8a697f753e98292994aa988fc9ccc
Original file line number Diff line number Diff line change
@@ -1 +1 @@
FROM ghcr.io/rake-compiler/rake-compiler-dock-image:1.4.0-mri-arm64-darwin
FROM ghcr.io/rake-compiler/rake-compiler-dock-image:1.8.0-mri-arm64-darwin
Original file line number Diff line number Diff line change
@@ -1 +1 @@
us-docker.pkg.dev/grpc-testing/testing-images-public/rake_x64-mingw-ucrt:79dc5d2714b6fe06e330fd6f59d2d7124d619904@sha256:ff6cc46721bbfd29e87e227dab180e28f322ecb1c7de3eb0a91b47b1f881a54c
us-docker.pkg.dev/grpc-testing/testing-images-public/rake_x64-mingw-ucrt:8cdc0d21795a781819c18b39840d531c478fbc74@sha256:5a7704d78bb2cd53e96bc8bf8615a85f00d472d02d6cd1b29128308f933c2100
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
FROM ghcr.io/rake-compiler/rake-compiler-dock-image:1.4.0-mri-x64-mingw-ucrt
FROM ghcr.io/rake-compiler/rake-compiler-dock-image:1.8.0-mri-x64-mingw-ucrt

RUN find / -name win32.h | while read f ; do sed -i 's/gettimeofday/rb_gettimeofday/' $f ; done

Expand Down
Original file line number Diff line number Diff line change
@@ -1 +1 @@
us-docker.pkg.dev/grpc-testing/testing-images-public/rake_x64-mingw32:bbe2698a2ef8126b20ac051a3cf2e60349f4571b@sha256:11ff94f278d705efc89ef3a401bfdfd56a3460180be902d437d8ce96d4e670fa
us-docker.pkg.dev/grpc-testing/testing-images-public/rake_x64-mingw32:0b329916db4dcdda6c1dee4efed5d4da385158a3@sha256:118ace4490d745d2dcf32ee4408406c7cc83264472bcbd278d79aa41930add35
2 changes: 1 addition & 1 deletion third_party/rake-compiler-dock/rake_x64-mingw32/Dockerfile
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
FROM ghcr.io/rake-compiler/rake-compiler-dock-image:1.4.0-mri-x64-mingw32
FROM ghcr.io/rake-compiler/rake-compiler-dock-image:1.8.0-mri-x64-mingw32

RUN find / -name win32.h | while read f ; do sed -i 's/gettimeofday/rb_gettimeofday/' $f ; done

Expand Down
Original file line number Diff line number Diff line change
@@ -1 +1 @@
us-docker.pkg.dev/grpc-testing/testing-images-public/rake_x86-linux:e040af5597a8005687afe45d8156247e598dad8c@sha256:49e62627c2aaf0ce6455663824239dda99d0c39cfed0a454e8b0ea502ba66a09
us-docker.pkg.dev/grpc-testing/testing-images-public/rake_x86-linux:92b0a3a774a938d5bfc1c5a32de9c485a2ab5dc2@sha256:370102e9eb43ff48da46743f8ff134fa2b4e5041a118958ca42cd316b52c41a8
2 changes: 1 addition & 1 deletion third_party/rake-compiler-dock/rake_x86-linux/Dockerfile
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
FROM ghcr.io/rake-compiler/rake-compiler-dock-image:1.4.0-mri-x86-linux
FROM ghcr.io/rake-compiler/rake-compiler-dock-image:1.8.0-mri-x86-linux

#=================
# Install ccache
Expand Down
Original file line number Diff line number Diff line change
@@ -1 +1 @@
us-docker.pkg.dev/grpc-testing/testing-images-public/rake_x86-mingw32:aad1cd2120215e5cbe10d74f2148e2c2640af31c@sha256:3611deccc6dc127adb2c6e5cf940f6631b0f17ea27e9966894ffa2e6b9c8dabc
us-docker.pkg.dev/grpc-testing/testing-images-public/rake_x86-mingw32:18344fde556d57679617435eb4475079a9c65290@sha256:52b08ed6ceb7e0ac005e5cf5b9d04289ca095f8517c24957741675df45ef4617
2 changes: 1 addition & 1 deletion third_party/rake-compiler-dock/rake_x86-mingw32/Dockerfile
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
FROM ghcr.io/rake-compiler/rake-compiler-dock-image:1.4.0-mri-x86-mingw32
FROM ghcr.io/rake-compiler/rake-compiler-dock-image:1.8.0-mri-x86-mingw32

RUN find / -name win32.h | while read f ; do sed -i 's/gettimeofday/rb_gettimeofday/' $f ; done

Expand Down
Original file line number Diff line number Diff line change
@@ -1 +1 @@
us-docker.pkg.dev/grpc-testing/testing-images-public/rake_x86_64-darwin:e1be88a89f0500d0d43c7604625ef056d7bc7948@sha256:ba8e38140f69ae8febe01f8b168782ec1f15cd2e59dd61719fd1176404138062
us-docker.pkg.dev/grpc-testing/testing-images-public/rake_x86_64-darwin:ca95acb7111c96775b522f5f8454ee33a521b492@sha256:c5af54f9f41da6d55f1b8f802923469d870cc9d28918086eaa8a79a18ba2337c
Original file line number Diff line number Diff line change
@@ -1 +1 @@
FROM ghcr.io/rake-compiler/rake-compiler-dock-image:1.4.0-mri-x86_64-darwin
FROM ghcr.io/rake-compiler/rake-compiler-dock-image:1.8.0-mri-x86_64-darwin
Original file line number Diff line number Diff line change
@@ -1 +1 @@
us-docker.pkg.dev/grpc-testing/testing-images-public/rake_x86_64-linux:cbdd9ab7c650280049ed107c95ac12e91e8143ec@sha256:64d4f1c9c23d5d26f38df101128e466940081183cbeac2ab3fa86f4d5a9d0a97
us-docker.pkg.dev/grpc-testing/testing-images-public/rake_x86_64-linux:fc062ed22d70ea06478f6fe190d35e6b70115eea@sha256:c46de9a416ab2e32cbfb135e70e5f6b453da2779ebaf24e57976ec0573f83c51
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
FROM ghcr.io/rake-compiler/rake-compiler-dock-image:1.4.0-mri-x86_64-linux
FROM ghcr.io/rake-compiler/rake-compiler-dock-image:1.8.0-mri-x86_64-linux

#=================
# Install ccache
Expand Down
17 changes: 9 additions & 8 deletions tools/bazelify_tests/dockerimage_current_versions.bzl
Original file line number Diff line number Diff line change
Expand Up @@ -19,14 +19,14 @@ accessible to bazel builds.
"""

DOCKERIMAGE_CURRENT_VERSIONS = {
"third_party/rake-compiler-dock/rake_aarch64-linux.current_version": "docker://us-docker.pkg.dev/grpc-testing/testing-images-public/rake_aarch64-linux@sha256:1e00a00f331ece951ed53d6f317fd82ef7e8e696b41502346b2e85906668fd4d",
"third_party/rake-compiler-dock/rake_arm64-darwin.current_version": "docker://us-docker.pkg.dev/grpc-testing/testing-images-public/rake_arm64-darwin@sha256:16bb1a0746215557f5577e4cd289e10cec593d74b5a3033c9bb2ab4bc3c6662f",
"third_party/rake-compiler-dock/rake_x64-mingw-ucrt.current_version": "docker://us-docker.pkg.dev/grpc-testing/testing-images-public/rake_x64-mingw-ucrt@sha256:ff6cc46721bbfd29e87e227dab180e28f322ecb1c7de3eb0a91b47b1f881a54c",
"third_party/rake-compiler-dock/rake_x64-mingw32.current_version": "docker://us-docker.pkg.dev/grpc-testing/testing-images-public/rake_x64-mingw32@sha256:11ff94f278d705efc89ef3a401bfdfd56a3460180be902d437d8ce96d4e670fa",
"third_party/rake-compiler-dock/rake_x86-linux.current_version": "docker://us-docker.pkg.dev/grpc-testing/testing-images-public/rake_x86-linux@sha256:49e62627c2aaf0ce6455663824239dda99d0c39cfed0a454e8b0ea502ba66a09",
"third_party/rake-compiler-dock/rake_x86-mingw32.current_version": "docker://us-docker.pkg.dev/grpc-testing/testing-images-public/rake_x86-mingw32@sha256:3611deccc6dc127adb2c6e5cf940f6631b0f17ea27e9966894ffa2e6b9c8dabc",
"third_party/rake-compiler-dock/rake_x86_64-darwin.current_version": "docker://us-docker.pkg.dev/grpc-testing/testing-images-public/rake_x86_64-darwin@sha256:ba8e38140f69ae8febe01f8b168782ec1f15cd2e59dd61719fd1176404138062",
"third_party/rake-compiler-dock/rake_x86_64-linux.current_version": "docker://us-docker.pkg.dev/grpc-testing/testing-images-public/rake_x86_64-linux@sha256:64d4f1c9c23d5d26f38df101128e466940081183cbeac2ab3fa86f4d5a9d0a97",
"third_party/rake-compiler-dock/rake_aarch64-linux.current_version": "docker://us-docker.pkg.dev/grpc-testing/testing-images-public/rake_aarch64-linux@sha256:9ecc73e45f0a8d034f924227ccb84e0f8a1f05baec912f563400792a5cc8eb08",
"third_party/rake-compiler-dock/rake_arm64-darwin.current_version": "docker://us-docker.pkg.dev/grpc-testing/testing-images-public/rake_arm64-darwin@sha256:0f816ad0b08b0826fe64a43750e3e56663d8a697f753e98292994aa988fc9ccc",
"third_party/rake-compiler-dock/rake_x64-mingw-ucrt.current_version": "docker://us-docker.pkg.dev/grpc-testing/testing-images-public/rake_x64-mingw-ucrt@sha256:5a7704d78bb2cd53e96bc8bf8615a85f00d472d02d6cd1b29128308f933c2100",
"third_party/rake-compiler-dock/rake_x64-mingw32.current_version": "docker://us-docker.pkg.dev/grpc-testing/testing-images-public/rake_x64-mingw32@sha256:118ace4490d745d2dcf32ee4408406c7cc83264472bcbd278d79aa41930add35",
"third_party/rake-compiler-dock/rake_x86-linux.current_version": "docker://us-docker.pkg.dev/grpc-testing/testing-images-public/rake_x86-linux@sha256:370102e9eb43ff48da46743f8ff134fa2b4e5041a118958ca42cd316b52c41a8",
"third_party/rake-compiler-dock/rake_x86-mingw32.current_version": "docker://us-docker.pkg.dev/grpc-testing/testing-images-public/rake_x86-mingw32@sha256:52b08ed6ceb7e0ac005e5cf5b9d04289ca095f8517c24957741675df45ef4617",
"third_party/rake-compiler-dock/rake_x86_64-darwin.current_version": "docker://us-docker.pkg.dev/grpc-testing/testing-images-public/rake_x86_64-darwin@sha256:c5af54f9f41da6d55f1b8f802923469d870cc9d28918086eaa8a79a18ba2337c",
"third_party/rake-compiler-dock/rake_x86_64-linux.current_version": "docker://us-docker.pkg.dev/grpc-testing/testing-images-public/rake_x86_64-linux@sha256:c46de9a416ab2e32cbfb135e70e5f6b453da2779ebaf24e57976ec0573f83c51",
"tools/dockerfile/distribtest/cpp_debian11_aarch64_cross_x64.current_version": "docker://us-docker.pkg.dev/grpc-testing/testing-images-public/cpp_debian11_aarch64_cross_x64@sha256:97ff55660fb93f4b31c029f2935bd18edf82e55d4df65376e55ed97b228a49c7",
"tools/dockerfile/distribtest/cpp_debian11_x64.current_version": "docker://us-docker.pkg.dev/grpc-testing/testing-images-public/cpp_debian11_x64@sha256:beb3a8bedc067f4c8f54c8efe31f3d7149056c39c9751aaa395c788dd54e0a7e",
"tools/dockerfile/distribtest/csharp_alpine_x64.current_version": "docker://us-docker.pkg.dev/grpc-testing/testing-images-public/csharp_alpine_x64@sha256:65083a6c7b1e6f18374ac6218a924409dfc6ab526ec627b9a33d81e21c93e025",
Expand Down Expand Up @@ -58,6 +58,7 @@ DOCKERIMAGE_CURRENT_VERSIONS = {
"tools/dockerfile/distribtest/ruby_debian11_x64_ruby_3_1.current_version": "docker://us-docker.pkg.dev/grpc-testing/testing-images-public/ruby_debian11_x64_ruby_3_1@sha256:a48bb08275a588fbcea21b6b6056514b69454f6844bd7db9fd72c796892d02e1",
"tools/dockerfile/distribtest/ruby_debian11_x64_ruby_3_2.current_version": "docker://us-docker.pkg.dev/grpc-testing/testing-images-public/ruby_debian11_x64_ruby_3_2@sha256:9604f8d07c3ea330cdc1ebe394f67828710bbfef52f0dc144e513e3627279b5a",
"tools/dockerfile/distribtest/ruby_debian11_x64_ruby_3_3.current_version": "docker://us-docker.pkg.dev/grpc-testing/testing-images-public/ruby_debian11_x64_ruby_3_3@sha256:38f27eb75a55df6e9a7d7a01bca40448d0971faee94d0332324ad85ee7200bac",
"tools/dockerfile/distribtest/ruby_debian11_x64_ruby_3_4.current_version": "docker://us-docker.pkg.dev/grpc-testing/testing-images-public/ruby_debian11_x64_ruby_3_4@sha256:d37c32dc640c9d6c7c47fb11d0acd31a2877ad6ce21e1a4f17a90a963193b776",
"tools/dockerfile/distribtest/ruby_ubuntu2004_x64.current_version": "docker://us-docker.pkg.dev/grpc-testing/testing-images-public/ruby_ubuntu2004_x64@sha256:d754f48a8119b725613bc3c31548ee8770d9bfddd9f49f00f14651aba8e7f760",
"tools/dockerfile/distribtest/ruby_ubuntu2204_x64.current_version": "docker://us-docker.pkg.dev/grpc-testing/testing-images-public/ruby_ubuntu2204_x64@sha256:3f0558a0164bd7d41dfdb3d5635951503181bd619fce9ce8d390bdc675444eb3",
"tools/dockerfile/grpc_artifact_centos6_x64.current_version": "docker://us-docker.pkg.dev/grpc-testing/testing-images-public/grpc_artifact_centos6_x64@sha256:3285047265ea2b7c5d4df4c769b2d05f56288d947c75e16d27ae2dee693f791b",
Expand Down
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
us-docker.pkg.dev/grpc-testing/testing-images-public/ruby_debian11_x64_ruby_3_4:c47889056da6ba52571edf2d09e6a2a8e560aa54@sha256:d37c32dc640c9d6c7c47fb11d0acd31a2877ad6ce21e1a4f17a90a963193b776
88 changes: 88 additions & 0 deletions tools/dockerfile/distribtest/ruby_debian11_x64_ruby_3_4/Dockerfile
Original file line number Diff line number Diff line change
@@ -0,0 +1,88 @@
# Copyright 2024 gRPC authors.
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
#
# http://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applicable law or agreed to in writing, software
# distributed under the License is distributed on an "AS IS" BASIS,
# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
# See the License for the specific language governing permissions and
# limitations under the License.

FROM debian:11

#=================
# Basic C core dependencies

# C/C++ dependencies according to https://github.com/grpc/grpc/blob/master/BUILDING.md
RUN apt-get update && apt-get install -y \
build-essential \
autoconf \
libtool \
pkg-config \
&& apt-get clean

# GCC
RUN apt-get update && apt-get install -y \
gcc \
g++ \
&& apt-get clean

# libc6
RUN apt-get update && apt-get install -y \
libc6 \
libc6-dbg \
libc6-dev \
&& apt-get clean

# Tools
RUN apt-get update && apt-get install -y \
bzip2 \
curl \
dnsutils \
git \
lcov \
make \
strace \
time \
unzip \
wget \
zip \
&& apt-get clean

#=================
# Setup git to access working directory across docker boundary.
# This avoids the "fatal: detected dubious ownership in repository XYZ"
# git error.

RUN git config --global --add safe.directory '*'
RUN git config --global protocol.file.allow always


#==================
# Ruby dependencies

# Install rvm
RUN apt-get update && apt-get install -y gnupg2 && apt-get clean
RUN gpg2 --recv-keys 409B6B1796C275462A1703113804BB82D39DC0E3 7D2BAF1CF37B13E2069D6956105BD0E739499BDB
RUN \curl -sSL https://get.rvm.io | bash -s stable

# Install Ruby 3.4
RUN apt-get update && apt-get install -y procps && apt-get clean
RUN /bin/bash -l -c "rvm install ruby-3.4.1"
RUN /bin/bash -l -c "rvm use --default ruby-3.4.1"
RUN /bin/bash -l -c "echo 'gem: --no-document' > ~/.gemrc"
RUN /bin/bash -l -c "echo 'export PATH=/usr/local/rvm/bin:$PATH' >> ~/.bashrc"
RUN /bin/bash -l -c "echo 'rvm --default use ruby-3.4.1' >> ~/.bashrc"
RUN /bin/bash -l -c "gem install bundler --no-document"

# Workaround for rvm unable to find mkdir properly
# https://stackoverflow.com/questions/64653051
RUN ln -s /bin/mkdir /usr/bin/mkdir


# Define the default command.
CMD ["bash"]
Original file line number Diff line number Diff line change
Expand Up @@ -28,7 +28,7 @@ set +ex
# but we want to exit if there's a failure
set -e

RUBY_VERSION=3.3.0
RUBY_VERSION=3.4.1
echo "Installing ruby-${RUBY_VERSION}"
time rvm install "ruby-${RUBY_VERSION}"
echo "Setting default ruby version."
Expand All @@ -41,7 +41,7 @@ set -ex
ruby --version

# Bundler is required for grpc ruby artifact build.
gem install bundler -v 2.5
gem install bundler -v 2.6

# log gem versions for easier debugging if things go wrong
gem list || true
3 changes: 3 additions & 0 deletions tools/run_tests/artifacts/distribtest_targets.py
Original file line number Diff line number Diff line change
Expand Up @@ -502,6 +502,9 @@ def targets():
protobuf_version="3.25",
presubmit=True,
),
RubyDistribTest(
"linux", "x64", "debian11", ruby_version="ruby_3_4", presubmit=True
),
RubyDistribTest("linux", "x64", "ubuntu2004"),
RubyDistribTest("linux", "x64", "ubuntu2204", presubmit=True),
# PHP8
Expand Down

0 comments on commit 18bebd3

Please sign in to comment.