prepare_build_macos_rc 778 B

1234567891011121314151617181920212223242526272829303132333435
  1. #!/bin/bash
  2. #
  3. # This script sets up a Kokoro MacOS worker for running Protobuf tests
  4. ##
  5. # Select Xcode version
  6. export DEVELOPER_DIR=/Applications/Xcode_9.1.app/Contents/Developer
  7. ##
  8. # Select C/C++ compilers
  9. export CC=gcc
  10. export CXX=g++
  11. ##
  12. # Install Brew and core softwares
  13. ruby -e "$(curl -fsSL https://raw.githubusercontent.com/Homebrew/install/master/install)"
  14. source $HOME/.rvm/scripts/rvm
  15. brew tap homebrew/homebrew-php
  16. brew uninstall node icu4c
  17. brew install gflags gpg gpg2 node pcre php56 ruby
  18. ##
  19. # Install Tox
  20. sudo pip install tox==2.4.1
  21. ##
  22. # Install RVM
  23. gpg2 --keyserver hkp://keys.gnupg.net --recv-keys 409B6B1796C275462A1703113804BB82D39DC0E3
  24. command curl -sSL https://rvm.io/mpapis.asc | gpg2 --import -
  25. curl -sSL https://get.rvm.io | bash -s stable --ruby