From 04fc2e9efec228979b321b61003a750783b4f977 Mon Sep 17 00:00:00 2001 From: CMK Date: Fri, 15 Jul 2022 12:22:10 +0800 Subject: [PATCH] chore: workaround openssl 3.0 break CI issue. https://github.com/rbenv/ruby-build/discussions/1853#discussioncomment-2146106 --- ci_scripts/ci_post_clone.sh | 20 +++++++++++++++++++- 1 file changed, 19 insertions(+), 1 deletion(-) diff --git a/ci_scripts/ci_post_clone.sh b/ci_scripts/ci_post_clone.sh index 89cd36138..81ff1ee07 100755 --- a/ci_scripts/ci_post_clone.sh +++ b/ci_scripts/ci_post_clone.sh @@ -19,7 +19,25 @@ echo 'eval "$(rbenv init -)"' >> ~/.zprofile source ~/.zprofile which ruby -rbenv install 3.0.3 +# by pass the openssl cannot build issue +# https://github.com/rbenv/ruby-build/discussions/1853#discussioncomment-2146106 +brew cleanup openssl@3.0 +brew uninstall openssl@3.0 +rm -rf /opt/homebrew/etc/openssl@3 + +brew install openssl@1.1 + +export PATH="/opt/homebrew/opt/openssl@1.1/bin:$PATH" +export LDFLAGS="-L/opt/homebrew/opt/openssl@1.1/lib" +export CPPFLAGS="-I/opt/homebrew/opt/openssl@1.1/include" +export PKG_CONFIG_PATH="/opt/homebrew/opt/openssl@1.1/lib/pkgconfig" +export RUBY_CONFIGURE_OPTS="--with-openssl-dir=/opt/homebrew/opt/openssl@1.1" +source ~/.zshrc + +CONFIGURE_OPTS=--with-openssl-dir=`brew --prefix openssl@1.1` CFLAGS="-Wno-error=implicit-function-declaration" rbenv install 3.0.3 + +# install ruby 3.0.3 +# rbenv install 3.0.3 rbenv global 3.0.3 ruby --version