From 0b89fd6537a2a48104133c28da0fb183624e6068 Mon Sep 17 00:00:00 2001 From: Bo Yang Date: Fri, 4 Jan 2019 11:41:43 -0800 Subject: [PATCH 1/6] Add ruby 2.6 gem build for linux --- kokoro/linux/dockerfile/push_testing_images.sh | 2 +- .../linux/dockerfile/release/ruby_rake_compiler/Dockerfile | 3 +++ kokoro/release/ruby/linux/prepare_build.sh | 5 +++-- 3 files changed, 7 insertions(+), 3 deletions(-) create mode 100644 kokoro/linux/dockerfile/release/ruby_rake_compiler/Dockerfile diff --git a/kokoro/linux/dockerfile/push_testing_images.sh b/kokoro/linux/dockerfile/push_testing_images.sh index 8bc1097ccb4e..54a69e3eaa7a 100755 --- a/kokoro/linux/dockerfile/push_testing_images.sh +++ b/kokoro/linux/dockerfile/push_testing_images.sh @@ -8,7 +8,7 @@ cd - DOCKERHUB_ORGANIZATION=protobuftesting -for DOCKERFILE_DIR in test/* +for DOCKERFILE_DIR in test/* release/* do # Generate image name based on Dockerfile checksum. That works well as long # as can count on dockerfiles being written in a way that changing the logical diff --git a/kokoro/linux/dockerfile/release/ruby_rake_compiler/Dockerfile b/kokoro/linux/dockerfile/release/ruby_rake_compiler/Dockerfile new file mode 100644 index 000000000000..9ba664d8b05a --- /dev/null +++ b/kokoro/linux/dockerfile/release/ruby_rake_compiler/Dockerfile @@ -0,0 +1,3 @@ +FROM grpctesting/rake-compiler-dock_53c22085d091183c528303791e7771359f699bcf + +RUN /bin/bash -l -c "gem install bundler" diff --git a/kokoro/release/ruby/linux/prepare_build.sh b/kokoro/release/ruby/linux/prepare_build.sh index d3ff87647e2c..1304ae26fe3b 100755 --- a/kokoro/release/ruby/linux/prepare_build.sh +++ b/kokoro/release/ruby/linux/prepare_build.sh @@ -8,9 +8,10 @@ echo 'DOCKER_OPTS="${DOCKER_OPTS} --registry-mirror=https://mirror.gcr.io"' | su sudo service docker restart # Download Docker images from DockerHub -export DOCKERHUB_ORGANIZATION=grpctesting +DOCKERFILE_DIR=kokoro/linux/dockerfile/release/ruby_rake_compiler +DOCKERFILE_PREFIX=$(basename $DOCKERFILE_DIR) +export RAKE_COMPILER_DOCK_IMAGE=${DOCKERHUB_ORGANIZATION}/${DOCKERFILE_PREFIX}_$(sha1sum $DOCKERFILE_DIR/Dockerfile | cut -f1 -d\ ) # All artifacts come here mkdir artifacts export ARTIFACT_DIR=$(pwd)/artifacts - From 4aa809b7f985f22c2707bc6de2f49bd854fee368 Mon Sep 17 00:00:00 2001 From: Bo Yang Date: Fri, 4 Jan 2019 11:59:31 -0800 Subject: [PATCH 2/6] Add docker hub organization --- kokoro/release/ruby/linux/prepare_build.sh | 1 + 1 file changed, 1 insertion(+) diff --git a/kokoro/release/ruby/linux/prepare_build.sh b/kokoro/release/ruby/linux/prepare_build.sh index 1304ae26fe3b..f2257c3c7530 100755 --- a/kokoro/release/ruby/linux/prepare_build.sh +++ b/kokoro/release/ruby/linux/prepare_build.sh @@ -8,6 +8,7 @@ echo 'DOCKER_OPTS="${DOCKER_OPTS} --registry-mirror=https://mirror.gcr.io"' | su sudo service docker restart # Download Docker images from DockerHub +DOCKERHUB_ORGANIZATION=protobuftesting DOCKERFILE_DIR=kokoro/linux/dockerfile/release/ruby_rake_compiler DOCKERFILE_PREFIX=$(basename $DOCKERFILE_DIR) export RAKE_COMPILER_DOCK_IMAGE=${DOCKERHUB_ORGANIZATION}/${DOCKERFILE_PREFIX}_$(sha1sum $DOCKERFILE_DIR/Dockerfile | cut -f1 -d\ ) From 50128480282ff6bc42cb20ce4a89d36940f591f9 Mon Sep 17 00:00:00 2001 From: Bo Yang Date: Fri, 4 Jan 2019 12:24:28 -0800 Subject: [PATCH 3/6] Add ruby2.6 in cross compile targets --- kokoro/release/ruby/macos/ruby/ruby_build_environment.sh | 2 +- ruby/Rakefile | 4 ++-- 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/kokoro/release/ruby/macos/ruby/ruby_build_environment.sh b/kokoro/release/ruby/macos/ruby/ruby_build_environment.sh index e9c619cd1cf5..3bf5a748a127 100755 --- a/kokoro/release/ruby/macos/ruby/ruby_build_environment.sh +++ b/kokoro/release/ruby/macos/ruby/ruby_build_environment.sh @@ -47,7 +47,7 @@ EOF MAKE="make -j8" -for v in 2.5.0 2.4.0 2.3.0 2.2.2 2.1.6 2.0.0-p645 ; do +for v in 2.6.0 2.5.0 2.4.0 2.3.0 ; do ccache -c rake -f "$CROSS_RUBY" cross-ruby VERSION="$v" HOST=x86_64-darwin11 MAKE="$MAKE" done diff --git a/ruby/Rakefile b/ruby/Rakefile index f1c5bc8c5538..1ab7ac29a044 100644 --- a/ruby/Rakefile +++ b/ruby/Rakefile @@ -70,13 +70,13 @@ else task 'gem:windows' do require 'rake_compiler_dock' - RakeCompilerDock.sh "bundle && IN_DOCKER=true rake cross native gem RUBY_CC_VERSION=2.5.0:2.4.0:2.3.0:2.2.2:2.1.6:2.0.0" + RakeCompilerDock.sh "bundle && IN_DOCKER=true rake cross native gem RUBY_CC_VERSION=2.6.0:2.5.1:2.4.0:2.3.0" end if RUBY_PLATFORM =~ /darwin/ task 'gem:native' do system "rake genproto" - system "rake cross native gem RUBY_CC_VERSION=2.5.0:2.4.0:2.3.0:2.2.2:2.1.6:2.0.0" + system "rake cross native gem RUBY_CC_VERSION=2.6.0:2.5.1:2.4.0:2.3.0" end else task 'gem:native' => [:genproto, 'gem:windows'] From 37b3332e94ab23788c691097c3549b517db8ccfa Mon Sep 17 00:00:00 2001 From: Bo Yang Date: Mon, 7 Jan 2019 12:36:29 -0800 Subject: [PATCH 4/6] Fix tests --- kokoro/release/ruby/macos/ruby/ruby_build_environment.sh | 2 +- ruby/Rakefile | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/kokoro/release/ruby/macos/ruby/ruby_build_environment.sh b/kokoro/release/ruby/macos/ruby/ruby_build_environment.sh index 3bf5a748a127..c1645e028743 100755 --- a/kokoro/release/ruby/macos/ruby/ruby_build_environment.sh +++ b/kokoro/release/ruby/macos/ruby/ruby_build_environment.sh @@ -47,7 +47,7 @@ EOF MAKE="make -j8" -for v in 2.6.0 2.5.0 2.4.0 2.3.0 ; do +for v in 2.6.0 2.5.1 2.4.0 2.3.0 ; do ccache -c rake -f "$CROSS_RUBY" cross-ruby VERSION="$v" HOST=x86_64-darwin11 MAKE="$MAKE" done diff --git a/ruby/Rakefile b/ruby/Rakefile index 1ab7ac29a044..79b7df306558 100644 --- a/ruby/Rakefile +++ b/ruby/Rakefile @@ -70,7 +70,7 @@ else task 'gem:windows' do require 'rake_compiler_dock' - RakeCompilerDock.sh "bundle && IN_DOCKER=true rake cross native gem RUBY_CC_VERSION=2.6.0:2.5.1:2.4.0:2.3.0" + RakeCompilerDock.sh "bundle && IN_DOCKER=true rake cross native gem RUBY_CC_VERSION=2.6.0:2.5.0:2.4.0:2.3.0" end if RUBY_PLATFORM =~ /darwin/ From 79761ebf2238d4864075d9df3b302c76a9dad596 Mon Sep 17 00:00:00 2001 From: Bo Yang Date: Mon, 7 Jan 2019 16:08:09 -0800 Subject: [PATCH 5/6] Check mac version --- kokoro/macos/ruby23/build.sh | 1 + 1 file changed, 1 insertion(+) diff --git a/kokoro/macos/ruby23/build.sh b/kokoro/macos/ruby23/build.sh index dc950a20d4eb..0346986c1cb9 100755 --- a/kokoro/macos/ruby23/build.sh +++ b/kokoro/macos/ruby23/build.sh @@ -2,6 +2,7 @@ # # Build file to set up and run tests +cat /VERSION # Change to repo root cd $(dirname $0)/../../.. From 7d150fbb1268ceaf7e44eebba24035b6e5d90cf9 Mon Sep 17 00:00:00 2001 From: Bo Yang Date: Mon, 7 Jan 2019 17:07:44 -0800 Subject: [PATCH 6/6] No need to install php in preparation for mac --- kokoro/macos/prepare_build_macos_rc | 3 +-- kokoro/macos/ruby23/build.sh | 1 - 2 files changed, 1 insertion(+), 3 deletions(-) diff --git a/kokoro/macos/prepare_build_macos_rc b/kokoro/macos/prepare_build_macos_rc index fb975523a496..c5687e9d8f88 100755 --- a/kokoro/macos/prepare_build_macos_rc +++ b/kokoro/macos/prepare_build_macos_rc @@ -18,9 +18,8 @@ export CXX=g++ ruby -e "$(curl -fsSL https://raw.githubusercontent.com/Homebrew/install/master/install)" source $HOME/.rvm/scripts/rvm -brew tap homebrew/homebrew-php brew uninstall node icu4c -brew install gflags gpg gpg2 node pcre php56 ruby +brew install gflags gpg gpg2 node pcre ruby ## # Install Tox diff --git a/kokoro/macos/ruby23/build.sh b/kokoro/macos/ruby23/build.sh index 0346986c1cb9..dc950a20d4eb 100755 --- a/kokoro/macos/ruby23/build.sh +++ b/kokoro/macos/ruby23/build.sh @@ -2,7 +2,6 @@ # # Build file to set up and run tests -cat /VERSION # Change to repo root cd $(dirname $0)/../../..