Servo is a prototype web browser engine written in the Rust language. It is currently developed on 64-bit macOS, 64-bit Linux, 64-bit Windows, and Android.
You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
 
 
 
 
 
 

120 lines
4.6 KiB

version: 1
# If and when switching to `reporting: checks-v1` here, also change the `statuses` route to `checks`
# in `CONFIG.routes_for_all_subtasks` in `etc/taskcluster/decision_task.py`
policy:
# https://docs.taskcluster.net/docs/reference/integrations/taskcluster-github/docs/taskcluster-yml-v1#pull-requests
pullRequests: public
# NOTE: when updating this consider whether the daily hook needs similar changes:
# https://tools.taskcluster.net/hooks/project-servo/daily
tasks:
$let:
task_common:
provisionerId:
$if: "taskcluster_root_url == 'https://taskcluster.net'"
then: aws-provisioner-v1
else: proj-servo
created: {$fromNow: ''}
deadline: {$fromNow: '1 day'}
priority: high
extra:
treeherder:
machine: {platform: Linux}
labels: [x64]
symbol: Decision
payload:
maxRunTime: {$eval: '20 * 60'}
# https://github.com/servo/taskcluster-bootstrap-docker-images#decision-task
image: "servobrowser/taskcluster-bootstrap:decision-task@\
sha256:7471a998e4462638c8d3e2cf0b4a99c9a5c8ca9f2ec0ae01cc069473b35cde10"
features:
taskclusterProxy: true
artifacts:
public/repo.bundle:
type: file
path: /repo.bundle
expires: {$fromNow: '1 day'}
env:
GIT_URL: ${event.repository.clone_url}
TASK_FOR: ${tasks_for}
command:
- /bin/bash
- '--login'
- '-e'
- '-c'
- >-
git init repo &&
cd repo &&
git fetch --depth 1 "$GIT_URL" "$GIT_REF" &&
git reset --hard "$GIT_SHA" &&
python3 etc/taskcluster/decision_task.py
in:
- $if: "tasks_for == 'github-push'"
then:
$let:
branch:
$if: "event.ref[:11] == 'refs/heads/'"
then: "${event.ref[11:]}"
in:
$if: "branch in ['auto', 'try', 'master'] || branch[:4] == 'try-'"
then:
$mergeDeep:
- {$eval: "task_common"}
- metadata:
name: "Servo: GitHub push decision task"
description: ""
owner: ${event.pusher.name}@users.noreply.github.com
source: ${event.compare}
workerType:
$if: "taskcluster_root_url == 'https://taskcluster.net'"
then: servo-docker-worker
else: docker
scopes:
- "assume:repo:github.com/servo/servo:branch:${branch}"
routes:
$let:
treeherder_repo:
$if: "branch[:4] == 'try-'"
then: "servo-try"
else: "servo-${branch}"
in:
- "tc-treeherder.v2._/${treeherder_repo}.${event.after}"
- "tc-treeherder-staging.v2._/${treeherder_repo}.${event.after}"
payload:
env:
GIT_REF: ${event.ref}
GIT_SHA: ${event.after}
TASK_OWNER: ${event.pusher.name}@users.noreply.github.com
TASK_SOURCE: ${event.compare}
- $if: >-
tasks_for == 'github-pull-request' &&
event['action'] in ['opened', 'reopened', 'synchronize']
then:
$mergeDeep:
- {$eval: "task_common"}
- metadata:
name: "Servo: GitHub PR decision task"
description: ""
owner: ${event.sender.login}@users.noreply.github.com
source: ${event.pull_request.url}
workerType:
$if: "taskcluster_root_url == 'https://taskcluster.net'"
then: servo-docker-untrusted
else: docker-untrusted
scopes:
- "assume:repo:github.com/servo/servo:pull-request"
routes:
- "tc-treeherder.v2._/servo-prs.${event.pull_request.head.sha}"
- "tc-treeherder-staging.v2._/servo-prs.${event.pull_request.head.sha}"
payload:
env:
# We use the merge commit made by GitHub, not the PR’s branch
GIT_REF: refs/pull/${event.pull_request.number}/merge
# `event.pull_request.merge_commit_sha` is tempting but not what we want:
# https://github.com/servo/servo/pull/22597#issuecomment-451518810
GIT_SHA: FETCH_HEAD
TASK_OWNER: ${event.sender.login}@users.noreply.github.com
TASK_SOURCE: ${event.pull_request.url}