diff --git a/src/ruby/end2end/package_with_underscore_test.rb b/src/ruby/end2end/package_with_underscore_test.rb index 043e621d847..448e726f26b 100644 --- a/src/ruby/end2end/package_with_underscore_test.rb +++ b/src/ruby/end2end/package_with_underscore_test.rb @@ -19,12 +19,9 @@ def main root_dir = File.join(File.dirname(__FILE__), '..', '..', '..') pb_dir = File.join(root_dir, 'src', 'ruby', 'end2end', 'protos') - fail 'CONFIG env variable unexpectedly unset' unless ENV['CONFIG'] - bins_sub_dir = ENV['CONFIG'] - bins_dir = File.join(root_dir, 'bins', bins_sub_dir) - + bins_dir = File.join(root_dir, 'cmake', 'build') plugin = File.join(bins_dir, 'grpc_ruby_plugin') - protoc = File.join(bins_dir, 'protobuf', 'protoc') + protoc = File.join(bins_dir, 'third_party', 'protobuf', 'protoc') got = nil diff --git a/src/ruby/spec/pb/codegen/package_option_spec.rb b/src/ruby/spec/pb/codegen/package_option_spec.rb index f64b4f6aa62..b99cfedf7f1 100644 --- a/src/ruby/spec/pb/codegen/package_option_spec.rb +++ b/src/ruby/spec/pb/codegen/package_option_spec.rb @@ -71,14 +71,10 @@ describe 'Code Generation Options' do end def with_protos(file_paths) - fail 'CONFIG env variable unexpectedly unset' unless ENV['CONFIG'] - bins_sub_dir = ENV['CONFIG'] - pb_dir = File.dirname(__FILE__) - bins_dir = File.join('..', '..', '..', '..', '..', 'bins', bins_sub_dir) - + bins_dir = File.join('..', '..', '..', '..', '..', 'cmake', 'build') plugin = File.join(bins_dir, 'grpc_ruby_plugin') - protoc = File.join(bins_dir, 'protobuf', 'protoc') + protoc = File.join(bins_dir, 'third_party', 'protobuf', 'protoc') # Generate the service from the proto Dir.mktmpdir(nil, File.dirname(__FILE__)) do |tmp_dir| diff --git a/tools/run_tests/artifacts/artifact_targets.py b/tools/run_tests/artifacts/artifact_targets.py index 215abce830e..e2c6f49b643 100644 --- a/tools/run_tests/artifacts/artifact_targets.py +++ b/tools/run_tests/artifacts/artifact_targets.py @@ -304,17 +304,9 @@ class ProtocArtifact: def build_jobspec(self): if self.platform != 'windows': - cxxflags = '-DNDEBUG %s' % _ARCH_FLAG_MAP[self.arch] - ldflags = '%s' % _ARCH_FLAG_MAP[self.arch] - if self.platform != 'macos': - ldflags += ' -static-libgcc -static-libstdc++ -s' - environ = { - 'CONFIG': 'opt', - 'CXXFLAGS': cxxflags, - 'LDFLAGS': ldflags, - 'PROTOBUF_LDFLAGS_EXTRA': ldflags - } + environ = {'CXXFLAGS': '', 'LDFLAGS': ''} if self.platform == 'linux': + environ['LDFLAGS'] += ' -static-libgcc -static-libstdc++ -s' return create_docker_jobspec( self.name, 'tools/dockerfile/grpc_artifact_centos6_{}'.format( diff --git a/tools/run_tests/artifacts/build_artifact_protoc.sh b/tools/run_tests/artifacts/build_artifact_protoc.sh index 3b2a89f7c05..12714717572 100755 --- a/tools/run_tests/artifacts/build_artifact_protoc.sh +++ b/tools/run_tests/artifacts/build_artifact_protoc.sh @@ -17,7 +17,13 @@ set -ex cd "$(dirname "$0")/../../.." -EMBED_ZLIB=true PROTOBUF_CONFIG_OPTS=--with-zlib=no make plugins +mkdir -p cmake/build +pushd cmake/build + +cmake -DgRPC_BUILD_TESTS=OFF -DCMAKE_BUILD_TYPE=Release ../.. +make protoc plugins -j2 + +popd mkdir -p "${ARTIFACTS_OUT}" -cp bins/opt/protobuf/protoc bins/opt/*_plugin "${ARTIFACTS_OUT}"/ +cp cmake/build/third_party/protobuf/protoc cmake/build/*_plugin "${ARTIFACTS_OUT}"/ diff --git a/tools/run_tests/helper_scripts/build_ruby.sh b/tools/run_tests/helper_scripts/build_ruby.sh index 38f99d80ab2..04a52aa884a 100755 --- a/tools/run_tests/helper_scripts/build_ruby.sh +++ b/tools/run_tests/helper_scripts/build_ruby.sh @@ -25,4 +25,13 @@ rm -rf ./tmp rake compile # build grpc_ruby_plugin -make grpc_ruby_plugin -j8 +# TODO: fix this +#make grpc_ruby_plugin -j8 +mkdir -p cmake/build +pushd cmake/build +cmake -DgRPC_BUILD_TESTS=OFF -DCMAKE_BUILD_TYPE=Release ../.. +make protoc grpc_ruby_plugin -j2 +popd + +# unbreak subsequent make builds by restoring zconf.h (previously renamed by cmake build) +(cd third_party/zlib; git checkout zconf.h)