From 11c876063926b8998cf6b8fafc0a4a5932b4a189 Mon Sep 17 00:00:00 2001 From: Vadim Zeitlin Date: Thu, 30 Sep 2021 20:55:07 +0200 Subject: [PATCH] Install rvm in CI setup script if it's not available It is not available out of the box in GitHub environment, unlike under Travis CI, so install it ourselves. Note that we do it manually because installing the rael-gc/rvm PPA doesn't seem to work with weird failures in GitHub Actions environment. We also can't use gpg2 --recv-keys in this environment as it doesn't work, apparently due to a firewall. --- Tools/CI-linux-install.sh | 14 ++++++++++++++ 1 file changed, 14 insertions(+) diff --git a/Tools/CI-linux-install.sh b/Tools/CI-linux-install.sh index 0ce8f1203..ab5b10ddb 100644 --- a/Tools/CI-linux-install.sh +++ b/Tools/CI-linux-install.sh @@ -96,6 +96,20 @@ case "$SWIGLANG" in $RETRY sudo apt-get -qq install r-base ;; "ruby") + if ! command -v rvm; then + case "$VER" in + 1.9 | 2.0 | 2.1 | 2.2 | 2.3 ) + $RETRY sudo apt-get -qq install libgdbm-dev libncurses5-dev libyaml-dev libssl1.0-dev + ;; + esac + # YOLO + curl -sSL https://rvm.io/mpapis.asc | gpg --import - + curl -sSL https://rvm.io/pkuczynski.asc | gpg --import - + curl -sSL https://get.rvm.io | bash -s stable + set +x + source $HOME/.rvm/scripts/rvm + set -x + fi if [[ "$VER" == "2.7" || "$VER" == "3.0" ]]; then # Ruby 2.7+ support is currently only rvm master (30 Dec 2019) $RETRY rvm get master