2017-06-01 18:46:43 +00:00
|
|
|
#!/bin/bash
|
|
|
|
#
|
|
|
|
# This script sets up a Kokoro MacOS worker for running Protobuf tests
|
|
|
|
|
|
|
|
##
|
|
|
|
# Select Xcode version
|
|
|
|
|
2020-02-12 19:34:51 +00:00
|
|
|
# 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
|
2019-11-14 21:44:33 +00:00
|
|
|
# "autom4te: need GNU m4 1.4 or later: /usr/bin/m4"
|
|
|
|
# go/kokoro/userdocs/macos/selecting_xcode.md for more information.
|
2020-02-12 19:34:51 +00:00
|
|
|
export DEVELOPER_DIR=/Applications/Xcode_11.3.app/Contents/Developer
|
2017-06-01 18:46:43 +00:00
|
|
|
|
|
|
|
##
|
|
|
|
# Select C/C++ compilers
|
|
|
|
|
|
|
|
export CC=gcc
|
|
|
|
export CXX=g++
|
|
|
|
|
|
|
|
##
|
|
|
|
# Install Brew and core softwares
|
|
|
|
|
|
|
|
ruby -e "$(curl -fsSL https://raw.githubusercontent.com/Homebrew/install/master/install)"
|
2017-08-23 00:16:58 +00:00
|
|
|
source $HOME/.rvm/scripts/rvm
|
2019-08-13 18:36:17 +00:00
|
|
|
brew uninstall node icu4c cmake wget
|
2019-02-26 20:52:06 +00:00
|
|
|
brew prune
|
2019-08-13 18:36:17 +00:00
|
|
|
brew install gflags gpg gpg2 node openssl pcre ruby cmake wget
|
2019-02-26 20:52:06 +00:00
|
|
|
sudo chown -R $(whoami) /usr/local
|
|
|
|
brew postinstall node
|
2017-06-01 18:46:43 +00:00
|
|
|
|
|
|
|
##
|
|
|
|
# Install Tox
|
|
|
|
|
|
|
|
sudo pip install tox==2.4.1
|
|
|
|
|
|
|
|
##
|
|
|
|
# Install RVM
|
|
|
|
|
|
|
|
gpg2 --keyserver hkp://keys.gnupg.net --recv-keys 409B6B1796C275462A1703113804BB82D39DC0E3
|
|
|
|
command curl -sSL https://rvm.io/mpapis.asc | gpg2 --import -
|
|
|
|
curl -sSL https://get.rvm.io | bash -s stable --ruby
|