Protocol Buffers - Google's data interchange format (grpc依赖)
https://developers.google.com/protocol-buffers/
You can not select more than 25 topics
Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
42 lines
1.2 KiB
42 lines
1.2 KiB
#!/bin/bash |
|
# |
|
# This script sets up a Kokoro MacOS worker for running Protobuf tests |
|
|
|
set -eux |
|
|
|
export HOMEBREW_PREFIX=$(brew --prefix) |
|
export HOMEBREW_NO_INSTALLED_DEPENDENTS_CHECK=1 # Do not automatically update packages. |
|
|
|
## |
|
# Select Xcode version |
|
export DEVELOPER_DIR=/Applications/Xcode_14.app/Contents/Developer |
|
sudo xcode-select -s "${DEVELOPER_DIR}" |
|
|
|
## |
|
# Use Python 2 by default (for googletest) |
|
pyenv global 2.7.18 |
|
|
|
## |
|
# Setup RVM |
|
if [[ "${KOKORO_INSTALL_RVM:-}" == "yes" ]] ; then |
|
git config --global --add safe.directory $HOMEBREW_PREFIX/Library/Taps/homebrew/homebrew-cask |
|
git config --global --add safe.directory $HOMEBREW_PREFIX/Library/Taps/homebrew/homebrew-core |
|
git config --global --add safe.directory $HOMEBREW_PREFIX/Library/Taps/homebrew/homebrew-services |
|
sudo chown -R $(whoami) $HOME/.rvm/ |
|
fi |
|
|
|
# "Install" valgrind if it doesn't exist |
|
## |
|
if [ ! -x "$(command -v valgrind)" ]; then |
|
echo "#! /bin/bash" > valgrind |
|
chmod ug+x valgrind |
|
sudo mv valgrind /usr/local/bin/valgrind |
|
fi |
|
|
|
## |
|
# Install Virtual Python Environment |
|
|
|
if [[ "${KOKORO_INSTALL_VENV:-}" == "yes" ]] ; then |
|
python3 -m venv venv |
|
source venv/bin/activate |
|
fi
|
|
|