Merge commit '36bca61764984ff5395653cf8377ec5daa71b709' as 'libs/protobuf'

This commit is contained in:
Henry Winkel
2022-10-22 14:46:58 +02:00
2186 changed files with 838730 additions and 0 deletions

View 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

View 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/**"
}
}

View File

@@ -0,0 +1 @@
# Keep this file empty! Use common.cfg instead.

View 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

View File

@@ -0,0 +1 @@
# Keep this file empty! Use common.cfg instead.

View 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/**"
}
}

View 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

View 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