8a0aa4b372
Our Mac test runs recently started failing to download RVM. The issue appears to be a combination of an SSL certificate expiring and old OpenSSL versions having a bug preventing them from validating the replacement certificate: https://github.com/rvm/rvm/issues/5133 This commit works around the problem by downloading RVM from GitHub as suggested in one of the comments on the issue above.
41 lines
1.1 KiB
Bash
Executable File
41 lines
1.1 KiB
Bash
Executable File
#!/bin/bash
|
|
#
|
|
# This script sets up a Kokoro MacOS worker for running Protobuf tests
|
|
|
|
set -eux
|
|
|
|
##
|
|
# Select Xcode version
|
|
|
|
# Remember to update the Xcode version when Xcode_11.3.app is not available.
|
|
# If xcode is not available, it will probably encounter the failure for
|
|
# "autom4te: need GNU m4 1.4 or later: /usr/bin/m4"
|
|
# go/kokoro/userdocs/macos/selecting_xcode.md for more information.
|
|
export DEVELOPER_DIR=/Applications/Xcode_11.3.app/Contents/Developer
|
|
|
|
##
|
|
# Select C/C++ compilers
|
|
|
|
export CC=gcc
|
|
export CXX=g++
|
|
|
|
##
|
|
# Install Tox
|
|
|
|
if [[ "${KOKORO_INSTALL_TOX:-}" == "yes" ]] ; then
|
|
sudo python3 -m pip install --upgrade pip tox
|
|
fi
|
|
|
|
##
|
|
# Install RVM
|
|
|
|
if [[ "${KOKORO_INSTALL_RVM:-}" == "yes" ]] ; then
|
|
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 stable --ruby
|
|
fi
|