Commit Graph

68 Commits

Author SHA1 Message Date
Esun Kim 7b98cda1f4 No public description
PiperOrigin-RevId: 613626993
2024-03-07 10:26:42 -08:00
Chad Wilson 43d2b28e02 [ruby] Build/test ruby 3.3 and build native gems with Ruby 3.3 support (#35399)
Updates ruby-compiler-dock to 1.4.0 which brings Ruby 3.3 final support per https://github.com/rake-compiler/rake-compiler-dock/releases/tag/1.4.0 and starts cross-compiling for ruby 3.3.

I can't find obviously where the test infrastructure configuration is to run the tests under Ruby 3.3, so might need pointers or an accompanying PR for the test infra. (I note #31991 from @apolcyn so perhaps currently they are not run against newer versions)

Fixes #35396

- Backport to `1.60` is desirable since currently the Ruby gems cannot be installed with Ruby 3.3 and have to be built from source.

Closes #35399

PiperOrigin-RevId: 599200628
2024-01-17 09:37:18 -08:00
apolcyn 36af323673
[ruby] create debug symbol packages (#34632)
Introduce `grpc-native-debug` gems containing debug symbol packages that
complement the shared libraries shipped in pre-compiled binary gems.

src/ruby/nativedebug/README.md has details on usage.
2023-10-17 10:45:08 -07:00
apolcyn fb635a1959
[ruby] drop ruby 2.6 support (#34198)
As title
2023-08-30 11:02:45 -07:00
alto-ruby 059144abd6
[Ruby] add aarch64 linux build (#33079)
This adds pre-built library for aarch64 linux, will help improve the
install speed and avoid building environment issues at customer side.

@apolcyn @jtattermusch Can you help build and push the new rake compiler
image?
Will update the tag and hash after the image is available

Manually tested locally:
```
uname -a
Linux u20 5.15.49-linuxkit #1 SMP PREEMPT Tue Sep 13 07:51:32 UTC 2022 aarch64 aarch64 aarch64 GNU/Linux
```
```
time gem install /work/ruby/grpc/pkg/grpc-1.56.0.dev-aarch64-linux.gem
Successfully installed grpc-1.56.0.dev-aarch64-linux
Parsing documentation for grpc-1.56.0.dev-aarch64-linux
Installing ri documentation for grpc-1.56.0.dev-aarch64-linux
Done installing documentation for grpc after 0 seconds
1 gem installed

real	0m22.794s
user	0m17.268s
sys	0m5.156s
```
```
ruby greeter_server.rb &
[1] 319
ruby greeter_client.rb
"Greeting: Hello world"
```

Fixes:
https://github.com/grpc/grpc/issues/31855
https://github.com/grpc/grpc/issues/29489
2023-06-25 13:00:40 -07:00
Daniel Azuma 54ad01cf01
[ruby] Fix Ruby 2.6 build (#32231) 2023-01-30 09:26:38 -08:00
apolcyn 86d314a4cb
Undrop ruby 2.6 (#32160) 2023-01-20 09:36:59 -08:00
apolcyn c1a4b526fb
[ruby]: add pre-compiled binaries for ruby 3.2; drop them for ruby 2.6 (#32089)
[ruby]: add pre-compiled binaries for ruby 3.2; drop them for ruby 2.6
2023-01-19 15:32:26 -08:00
apolcyn 8b941bb648
Drop support for ruby 2.5 (#30699)
* Drop ruby 2.5 support
2022-08-25 21:39:31 -07:00
Johnny Shields 34a66d9496
Ruby: Fixes for x64-mingw-ucrt (PR to master) (#30081)
* Fix Ruby Windows 3.1 (x64-mingw-ucrt) build:
- Pass-in CPPFLAG "GPR_WINDOWS_UCRT" to pickup correct shared object file.
- Rename intermediate legacy SO file from 'grpc_c.64.ruby' to 'grpc_c.64-msvcrt.ruby' for clarity.
- Add artifact target for Ruby x64-mingw-ucrt

* Change CPP flag name
2022-07-14 12:45:40 -07:00
Johnny Shields 6d33399d1e
Support for prebuilt Ruby binary on x64-mingw-ucrt platform (#29684)
* Add support for prebuilt Ruby binary on x64-mingw-ucrt platform, which is used for Windows RubyInstaller Ruby 3.1+
2022-05-31 08:33:27 -07:00
Esun Kim 03e9ac6f1f
Requiring C++14 (#29589) 2022-05-12 21:17:32 -07:00
Hannah Shi b9928a5154
[Ruby]fix a rake compile error since rake-compiler ~> 1.1 (#28666)
* fix a rake compile error since rake-compiler ~> 1.1

* change File.directory? check
2022-05-05 12:30:11 -07:00
Marco Concetto Rudilosso 06e2fcc6c7
Support pre-built binaries for Ruby 3.1 (#29000)
* Support pre-built binaries for Ruby 3.1

* use 3.1.0

* use 3.1.0 and install 3.1 in build files

* fix

* update gemspec template

* fix naming of variable

* Fix ruby 3.1 link

Co-authored-by: Jan Tattermusch <jtattermusch@users.noreply.github.com>
2022-04-06 14:02:13 +02:00
Jan Tattermusch 1cf6b085f2
Enable ccache in more builds (#28665)
* upgrade ruby docker images to debian 11

* upgrade C# docker images to debian11

* update sanity dockerimage to debian11

* upgrade cxx interop to debian11

* add ccache to python interop images

* enable use of ccache for interop tests

* adjust run_tests.py to new docker images

* add ccache to rake-compiler-dock docker images

* improve prepare_ccache_symlinks_rc

* enable use of ccache in rake-compiler-dock docker containers

* add ccache support for python_manylinux2014_aarch64

* add ccache support for python_linux_armv7

* deduplicate python3.9 install

* ccache for crosscompiled darwin gems is broken

* fix bash -l resetting of PATH in grpc_artifact_python_linux_armv7
2022-01-25 20:37:04 +01:00
Jan Tattermusch fda6158600
Build ruby artifacts in parallel (#28243)
* build ruby artifacts in parallel

* fine tune grpc_distribtests_ruby.sh parallelism

* fine tune linux/grpc_build_artifacts.sh parallelism

* cleanup in bundle_install_wrapper

* address review comments
2022-01-19 18:28:27 +01:00
Jan Tattermusch 32b087e674
Ruby artifact speedup (#28542)
* fix ruby native extension build parallelism defaults

* allow overriding ruby artifact build parallelism with GRPC_RUBY_BUILD_PROCS

* honor --inner_jobs for ruby artifact build

* always start building ruby artifacts first

* fine tune grpc_distribtests_ruby.sh

* address review feedback

* strip newline from nproc output
2022-01-13 14:58:48 +01:00
apolcyn 95b313de82
Remove ruby 2.4 support (#28522)
* changes to remove ruby 2.4 support

* some fixes

* remove opensuse since eol

* fixes

* remove unused x86 dockerfile

* stop building for ruby 2.4

* update build scripts

* fix scripts

* fix sanity

Co-authored-by: Jan Tattermusch <jtattermusch@google.com>
2022-01-11 13:30:58 +01:00
apolcyn 3c368a5b2c
Don't gem install rake-compiler on macos setup scripts (#28415)
* Don't gem install rake-compiler on macos setup scripts
2021-12-28 09:57:33 -08:00
Mike Dalessio 2530c73d44
ruby: support "arm64-darwin" platform native gem (#25992)
Related to:

- #25755
- #25794
2021-10-28 18:39:39 +02:00
Mike Dalessio 3181f4e530
ruby: build native Darwin gems using rake-compiler-dock (#25794)
* ruby: use squiggly heredoc for rake-compiler-dock commands

* ruby: use `bundler exec` when building native gems

* ruby: clean .{bundle,so} from src/ruby/lib when building native gems

Failing to remove these files between native builds leads
rake-compiler to establish circular dependencies (which may be a bug
in rake-compiler, but this feels like an easy and good thing to do,
anyway).

* ruby: extract linux and darwin RUBY_PLATFORM checks into variables

There were already "windows" and "bsd" flags, so let's improve
consistency and readability, and set a clear pattern for subsequent
flags.

* ruby: rely on rake-compiler-dock v1.1.0 to set no_native correctly

As of v1.1.0 there's no need to set this explicitly anymore; it will
be true whenever the extension is being built in a RCD container.

See https://github.com/rake-compiler/rake-compiler-dock/commit/362890d

* ruby: add "x86_64-darwin" platform gem

Using RCD for this platform unifies the Darwin native gem build
process with the Linux native gems, which should help avoid
inconsistencies in packaging that result in issues like the missing
Ruby 3.0 binaries in #25060.

Please note that this change leaves the "universal-darwin" platform
native gem untouched, but provides a path forward if the project ever
decides to drop "universal" binary support.

Related to:

- #25429
- #25756
2021-10-19 09:20:24 +02:00
Alexander Polcyn b94f09aaf4 Drop support for ruby 2.3 2021-01-19 17:25:47 -08:00
Alexander Polcyn 56f1944e2d truncate windows dlls for linux package 2021-01-05 14:15:19 -08:00
Alexander Polcyn 74693fa1d8 Add ruby 3.0 to build matrix; upgrade rake-compiler-docker image to 1.1.0 2020-12-29 15:58:20 -08:00
Alexander Polcyn 1c8e28dcd2 Revert "Manylinux2010-based Ruby images"
This reverts commit bec51c0175.
2020-12-29 15:56:36 -08:00
Esun Kim bec51c0175 Manylinux2010-based Ruby images 2020-07-16 14:37:25 -07:00
Esun Kim bfa1ca968c Add gRPC-specific docker images for Ruby build 2020-07-07 09:54:44 -07:00
Alexander Polcyn c60ba7e77f Add back source-only ruby packages for master 2020-06-11 12:04:46 -07:00
Alexander Polcyn 09bc1eebe4 Add ruby 2.7 to mac binary packages 2020-03-02 01:06:21 -08:00
Jan Tattermusch 5a6e713bda fix ruby linux artifact build 2020-02-26 19:56:49 -05:00
Lars Kanis 4c667476a0 Add ruby-2.7 to build process of binary gems for Windows and Linux
With rake-compiler-dock-1.0.1 there's no need to use a derived Dockerfile.
The standard RCD image can be used instead.
The only issue is with conflicting declarations of gettimeofday(), which can be easily worked around by patching win32.h before the build.

Fixes #21514
2020-02-16 21:25:38 +01:00
Esun Kim 25b56ee1dd Add LDXX to Rakefile 2019-08-23 16:26:10 -07:00
Alexander Polcyn 9aa48c6d1c Drop support for ruby < 2.3; update and unskip distrib tests 2019-06-20 07:01:52 +00:00
Alexander Polcyn 67f523ce13 Add support for ruby 2.6.0 binary package builds, drop 2.1 and 2.0
binary package builds; pin bundler to 1.17.3 where necessary
2019-01-03 18:08:05 +00:00
Alexander Polcyn a803c0340a Remove source code and the grpc_c.so file that was built as a local binary from the ruby
binary packages
2018-03-27 11:14:21 -07:00
Muxi Yan d5696eb7d6
Revert "Partial revert PR#14042" 2018-02-06 17:27:01 -08:00
Muxi Yan 3cb1b0aa2f Partial revert PR#14042 2018-02-05 13:47:31 -08:00
Alexander Polcyn 3be06433af Ruby macos kokoro environment and package build updates 2018-01-16 20:44:37 -08:00
Alexander Polcyn 8065a5e73c Use rake-compiler-dock's Dockerfile as a base in grpc's fork of it 2018-01-08 13:27:20 -08:00
Yash Tibrewal c7eaff15c0 Ignoring all ruby build errors for now 2017-10-02 16:34:00 -07:00
Yash Tibrewal 46ccf7a441 Trying _POSIX define for ruby build 2017-10-02 16:34:00 -07:00
Yash Tibrewal 10b306559b Rolling back Rakefile changes 2017-10-02 16:34:00 -07:00
Yash Tibrewal d6a7a44ec9 Ruby Rakefile modifications try 2017-10-02 16:34:00 -07:00
Alexander Polcyn 3a00f79b0d tentatively set embed_cares in mingw build as is done in mac/linux build 2017-09-09 16:32:49 +02:00
Alexander Polcyn d0033d977c disable some compiler warnings 2017-09-09 16:32:48 +02:00
Alexander Polcyn 5fbc5776e1 experiment 2017-09-09 16:32:48 +02:00
Alexander Polcyn 7aa184bb42 specify mingw g++ compiler for ruby windows artifact build 2017-05-21 23:03:11 -07:00
Yuchen Zeng 2aa194329b c-ares mingw32 support 2017-04-18 15:21:40 -07:00
Alexander Polcyn 4e606751db add end2end tests to formatter and adjust to formatter 2017-03-20 00:07:25 -07:00
Nicolas "Pixel" Noble a9fb111323 Ruby sucks. 2017-02-01 19:45:42 +01:00