aboutsummaryrefslogtreecommitdiffhomepage
path: root/tools/run_tests/artifact_targets.py
diff options
context:
space:
mode:
authorGravatar Jan Tattermusch <jtattermusch@google.com>2016-02-01 18:58:46 -0800
committerGravatar Jan Tattermusch <jtattermusch@google.com>2016-02-01 20:10:00 -0800
commit8640f92c24a22bd636b22e533a18db8648cf9a17 (patch)
tree800d02bbff7a8d3ec0d639fad69f6b7c08408b2b /tools/run_tests/artifact_targets.py
parent17abd23b40e9940e4ee776249331a78b2ceb30bf (diff)
add artifact builder for python
Diffstat (limited to 'tools/run_tests/artifact_targets.py')
-rw-r--r--tools/run_tests/artifact_targets.py32
1 files changed, 31 insertions, 1 deletions
diff --git a/tools/run_tests/artifact_targets.py b/tools/run_tests/artifact_targets.py
index a34fa8e4fa..32a98c90b8 100644
--- a/tools/run_tests/artifact_targets.py
+++ b/tools/run_tests/artifact_targets.py
@@ -80,6 +80,34 @@ def macos_arch_env(arch):
return {'CFLAGS': arch_arg, 'LDFLAGS': arch_arg}
+class PythonArtifact:
+ """Builds Python artifacts."""
+
+ def __init__(self, platform, arch):
+ self.name = 'python_%s_%s' % (platform, arch)
+ self.platform = platform
+ self.arch = arch
+ self.labels = ['artifact', 'python', 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':
+ return create_docker_jobspec(self.name,
+ 'tools/dockerfile/grpc_artifact_linux_%s' % self.arch,
+ 'tools/run_tests/build_artifact_python.sh')
+ else:
+ return create_jobspec(self.name,
+ ['tools/run_tests/build_artifact_python.sh'])
+
+ def __str__(self):
+ return self.name
+
+
class CSharpExtArtifact:
"""Builds C# native extension library"""
@@ -134,4 +162,6 @@ def targets():
CSharpExtArtifact('macos', 'x86'),
CSharpExtArtifact('macos', 'x64'),
CSharpExtArtifact('windows', 'x86'),
- CSharpExtArtifact('windows', 'x64')]
+ CSharpExtArtifact('windows', 'x64'),
+ PythonArtifact('linux', 'x86'),
+ PythonArtifact('linux', 'x64')]