Merge commit '36bca61764984ff5395653cf8377ec5daa71b709' as 'libs/protobuf'
This commit is contained in:
14
libs/protobuf/kokoro/release/ruby/linux/build_artifacts.sh
Executable file
14
libs/protobuf/kokoro/release/ruby/linux/build_artifacts.sh
Executable file
@@ -0,0 +1,14 @@
|
||||
#!/bin/bash
|
||||
|
||||
set -ex
|
||||
|
||||
# change to repo root
|
||||
cd $(dirname $0)/../../../..
|
||||
|
||||
source kokoro/release/ruby/linux/prepare_build.sh
|
||||
|
||||
# ruby environment
|
||||
source kokoro/release/ruby/linux/ruby/ruby_build_environment.sh
|
||||
|
||||
# build artifacts
|
||||
bash kokoro/release/ruby/linux/ruby/ruby_build.sh
|
||||
8
libs/protobuf/kokoro/release/ruby/linux/common.cfg
Normal file
8
libs/protobuf/kokoro/release/ruby/linux/common.cfg
Normal file
@@ -0,0 +1,8 @@
|
||||
# Configuration for Linux release builds
|
||||
build_file: "protobuf/kokoro/release/ruby/linux/build_artifacts.sh"
|
||||
|
||||
action {
|
||||
define_artifacts {
|
||||
regex: "github/protobuf/artifacts/**"
|
||||
}
|
||||
}
|
||||
1
libs/protobuf/kokoro/release/ruby/linux/continuous.cfg
Normal file
1
libs/protobuf/kokoro/release/ruby/linux/continuous.cfg
Normal file
@@ -0,0 +1 @@
|
||||
# Keep this file empty! Use common.cfg instead.
|
||||
12
libs/protobuf/kokoro/release/ruby/linux/prepare_build.sh
Executable file
12
libs/protobuf/kokoro/release/ruby/linux/prepare_build.sh
Executable file
@@ -0,0 +1,12 @@
|
||||
#!/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
|
||||
|
||||
# All artifacts come here
|
||||
mkdir artifacts
|
||||
export ARTIFACT_DIR=$(pwd)/artifacts
|
||||
1
libs/protobuf/kokoro/release/ruby/linux/presubmit.cfg
Normal file
1
libs/protobuf/kokoro/release/ruby/linux/presubmit.cfg
Normal file
@@ -0,0 +1 @@
|
||||
# Keep this file empty! Use common.cfg instead.
|
||||
8
libs/protobuf/kokoro/release/ruby/linux/release.cfg
Normal file
8
libs/protobuf/kokoro/release/ruby/linux/release.cfg
Normal file
@@ -0,0 +1,8 @@
|
||||
# Configuration for Linux release builds
|
||||
build_file: "protobuf/kokoro/release/ruby/linux/build_artifacts.sh"
|
||||
|
||||
action {
|
||||
define_artifacts {
|
||||
regex: "github/protobuf/artifacts/**"
|
||||
}
|
||||
}
|
||||
22
libs/protobuf/kokoro/release/ruby/linux/ruby/ruby_build.sh
Executable file
22
libs/protobuf/kokoro/release/ruby/linux/ruby/ruby_build.sh
Executable file
@@ -0,0 +1,22 @@
|
||||
#!/bin/bash
|
||||
|
||||
set -ex
|
||||
|
||||
# Build protoc
|
||||
use_bazel.sh 5.1.1
|
||||
bazel build //:protoc
|
||||
|
||||
# The java build setup expects protoc in the root directory.
|
||||
cp bazel-bin/protoc .
|
||||
export PROTOC=$PWD/protoc
|
||||
|
||||
# Pull in dependencies.
|
||||
git submodule update --init --recursive
|
||||
|
||||
umask 0022
|
||||
pushd ruby
|
||||
gem install bundler -v 2.1.4
|
||||
bundle update && bundle exec rake gem:native
|
||||
ls pkg
|
||||
mv pkg/* $ARTIFACT_DIR
|
||||
popd
|
||||
9
libs/protobuf/kokoro/release/ruby/linux/ruby/ruby_build_environment.sh
Executable file
9
libs/protobuf/kokoro/release/ruby/linux/ruby/ruby_build_environment.sh
Executable file
@@ -0,0 +1,9 @@
|
||||
#!/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
|
||||
# The version needs to be updated if the version specified in Gemfile.lock is changed
|
||||
gem install bundler -v '1.17.3'
|
||||
set -ex
|
||||
Reference in New Issue
Block a user