forked from grpc/grpc
-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
[ruby] Build/test ruby 3.4 and build native gems with Ruby 3.4 support (
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
1 parent
8a29b15
commit 18bebd3
Showing
27 changed files
with
162 additions
and
31 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
24 changes: 24 additions & 0 deletions
24
templates/tools/dockerfile/distribtest/ruby_debian11_x64_ruby_3_4/Dockerfile.template
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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"] |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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" |
2 changes: 1 addition & 1 deletion
2
third_party/rake-compiler-dock/rake_aarch64-linux.current_version
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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 |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
2 changes: 1 addition & 1 deletion
2
third_party/rake-compiler-dock/rake_arm64-darwin.current_version
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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 |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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 |
2 changes: 1 addition & 1 deletion
2
third_party/rake-compiler-dock/rake_x64-mingw-ucrt.current_version
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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 |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
2 changes: 1 addition & 1 deletion
2
third_party/rake-compiler-dock/rake_x64-mingw32.current_version
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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 |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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 |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
2 changes: 1 addition & 1 deletion
2
third_party/rake-compiler-dock/rake_x86-mingw32.current_version
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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 |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
2 changes: 1 addition & 1 deletion
2
third_party/rake-compiler-dock/rake_x86_64-darwin.current_version
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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 |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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 |
2 changes: 1 addition & 1 deletion
2
third_party/rake-compiler-dock/rake_x86_64-linux.current_version
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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 |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
1 change: 1 addition & 0 deletions
1
tools/dockerfile/distribtest/ruby_debian11_x64_ruby_3_4.current_version
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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
88
tools/dockerfile/distribtest/ruby_debian11_x64_ruby_3_4/Dockerfile
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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"] |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters