@ -3,12 +3,25 @@
set -ex
set -ex
set +ex # rvm script is very verbose and exits with errorcode
set +ex # rvm script is very verbose and exits with errorcode
curl -sSL https://rvm.io/mpapis.asc | gpg --import -
curl -sSL https://rvm.io/pkuczynski.asc | gpg --import -
# Old OpenSSL versions cannot handle the SSL certificate used by
# https://get.rvm.io, so as a workaround we download RVM directly from
# GitHub. See this issue for details: https://github.com/rvm/rvm/issues/5133
curl -sSL https://raw.githubusercontent.com/rvm/rvm/master/binscripts/rvm-installer | bash -s master --ruby
source $HOME /.rvm/scripts/rvm
source $HOME /.rvm/scripts/rvm
set -e # rvm commands are very verbose
set -e # rvm commands are very verbose
time rvm install 2.5.0
time rvm install 2.5.0
rvm use 2.5.0
rvm use 2.5.0
gem install rake-compiler --no-document
gem install rake-compiler --no-document
gem install bundler --no-document
gem install bundler --no-document
time rvm install 3.1.0
rvm use 3.1.0
gem install rake-compiler --no-document
gem install bundler --no-document
time rvm install 2.7.0
time rvm install 2.7.0
rvm use 2.7.0 --default
rvm use 2.7.0 --default
gem install rake-compiler --no-document
gem install rake-compiler --no-document
@ -20,6 +33,8 @@ set -ex
rm -rf ~/.rake-compiler
rm -rf ~/.rake-compiler
CROSS_RUBY = $( mktemp tmpfile.XXXXXXXX)
CROSS_RUBY = $( mktemp tmpfile.XXXXXXXX)
CROSS_RUBY31 = $( mktemp tmpfile.XXXXXXXX)
curl https://raw.githubusercontent.com/rake-compiler/rake-compiler/72184e51779b6a3b9b8580b036a052fdc3181ced/tasks/bin/cross-ruby.rake > " $CROSS_RUBY "
curl https://raw.githubusercontent.com/rake-compiler/rake-compiler/72184e51779b6a3b9b8580b036a052fdc3181ced/tasks/bin/cross-ruby.rake > " $CROSS_RUBY "
@ -52,8 +67,33 @@ patch "$CROSS_RUBY" << EOF
end
end
EOF
EOF
cp $CROSS_RUBY $CROSS_RUBY31
patch " $CROSS_RUBY31 " << EOF
--- cross-ruby.rake 2022-03-04 11:49:52.000000000 +0000
+++ patched 2022-03-04 11:58:22.000000000 +0000
@@ -114,6 +114,7 @@
'--enable-static' ,
'--disable-shared' ,
'--disable-install-doc' ,
+ '--with-coroutine=ucontext' ,
'--without-gmp' ,
'--with-ext=' ,
'LDFLAGS=-pipe' ,
EOF
MAKE = "make -j8"
MAKE = "make -j8"
set +x # rvm commands are very verbose
rvm use 3.1.0
set -x
ruby --version | grep 'ruby 3.1.0'
for v in 3.1.0 ; do
ccache -c
rake -f " $CROSS_RUBY31 " cross-ruby VERSION = " $v " HOST = x86_64-darwin MAKE = " $MAKE "
rake -f " $CROSS_RUBY31 " cross-ruby VERSION = " $v " HOST = aarch64-darwin MAKE = " $MAKE "
done
set +x # rvm commands are very verbose
set +x # rvm commands are very verbose
rvm use 2.7.0
rvm use 2.7.0
set -x
set -x