support macos in jenkins run_distributions script

pull/2491/head
Stanley Cheung 10 years ago
parent d82d0b295b
commit 17bb3ec921
  1. 42
      tools/jenkins/run_distribution.sh

@ -32,6 +32,10 @@
# linuxbrew installation of a selected language
set -ex
if [ "$platform" == "linux" ]; then
if [ "$dist_channel" == "homebrew" ]; then
sha1=$(sha1sum tools/jenkins/grpc_linuxbrew/Dockerfile | cut -f1 -d\ )
DOCKER_IMAGE_NAME=grpc_linuxbrew_$sha1
@ -53,3 +57,41 @@ docker run $DOCKER_IMAGE_NAME bash -l \
npm set unsafe-perm true; \
rvm use ruby-2.1; \
$command"
else
echo "Unsupported $platform dist_channel $dist_channel"
exit 1
fi
elif [ "$platform" == "macos" ]; then
if [ "$dist_channel" == "homebrew" ]; then
which brew # TODO: for debug, can be removed later
brew list -l
rm -rf /tmp/homebrew-test
mkdir -p /tmp/homebrew-test
git clone https://github.com/Homebrew/homebrew.git /tmp/homebrew-test
cd /tmp/homebrew-test
# TODO: Uncomment these when the general structure of the script is verified
# PATH=/tmp/homebrew-test/bin:$PATH brew tap homebrew/dupes
# PATH=/tmp/homebrew-test/bin:$PATH brew install zlib
# PATH=/tmp/homebrew-test/bin:$PATH brew install openssl
# PATH=/tmp/homebrew-test/bin:$PATH brew tap grpc/grpc
# PATH=/tmp/homebrew-test/bin:$PATH brew install --without-python google-protobuf
# PATH=/tmp/homebrew-test/bin:$PATH brew install grpc
PATH=/tmp/homebrew-test/bin:$PATH brew list -l
brew list -l
cd ~/
rm -rf /tmp/homebrew-test
echo $PATH # TODO: for debug, can be removed later
brew list -l # TODO: for debug, can be removed later
else
echo "Unsupported $platform dist_channel $dist_channel"
exit 1
fi
else
echo "unsupported platform $platform"
exit 1
fi

Loading…
Cancel
Save