def daily_tasks_setup(): # ':' is not accepted in an index namepspace: # https://docs.taskcluster.net/docs/reference/core/taskcluster-index/references/api now = SHARED.now.strftime("%Y-%m-%d_%H-%M-%S") index_path = "%s.daily.%s" % (CONFIG.index_prefix, now) # Index this task manually rather than with a route, # so that it is indexed even if it fails. SHARED.index_service.insertTask( index_path, { "taskId": CONFIG.decision_task_id, "rank": 0, "data": {}, "expires": SHARED.from_now_json(log_artifacts_expire_in), }) # Unlike when reacting to a GitHub event, # the commit hash is not known until we clone the repository. CONFIG.git_sha_is_current_head() # On failure, notify a few people on IRC # https://docs.taskcluster.net/docs/reference/core/taskcluster-notify/docs/usage notify_route = "notify.irc-channel.#servo.on-failed" CONFIG.routes_for_all_subtasks.append(notify_route) CONFIG.scopes_for_all_subtasks.append("queue:route:" + notify_route) CONFIG.task_name_template = "Servo daily: %s. On failure, ping: " + ping_on_daily_task_failure
def daily_tasks_setup(): # Unlike when reacting to a GitHub push event, # the commit hash is not known until we clone the repository. CONFIG.git_sha_is_current_head() # On failure, notify a few people on IRC # https://docs.taskcluster.net/docs/reference/core/taskcluster-notify/docs/usage notify_route = "notify.irc-channel.#servo.on-failed" CONFIG.routes_for_all_subtasks.append(notify_route) CONFIG.scopes_for_all_subtasks.append("queue:route:" + notify_route) CONFIG.task_name_template = "Servo daily: %s. On failure, ping: " + ping_on_daily_task_failure
def tasks(task_for): if CONFIG.git_ref.startswith("refs/heads/"): branch = CONFIG.git_ref[len("refs/heads/"):] CONFIG.treeherder_repository_name = "servo-" + ( branch if not branch.startswith("try-") else "try") # Work around a tc-github bug/limitation: # https://bugzilla.mozilla.org/show_bug.cgi?id=1548781#c4 if task_for.startswith("github"): # https://github.com/taskcluster/taskcluster/blob/21f257dc8/services/github/config.yml#L14 CONFIG.routes_for_all_subtasks.append("statuses") if task_for == "github-push": all_tests = [] by_branch_name = { "auto": all_tests, "try": all_tests, "try-taskcluster": [ # Add functions here as needed, in your push to that branch ], "master": [], # The "try-*" keys match those in `servo_try_choosers` in Homu’s config: # https://github.com/servo/saltfs/blob/master/homu/map.jinja "try-mac": [], "try-linux": [], "try-windows": [], "try-arm": [], "try-wpt": [], "try-wpt-2020": [], "try-wpt-mac": [], "test-wpt": [], } elif task_for == "github-pull-request": CONFIG.treeherder_repository_name = "servo-prs" CONFIG.index_read_only = True CONFIG.docker_image_build_worker_type = None # We want the merge commit that GitHub creates for the PR. # The event does contain a `pull_request.merge_commit_sha` key, but it is wrong: # https://github.com/servo/servo/pull/22597#issuecomment-451518810 CONFIG.git_sha_is_current_head() elif task_for == "try-windows-ami": CONFIG.git_sha_is_current_head() CONFIG.windows_worker_type = os.environ["NEW_AMI_WORKER_TYPE"] # https://tools.taskcluster.net/hooks/project-servo/daily elif task_for == "daily": daily_tasks_setup()
def daily_tasks_setup(): # ':' is not accepted in an index namepspace: # https://docs.taskcluster.net/docs/reference/core/taskcluster-index/references/api now = SHARED.now.strftime("%Y-%m-%d_%H-%M-%S") index_path = "%s.daily.%s" % (CONFIG.index_prefix, now) # Index this task manually rather than with a route, # so that it is indexed even if it fails. SHARED.index_service.insertTask(index_path, { "taskId": CONFIG.decision_task_id, "rank": 0, "data": {}, "expires": SHARED.from_now_json(log_artifacts_expire_in), }) # Unlike when reacting to a GitHub push event, # the commit hash is not known until we clone the repository. CONFIG.git_sha_is_current_head() # On failure, notify a few people on IRC # https://docs.taskcluster.net/docs/reference/core/taskcluster-notify/docs/usage notify_route = "notify.irc-channel.#servo.on-failed" CONFIG.routes_for_all_subtasks.append(notify_route) CONFIG.scopes_for_all_subtasks.append("queue:route:" + notify_route) CONFIG.task_name_template = "Servo daily: %s. On failure, ping: " + ping_on_daily_task_failure
def main(task_for): if CONFIG.git_ref.startswith("refs/heads/"): branch = CONFIG.git_ref[len("refs/heads/"):] CONFIG.treeherder_repository_name = "servo-" + ( branch if not branch.startswith("try-") else "try") if task_for == "github-push": # FIXME https://github.com/servo/servo/issues/22325 implement these: linux_arm32_dev = linux_arm64_dev = lambda: None # FIXME https://github.com/servo/servo/issues/22187 # In-emulator testing is disabled for now. (Instead we only compile.) # This local variable shadows the module-level function of the same name. android_x86_wpt = android_x86_release # Implemented but disabled for now: linux_wpt = lambda: None # Shadows the existing top-level function all_tests = [ linux_tidy_unit_docs, windows_unit, windows_x86, macos_unit, magicleap_dev, android_arm32_dev, android_arm32_dev_from_macos, android_arm32_release, android_x86_wpt, linux_arm32_dev, linux_arm64_dev, linux_wpt, macos_wpt, ] by_branch_name = { "auto": all_tests, "try": all_tests, "try-taskcluster": [ # Add functions here as needed, in your push to that branch ], "master": [ upload_docs, ], # The "try-*" keys match those in `servo_try_choosers` in Homu’s config: # https://github.com/servo/saltfs/blob/master/homu/map.jinja "try-mac": [macos_unit], "try-linux": [linux_tidy_unit_docs], "try-windows": [windows_unit, windows_x86], "try-magicleap": [magicleap_dev], "try-arm": [linux_arm32_dev, linux_arm64_dev], "try-wpt": [linux_wpt], "try-wpt-mac": [macos_wpt], "try-wpt-android": [android_x86_wpt], "try-android": [android_arm32_dev, android_arm32_dev_from_macos, android_x86_wpt], } for function in by_branch_name.get(branch, []): function() elif task_for == "github-pull-request": CONFIG.treeherder_repository_name = "servo-prs" CONFIG.index_read_only = True CONFIG.docker_image_build_worker_type = None # We want the merge commit that GitHub creates for the PR. # The event does contain a `pull_request.merge_commit_sha` key, but it is wrong: # https://github.com/servo/servo/pull/22597#issuecomment-451518810 CONFIG.git_sha_is_current_head() tidy_untrusted() # https://tools.taskcluster.net/hooks/project-servo/daily elif task_for == "daily": daily_tasks_setup() with_rust_nightly() linux_nightly() android_nightly() windows_nightly() macos_nightly() update_wpt() magicleap_nightly()
def main(task_for): if CONFIG.git_ref.startswith("refs/heads/"): branch = CONFIG.git_ref[len("refs/heads/"):] CONFIG.treeherder_repository_name = "servo-" + ( branch if not branch.startswith("try-") else "try" ) if task_for == "github-push": # FIXME https://github.com/servo/servo/issues/22325 implement these: linux_arm32_dev = linux_arm64_dev = lambda: None # FIXME https://github.com/servo/servo/issues/22187 # In-emulator testing is disabled for now. (Instead we only compile.) # This local variable shadows the module-level function of the same name. android_x86_wpt = android_x86_release # Implemented but disabled for now: linux_wpt = lambda: None # Shadows the existing top-level function all_tests = [ linux_tidy_unit_docs, windows_unit, windows_x86, macos_unit, magicleap_dev, android_arm32_dev, android_arm32_dev_from_macos, android_arm32_release, android_x86_wpt, linux_arm32_dev, linux_arm64_dev, linux_wpt, macos_wpt, ] by_branch_name = { "auto": all_tests, "try": all_tests, "try-taskcluster": [ # Add functions here as needed, in your push to that branch ], "master": [ upload_docs, ], # The "try-*" keys match those in `servo_try_choosers` in Homu’s config: # https://github.com/servo/saltfs/blob/master/homu/map.jinja "try-mac": [macos_unit], "try-linux": [linux_tidy_unit_docs], "try-windows": [windows_unit, windows_x86], "try-magicleap": [magicleap_dev], "try-arm": [linux_arm32_dev, linux_arm64_dev], "try-wpt": [linux_wpt], "try-wpt-mac": [macos_wpt], "try-wpt-android": [android_x86_wpt], "try-android": [ android_arm32_dev, android_arm32_dev_from_macos, android_x86_wpt ], } for function in by_branch_name.get(branch, []): function() elif task_for == "github-pull-request": CONFIG.treeherder_repository_name = "servo-prs" CONFIG.index_read_only = True CONFIG.docker_image_build_worker_type = None # We want the merge commit that GitHub creates for the PR. # The event does contain a `pull_request.merge_commit_sha` key, but it is wrong: # https://github.com/servo/servo/pull/22597#issuecomment-451518810 CONFIG.git_sha_is_current_head() tidy_untrusted() # https://tools.taskcluster.net/hooks/project-servo/daily elif task_for == "daily": daily_tasks_setup() with_rust_nightly() linux_nightly() android_nightly() windows_nightly() macos_nightly() update_wpt() magicleap_nightly()
def tasks(task_for): if CONFIG.git_ref.startswith("refs/heads/"): branch = CONFIG.git_ref[len("refs/heads/"):] CONFIG.treeherder_repository_name = "servo-" + ( branch if not branch.startswith("try-") else "try") # Work around a tc-github bug/limitation: # https://bugzilla.mozilla.org/show_bug.cgi?id=1548781#c4 if task_for.startswith("github"): # https://github.com/taskcluster/taskcluster/blob/21f257dc8/services/github/config.yml#L14 CONFIG.routes_for_all_subtasks.append("statuses") # The magicleap build is broken until there's a surfman back end magicleap_dev = lambda: None magicleap_nightly = lambda: None if task_for == "github-push": all_tests = [ linux_tidy_unit, linux_docs_check, windows_unit, windows_arm64, windows_uwp_x64, macos_unit, magicleap_dev, linux_wpt, linux_wpt_layout_2020, linux_release, macos_wpt, ] by_branch_name = { "auto": all_tests, "try": all_tests, "try-taskcluster": [ # Add functions here as needed, in your push to that branch ], "master": [ upload_docs, ], # The "try-*" keys match those in `servo_try_choosers` in Homu’s config: # https://github.com/servo/saltfs/blob/master/homu/map.jinja "try-mac": [macos_unit], "try-linux": [linux_tidy_unit, linux_docs_check, linux_release], "try-windows": [windows_unit, windows_arm64, windows_uwp_x64], "try-magicleap": [magicleap_dev], "try-arm": [windows_arm64], "try-wpt": [linux_wpt], "try-wpt-2020": [linux_wpt_layout_2020], "try-wpt-mac": [macos_wpt], } for function in by_branch_name.get(branch, []): function() elif task_for == "github-pull-request": CONFIG.treeherder_repository_name = "servo-prs" CONFIG.index_read_only = True CONFIG.docker_image_build_worker_type = None # We want the merge commit that GitHub creates for the PR. # The event does contain a `pull_request.merge_commit_sha` key, but it is wrong: # https://github.com/servo/servo/pull/22597#issuecomment-451518810 CONFIG.git_sha_is_current_head() linux_tidy_unit_untrusted() elif task_for == "try-windows-ami": CONFIG.git_sha_is_current_head() 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": daily_tasks_setup() with_rust_nightly() linux_nightly() windows_nightly() macos_nightly() update_wpt() magicleap_nightly() uwp_nightly()
def main(task_for): if CONFIG.git_ref.startswith("refs/heads/"): branch = CONFIG.git_ref[len("refs/heads/"):] CONFIG.treeherder_repository_name = "servo-" + ( branch if not branch.startswith("try-") else "try") # Implemented but disabled for now: linux_wpt = lambda: None # Shadows the existing top-level function # The magicleap build is broken until there's a surfman back end magicleap_dev = lambda: None magicleap_nightly = lambda: None if task_for == "github-push": # FIXME https://github.com/servo/servo/issues/22187 # In-emulator testing is disabled for now. (Instead we only compile.) # This local variable shadows the module-level function of the same name. android_x86_wpt = android_x86_release all_tests = [ linux_tidy_unit, linux_docs_check, windows_unit, windows_arm64, windows_uwp_x64, macos_unit, magicleap_dev, android_arm32_dev, android_arm32_dev_from_macos, android_arm32_release, android_x86_wpt, linux_wpt, linux_release, macos_wpt, ] by_branch_name = { "auto": all_tests, "try": all_tests, "try-taskcluster": [ # Add functions here as needed, in your push to that branch ], "master": [ upload_docs, ], # The "try-*" keys match those in `servo_try_choosers` in Homu’s config: # https://github.com/servo/saltfs/blob/master/homu/map.jinja "try-mac": [macos_unit], "try-linux": [linux_tidy_unit, linux_docs_check, linux_release], "try-windows": [windows_unit, windows_arm64, windows_uwp_x64], "try-magicleap": [magicleap_dev], "try-arm": [windows_arm64], "try-wpt": [linux_wpt], "try-wpt-mac": [macos_wpt], "try-wpt-android": [android_x86_wpt], "try-android": [android_arm32_dev, android_arm32_dev_from_macos, android_x86_wpt], } if not CONFIG.legacy_tc_deployment: # pragma: no cover by_branch_name = { "auto": [ # Everything not running on macOS, # which only has one worker on Community-TC for now linux_tidy_unit, linux_docs_check, windows_unit, windows_arm64, windows_uwp_x64, android_arm32_dev, android_arm32_release, android_x86_wpt, linux_wpt, linux_release, ], "master": [ upload_docs, ], } for function in by_branch_name.get(branch, []): function() elif task_for == "github-pull-request": CONFIG.treeherder_repository_name = "servo-prs" CONFIG.index_read_only = True CONFIG.docker_image_build_worker_type = None # We want the merge commit that GitHub creates for the PR. # The event does contain a `pull_request.merge_commit_sha` key, but it is wrong: # https://github.com/servo/servo/pull/22597#issuecomment-451518810 CONFIG.git_sha_is_current_head() linux_tidy_unit_untrusted() elif task_for == "try-windows-ami": CONFIG.git_sha_is_current_head() windows_unit(os.environ["NEW_AMI_WORKER_TYPE"], cached=False) # https://tools.taskcluster.net/hooks/project-servo/daily elif task_for == "daily": daily_tasks_setup() with_rust_nightly() linux_nightly() android_nightly() windows_nightly() macos_nightly() update_wpt() magicleap_nightly() uwp_nightly()