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.
 
 
 
 
 
 

121 lines
4.6 KiB

  1. version: 1
  2. # If and when switching to `reporting: checks-v1` here, also change the `statuses` route to `checks`
  3. # in `CONFIG.routes_for_all_subtasks` in `etc/taskcluster/decision_task.py`
  4. policy:
  5. # https://docs.taskcluster.net/docs/reference/integrations/taskcluster-github/docs/taskcluster-yml-v1#pull-requests
  6. pullRequests: public
  7. # NOTE: when updating this consider whether the daily hook needs similar changes:
  8. # https://tools.taskcluster.net/hooks/project-servo/daily
  9. tasks:
  10. $let:
  11. task_common:
  12. provisionerId:
  13. $if: "taskcluster_root_url == 'https://taskcluster.net'"
  14. then: aws-provisioner-v1
  15. else: proj-servo
  16. created: {$fromNow: ''}
  17. deadline: {$fromNow: '1 day'}
  18. priority: high
  19. extra:
  20. treeherder:
  21. machine: {platform: Linux}
  22. labels: [x64]
  23. symbol: Decision
  24. payload:
  25. maxRunTime: {$eval: '20 * 60'}
  26. # https://github.com/servo/taskcluster-bootstrap-docker-images#decision-task
  27. image: "servobrowser/taskcluster-bootstrap:decision-task@\
  28. sha256:7471a998e4462638c8d3e2cf0b4a99c9a5c8ca9f2ec0ae01cc069473b35cde10"
  29. features:
  30. taskclusterProxy: true
  31. artifacts:
  32. public/repo.bundle:
  33. type: file
  34. path: /repo.bundle
  35. expires: {$fromNow: '1 day'}
  36. env:
  37. GIT_URL: ${event.repository.clone_url}
  38. TASK_FOR: ${tasks_for}
  39. command:
  40. - /bin/bash
  41. - '--login'
  42. - '-e'
  43. - '-c'
  44. - >-
  45. git init repo &&
  46. cd repo &&
  47. git fetch --depth 1 "$GIT_URL" "$GIT_REF" &&
  48. git reset --hard "$GIT_SHA" &&
  49. python3 etc/taskcluster/decision_task.py
  50. in:
  51. - $if: "tasks_for == 'github-push'"
  52. then:
  53. $let:
  54. branch:
  55. $if: "event.ref[:11] == 'refs/heads/'"
  56. then: "${event.ref[11:]}"
  57. in:
  58. $if: "branch in ['auto', 'try', 'master'] || branch[:4] == 'try-'"
  59. then:
  60. $mergeDeep:
  61. - {$eval: "task_common"}
  62. - metadata:
  63. name: "Servo: GitHub push decision task"
  64. description: ""
  65. owner: ${event.pusher.name}@users.noreply.github.com
  66. source: ${event.compare}
  67. workerType:
  68. $if: "taskcluster_root_url == 'https://taskcluster.net'"
  69. then: servo-docker-worker
  70. else: docker
  71. scopes:
  72. - "assume:repo:github.com/servo/servo:branch:${branch}"
  73. routes:
  74. $let:
  75. treeherder_repo:
  76. $if: "branch[:4] == 'try-'"
  77. then: "servo-try"
  78. else: "servo-${branch}"
  79. in:
  80. - "tc-treeherder.v2._/${treeherder_repo}.${event.after}"
  81. - "tc-treeherder-staging.v2._/${treeherder_repo}.${event.after}"
  82. payload:
  83. env:
  84. GIT_REF: ${event.ref}
  85. GIT_SHA: ${event.after}
  86. TASK_OWNER: ${event.pusher.name}@users.noreply.github.com
  87. TASK_SOURCE: ${event.compare}
  88. - $if: >-
  89. tasks_for == 'github-pull-request' &&
  90. event['action'] in ['opened', 'reopened', 'synchronize']
  91. then:
  92. $mergeDeep:
  93. - {$eval: "task_common"}
  94. - metadata:
  95. name: "Servo: GitHub PR decision task"
  96. description: ""
  97. owner: ${event.sender.login}@users.noreply.github.com
  98. source: ${event.pull_request.url}
  99. workerType:
  100. $if: "taskcluster_root_url == 'https://taskcluster.net'"
  101. then: servo-docker-untrusted
  102. else: docker-untrusted
  103. scopes:
  104. - "assume:repo:github.com/servo/servo:pull-request"
  105. routes:
  106. - "tc-treeherder.v2._/servo-prs.${event.pull_request.head.sha}"
  107. - "tc-treeherder-staging.v2._/servo-prs.${event.pull_request.head.sha}"
  108. payload:
  109. env:
  110. # We use the merge commit made by GitHub, not the PR’s branch
  111. GIT_REF: refs/pull/${event.pull_request.number}/merge
  112. # `event.pull_request.merge_commit_sha` is tempting but not what we want:
  113. # https://github.com/servo/servo/pull/22597#issuecomment-451518810
  114. GIT_SHA: FETCH_HEAD
  115. TASK_OWNER: ${event.sender.login}@users.noreply.github.com
  116. TASK_SOURCE: ${event.pull_request.url}