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.
This commit is contained in:
Vadim Zeitlin 2021-09-30 20:55:07 +02:00
commit 11c8760639

View file

@ -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