Build ruby gem on kokoro (#4819)
* Install rake compiler * Add kokoro config to build ruby gem on linux * Rename from linix to linux * Fix prepare_build.sh name * Clean up * Install bundler * Install bundler * Use c99 in order to build gem on mingw-32 on ruby 2.0.0 See https://github.com/rake-compiler/rake-compiler-dock/issues/4 * Move c99 config to extcofig.rbpull/4857/head
parent
56d27530ab
commit
f7ada1280f
7 changed files with 65 additions and 1 deletions
@ -0,0 +1,14 @@ |
|||||||
|
#!/bin/bash |
||||||
|
|
||||||
|
set -ex |
||||||
|
|
||||||
|
# change to repo root |
||||||
|
cd $(dirname $0)/../../.. |
||||||
|
|
||||||
|
source kokoro/release/linux/prepare_build.sh |
||||||
|
|
||||||
|
# ruby environment |
||||||
|
source kokoro/release/linux/ruby/ruby_build_environment.sh |
||||||
|
|
||||||
|
# build artifacts |
||||||
|
bash kokoro/release/linux/ruby/ruby_build.sh |
@ -0,0 +1,16 @@ |
|||||||
|
#!/bin/bash |
||||||
|
|
||||||
|
# Move docker's storage location to scratch disk so we don't run out of space. |
||||||
|
echo 'DOCKER_OPTS="${DOCKER_OPTS} --graph=/tmpfs/docker"' | sudo tee --append /etc/default/docker |
||||||
|
# Use container registry mirror for pulling docker images (should make downloads faster) |
||||||
|
# See https://cloud.google.com/container-registry/docs/using-dockerhub-mirroring |
||||||
|
echo 'DOCKER_OPTS="${DOCKER_OPTS} --registry-mirror=https://mirror.gcr.io"' | sudo tee --append /etc/default/docker |
||||||
|
sudo service docker restart |
||||||
|
|
||||||
|
# Download Docker images from DockerHub |
||||||
|
export DOCKERHUB_ORGANIZATION=grpctesting |
||||||
|
|
||||||
|
# All artifacts come here |
||||||
|
mkdir artifacts |
||||||
|
export ARTIFACT_DIR=$(pwd)/artifacts |
||||||
|
|
@ -0,0 +1,8 @@ |
|||||||
|
# Configuration for Linux release builds |
||||||
|
build_file: "protobuf/kokoro/release/linux/build_artifacts.sh" |
||||||
|
|
||||||
|
action { |
||||||
|
define_artifacts { |
||||||
|
regex: "github/protobuf/artifacts/**" |
||||||
|
} |
||||||
|
} |
@ -0,0 +1,15 @@ |
|||||||
|
#!/bin/bash |
||||||
|
|
||||||
|
# Build protoc |
||||||
|
if test ! -e src/protoc; then |
||||||
|
./autogen.sh |
||||||
|
./configure |
||||||
|
make -j4 |
||||||
|
fi |
||||||
|
|
||||||
|
umask 0022 |
||||||
|
pushd ruby |
||||||
|
bundle install && bundle exec rake gem:native |
||||||
|
ls pkg |
||||||
|
mv pkg/* $ARTIFACT_DIR |
||||||
|
popd |
@ -0,0 +1,8 @@ |
|||||||
|
#!/bin/bash |
||||||
|
|
||||||
|
set +ex |
||||||
|
[[ -s /etc/profile.d/rvm.sh ]] && . /etc/profile.d/rvm.sh |
||||||
|
set -e # rvm commands are very verbose |
||||||
|
rvm --default use ruby-2.4.1 |
||||||
|
gem install bundler --update |
||||||
|
set -ex |
Loading…
Reference in new issue