From 44372138c51a0758698e973f8c839ee08986ac4d Mon Sep 17 00:00:00 2001 From: Jan Tattermusch Date: Mon, 1 Feb 2016 16:20:03 -0800 Subject: build ruby artifact --- tools/run_tests/artifact_targets.py | 33 ++++++++++++++++++++++++++++++++- 1 file changed, 32 insertions(+), 1 deletion(-) (limited to 'tools/run_tests/artifact_targets.py') diff --git a/tools/run_tests/artifact_targets.py b/tools/run_tests/artifact_targets.py index 573825699f..c7ca9a07c5 100644 --- a/tools/run_tests/artifact_targets.py +++ b/tools/run_tests/artifact_targets.py @@ -108,6 +108,35 @@ class PythonArtifact: return self.name +class RubyArtifact: + """Builds ruby native gem.""" + + def __init__(self, platform, arch): + self.name = 'ruby_native_gem_%s_%s' % (platform, arch) + self.platform = platform + self.arch = arch + self.labels = ['artifact', 'ruby', platform, arch] + + def pre_build_jobspecs(self): + return [] + + def build_jobspec(self): + if self.platform == 'windows': + raise Exception("Not supported yet") + else: + if self.platform == 'linux': + environ = {} + if self.arch == 'x86': + environ['SETARCH_CMD'] = 'i386' + return create_docker_jobspec(self.name, + 'tools/dockerfile/grpc_artifact_linux_%s' % self.arch, + 'tools/run_tests/build_artifact_ruby.sh', + environ=environ) + else: + return create_jobspec(self.name, + ['tools/run_tests/build_artifact_ruby.sh']) + + class CSharpExtArtifact: """Builds C# native extension library""" @@ -164,4 +193,6 @@ def targets(): CSharpExtArtifact('windows', 'x86'), CSharpExtArtifact('windows', 'x64'), PythonArtifact('linux', 'x86'), - PythonArtifact('linux', 'x64')] + PythonArtifact('linux', 'x64'), + RubyArtifact('linux', 'x86'), + RubyArtifact('linux', 'x64')] -- cgit v1.2.3