From 2c7abbb2bf6eea23a37ffab981dff90b4e479e58 Mon Sep 17 00:00:00 2001 From: Simon Sapin Date: Sun, 7 Oct 2018 14:50:36 +0200 Subject: [PATCH] Taskcluster: package the Windows build --- etc/taskcluster/decision_task.py | 9 +++++++++ etc/taskcluster/decisionlib.py | 9 ++++++--- 2 files changed, 15 insertions(+), 3 deletions(-) diff --git a/etc/taskcluster/decision_task.py b/etc/taskcluster/decision_task.py index 8281eb299ad..1c9dcdc1867 100644 --- a/etc/taskcluster/decision_task.py +++ b/etc/taskcluster/decision_task.py @@ -114,6 +114,15 @@ def windows_dev(): "mach build --dev", "mach test-unit", ) + .with_directory_mount( + "https://github.com/wixtoolset/wix3/releases/download/wix3111rtm/wix311-binaries.zip", + sha256="37f0a533b0978a454efb5dc3bd3598becf9660aaf4287e55bf68ca6b527d051d", + path="wix", + ) + .with_path_from_homedir("wix") + .with_script("mach package --dev") + .with_artifacts("repo/target/debug/msi/Servo.exe", + "repo/target/debug/msi/Servo.zip") .create() ) diff --git a/etc/taskcluster/decisionlib.py b/etc/taskcluster/decisionlib.py index 2cfbd42d4ee..7303a9ba552 100644 --- a/etc/taskcluster/decisionlib.py +++ b/etc/taskcluster/decisionlib.py @@ -205,7 +205,6 @@ class GenericWorkerTask(Task): self.artifacts = [] with_max_run_time_minutes = chaining(setattr, "max_run_time_minutes") - with_artifacts = chaining(append_to_attr, "artifacts") with_mounts = chaining(append_to_attr, "mounts") with_env = chaining(update_attr, "env") @@ -223,15 +222,19 @@ class GenericWorkerTask(Task): mounts=self.mounts, artifacts=[ { - "type": "file", + "type": type_, "path": path, "name": "public/" + url_basename(path), "expires": SHARED.from_now_json(self.index_and_artifacts_expire_in), } - for path in self.artifacts + for type_, path in self.artifacts ], ) + def with_artifacts(self, *paths, type="file"): + self.artifacts.extend((type, path) for path in paths) + return self + def _mount_content(self, url_or_artifact_name, task_id, sha256): if task_id: content = {"taskId": task_id, "artifact": url_or_artifact_name}