Skip to content

Commit

Permalink
Add ruby 2.7 to mac binary packages
Browse files Browse the repository at this point in the history
  • Loading branch information
apolcyn committed Mar 2, 2020
1 parent 5da8201 commit 09bc1ee
Show file tree
Hide file tree
Showing 3 changed files with 23 additions and 9 deletions.
2 changes: 1 addition & 1 deletion Rakefile
Expand Up @@ -130,7 +130,7 @@ task 'gem:native' do
"invoked on macos with ruby #{RUBY_VERSION}. The ruby macos artifact " \
"build should be running on ruby 2.5."
end
system "rake cross native gem RUBY_CC_VERSION=2.6.0:2.5.0:2.4.0:2.3.0 V=#{verbose} GRPC_CONFIG=#{grpc_config}"
system "rake cross native gem RUBY_CC_VERSION=2.7.0:2.6.0:2.5.0:2.4.0:2.3.0 V=#{verbose} GRPC_CONFIG=#{grpc_config}"
else
require 'rake_compiler_dock'

Expand Down
16 changes: 14 additions & 2 deletions tools/distrib/build_ruby_environment_macos.sh
Expand Up @@ -19,7 +19,7 @@ rm -rf ~/.rake-compiler

CROSS_RUBY=$(mktemp tmpfile.XXXXXXXX)

curl https://raw.githubusercontent.com/rake-compiler/rake-compiler/v1.0.3/tasks/bin/cross-ruby.rake > "$CROSS_RUBY"
curl https://raw.githubusercontent.com/rake-compiler/rake-compiler/v1.1.0/tasks/bin/cross-ruby.rake > "$CROSS_RUBY"

# See https://github.com/grpc/grpc/issues/12161 for verconf.h patch details
patch "$CROSS_RUBY" << EOF
Expand Down Expand Up @@ -49,11 +49,23 @@ EOF

MAKE="make -j8"

set +x # rvm commands are very verbose
source ~/.rvm/scripts/rvm
rvm use 2.7.0
set -x
ruby --version | grep 'ruby 2.7.0'
for v in 2.7.0 ; do
ccache -c
rake -f "$CROSS_RUBY" cross-ruby VERSION="$v" HOST=x86_64-darwin11 MAKE="$MAKE"
done
set +x
rvm use 2.5.0
set -x
ruby --version | grep 'ruby 2.5.0'
for v in 2.6.0 2.5.0 2.4.0 2.3.0 2.2.2 ; do
ccache -c
rake -f "$CROSS_RUBY" cross-ruby VERSION="$v" HOST=x86_64-darwin11 MAKE="$MAKE"
done

sed 's/x86_64-darwin-11/universal-darwin/' ~/.rake-compiler/config.yml > "$CROSS_RUBY"
mv "$CROSS_RUBY" ~/.rake-compiler/config.yml

14 changes: 8 additions & 6 deletions tools/internal_ci/helper_scripts/prepare_build_macos_rc
Expand Up @@ -39,14 +39,16 @@ then
set +ex # rvm script is very verbose and exits with errorcode
# Advice from https://github.com/Homebrew/homebrew-cask/issues/8629#issuecomment-68641176
brew update && brew upgrade brew-cask && brew cleanup && brew cask cleanup
rvm --debug requirements ruby-2.5.0
source $HOME/.rvm/scripts/rvm
set -e # rvm commands are very verbose
time rvm install 2.5.0
source $HOME/.rvm/scripts/rvm
for RUBY_VERSION in 2.5.0 2.7.0; do
rvm --debug requirements "ruby-${RUBY_VERSION}"
time rvm install "$RUBY_VERSION"
time gem install bundler -v 1.17.3 --no-document
time gem install rake-compiler --no-document
done;
rvm use 2.5.0 --default
time gem install bundler -v 1.17.3 --no-ri --no-doc
time gem install cocoapods --version 1.3.1 --no-ri --no-doc
time gem install rake-compiler --no-ri --no-doc
time gem install cocoapods --version 1.3.1 --no-document
rvm osx-ssl-certs status all
rvm osx-ssl-certs update all
set -ex
Expand Down

0 comments on commit 09bc1ee

Please sign in to comment.