Make the macOS worker type configurable

This commit is contained in:
Simon Sapin 2019-11-15 19:08:09 +01:00
parent 9b17deb11e
commit d04a2745c6

View file

@ -89,7 +89,8 @@ def main(task_for):
elif task_for == "try-windows-ami":
CONFIG.git_sha_is_current_head()
windows_unit(os.environ["NEW_AMI_WORKER_TYPE"], cached=False)
CONFIG.windows_worker_type = os.environ["NEW_AMI_WORKER_TYPE"]
windows_unit(cached=False)
# https://tools.taskcluster.net/hooks/project-servo/daily
elif task_for == "daily":
@ -457,9 +458,9 @@ def uwp_nightly():
)
def windows_unit(worker_type=None, cached=True):
def windows_unit(cached=True):
task = (
windows_build_task("Dev build + unit tests", worker_type=worker_type)
windows_build_task("Dev build + unit tests")
.with_treeherder("Windows x64", "Unit")
.with_script(
# Not necessary as this would be done at the start of `build`,
@ -757,12 +758,10 @@ def linux_task(name):
)
def windows_task(name, worker_type=None):
if worker_type is None:
worker_type = "win2016"
def windows_task(name):
return (
decisionlib.WindowsGenericWorkerTask(name)
.with_worker_type(worker_type)
.with_worker_type(CONFIG.windows_worker_type)
.with_treeherder_required()
)
@ -771,7 +770,7 @@ def macos_task(name):
return (
decisionlib.MacOsGenericWorkerTask(name)
.with_provisioner_id("proj-servo")
.with_worker_type("macos")
.with_worker_type(CONFIG.macos_worker_type)
.with_treeherder_required()
)
@ -814,7 +813,7 @@ def android_build_task(name):
)
def windows_build_task(name, package=True, arch="x86_64", worker_type=None):
def windows_build_task(name, package=True, arch="x86_64"):
hashes = {
"devel": {
"x86_64": "c136cbfb0330041d52fe6ec4e3e468563176333c857f6ed71191ebc37fc9d605",
@ -828,7 +827,7 @@ def windows_build_task(name, package=True, arch="x86_64", worker_type=None):
}
version = "1.16.0"
task = (
windows_task(name, worker_type=worker_type)
windows_task(name)
.with_max_run_time_minutes(90)
.with_env(
**build_env,
@ -992,6 +991,8 @@ CONFIG.index_prefix = "project.servo"
CONFIG.default_provisioner_id = "proj-servo"
CONFIG.docker_image_build_worker_type = "docker"
CONFIG.windows_worker_type = "win2016"
CONFIG.macos_worker_type = "macos"
if __name__ == "__main__": # pragma: no cover
main(task_for=os.environ["TASK_FOR"])