aboutsummaryrefslogtreecommitdiffhomepage
path: root/tools/run_tests/artifacts
diff options
context:
space:
mode:
authorGravatar Jan Tattermusch <jtattermusch@google.com>2018-08-01 12:35:38 +0200
committerGravatar Jan Tattermusch <jtattermusch@google.com>2018-08-02 08:14:34 +0200
commit6574f5def4285094681e0ea41998b6efc64a2df2 (patch)
tree4f26af1b0c332a158a01b1d4921f43b939f7271f /tools/run_tests/artifacts
parentcca11262552441ee55b44d21f8cd374828498062 (diff)
add unity package build to package_targets.py
Diffstat (limited to 'tools/run_tests/artifacts')
-rw-r--r--tools/run_tests/artifacts/package_targets.py38
1 files changed, 22 insertions, 16 deletions
diff --git a/tools/run_tests/artifacts/package_targets.py b/tools/run_tests/artifacts/package_targets.py
index abf1b5ebed..70f1fc8a4b 100644
--- a/tools/run_tests/artifacts/package_targets.py
+++ b/tools/run_tests/artifacts/package_targets.py
@@ -56,7 +56,8 @@ def create_jobspec(name,
cwd=None,
shell=False,
flake_retries=0,
- timeout_retries=0):
+ timeout_retries=0,
+ cpu_cost=1.0):
"""Creates jobspec."""
jobspec = jobset.JobSpec(
cmdline=cmdline,
@@ -66,31 +67,36 @@ def create_jobspec(name,
timeout_seconds=10 * 60,
flake_retries=flake_retries,
timeout_retries=timeout_retries,
+ cpu_cost=cpu_cost,
shell=shell)
return jobspec
class CSharpPackage:
- """Builds C# nuget packages."""
-
- def __init__(self, linux=False):
- self.linux = linux
- self.labels = ['package', 'csharp']
- if linux:
- self.name = 'csharp_package_dotnetcli_linux'
- self.labels += ['linux']
+ """Builds C# packages."""
+
+ def __init__(self, unity=False):
+ self.unity = unity
+ self.labels = ['package', 'csharp', 'windows']
+ if unity:
+ self.name = 'csharp_package_unity_windows'
+ self.labels += ['unity']
else:
- self.name = 'csharp_package_dotnetcli_windows'
- self.labels += ['windows']
+ self.name = 'csharp_package_nuget_windows'
+ self.labels += ['nuget']
def pre_build_jobspecs(self):
return []
def build_jobspec(self):
- if self.linux:
- return create_docker_jobspec(
- self.name, 'tools/dockerfile/test/csharp_jessie_x64',
- 'src/csharp/build_packages_dotnetcli.sh')
+ if self.unity:
+ # use very high CPU cost to avoid running nuget package build
+ # and unity build concurrently
+ return create_jobspec(
+ self.name, ['build_unitypackage.bat'],
+ cwd='src\\csharp',
+ cpu_cost=1e6,
+ shell=True)
else:
return create_jobspec(
self.name, ['build_packages_dotnetcli.bat'],
@@ -153,7 +159,7 @@ def targets():
"""Gets list of supported targets"""
return [
CSharpPackage(),
- CSharpPackage(linux=True),
+ CSharpPackage(unity=True),
RubyPackage(),
PythonPackage(),
PHPPackage()