diff options
Diffstat (limited to 'tools/run_tests/artifact_targets.py')
-rw-r--r-- | tools/run_tests/artifact_targets.py | 32 |
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')] |