|
4 | 4 |
|
5 | 5 | set -eux
|
6 | 6 |
|
| 7 | +export HOMEBREW_PREFIX=$(brew --prefix) |
| 8 | + |
7 | 9 | ##
|
8 | 10 | # Select Xcode version
|
9 | 11 |
|
10 |
| -# Remember to update the Xcode version when Xcode_11.3.app is not available. |
11 |
| -# If xcode is not available, it will probably encounter the failure for |
12 |
| -# "autom4te: need GNU m4 1.4 or later: /usr/bin/m4" |
13 |
| -# go/kokoro/userdocs/macos/selecting_xcode.md for more information. |
14 |
| -export DEVELOPER_DIR=/Applications/Xcode_11.3.app/Contents/Developer |
| 12 | +## |
| 13 | +# Select Xcode version |
| 14 | +export DEVELOPER_DIR=/Applications/Xcode_13.3.1.app/Contents/Developer |
| 15 | +sudo xcode-select -s "${DEVELOPER_DIR}" |
15 | 16 |
|
16 | 17 | ##
|
17 | 18 | # Select C/C++ compilers
|
18 | 19 |
|
19 | 20 | export CC=gcc
|
20 | 21 | export CXX=g++
|
21 | 22 |
|
| 23 | +## |
| 24 | +# Install Python 2 by default |
| 25 | + |
| 26 | +eval "$(pyenv init -)" |
| 27 | +pyenv install -v -s 2.7.18 && pyenv global 2.7.18 |
| 28 | + |
22 | 29 | ##
|
23 | 30 | # Install Tox
|
24 | 31 |
|
25 | 32 | if [[ "${KOKORO_INSTALL_TOX:-}" == "yes" ]] ; then
|
26 |
| - sudo python3 -m pip install --upgrade pip tox |
| 33 | + pyenv install -v -s 3.7.13 |
| 34 | + pyenv global 3.7.13 |
| 35 | + sudo python -m pip install --upgrade pip tox tox-pyenv |
27 | 36 | fi
|
28 | 37 |
|
29 | 38 | ##
|
30 |
| -# Install RVM |
31 |
| - |
| 39 | +# Setup RVM |
32 | 40 | if [[ "${KOKORO_INSTALL_RVM:-}" == "yes" ]] ; then
|
33 |
| - curl -sSL https://rvm.io/mpapis.asc | gpg --import - |
34 |
| - curl -sSL https://rvm.io/pkuczynski.asc | gpg --import - |
35 |
| - |
36 |
| - # Old OpenSSL versions cannot handle the SSL certificate used by |
37 |
| - # https://get.rvm.io, so as a workaround we download RVM directly from |
38 |
| - # GitHub. See this issue for details: https://github.com/rvm/rvm/issues/5133 |
39 |
| - curl -sSL https://raw.githubusercontent.com/rvm/rvm/master/binscripts/rvm-installer | bash -s master --ruby |
| 41 | + git config --global --add safe.directory $HOMEBREW_PREFIX/Library/Taps/homebrew/homebrew-cask |
| 42 | + git config --global --add safe.directory $HOMEBREW_PREFIX/Library/Taps/homebrew/homebrew-core |
| 43 | + git config --global --add safe.directory $HOMEBREW_PREFIX/Library/Taps/homebrew/homebrew-services |
| 44 | + sudo chown -R $(whoami) $HOME/.rvm/ |
40 | 45 | fi
|
0 commit comments