Build Servo

This commit is contained in:
Simon Sapin 2018-09-14 18:34:43 +02:00
parent e50662bd80
commit aba63d4651
3 changed files with 88 additions and 17 deletions

View file

@ -4,6 +4,18 @@ import os.path
from decisionlib import DecisionTask
# https://docs.taskcluster.net/docs/reference/workers/docker-worker/docs/caches
CARGO_CACHE_SCOPES = [
"docker-worker:cache:cargo-registry-cache",
"docker-worker:cache:cargo-git-cache",
]
CARGO_CACHE = {
"cargo-registry-cache": "/root/.cargo/registry",
"cargo-git-cache": "/root/.cargo/git",
}
def main():
decision = DecisionTask(
project_name="Taskcluster experimenfts for Servo", # Used in task names
@ -12,25 +24,26 @@ def main():
worker_type="servo-docker-worker",
)
decision.create_task_with_in_tree_dockerfile(
task_name="servo build task",
command="./servo-build-task.sh",
dockerfile=dockerfile("servo-x86_64-linux"),
max_run_time_minutes=60,
scopes=CARGO_CACHE_SCOPES,
cache=CARGO_CACHE,
)
build_task = decision.create_task_with_in_tree_dockerfile(
task_name="build task",
command="./build-task.sh",
dockerfile=dockerfile("servo-x86_64-linux"),
max_run_time_minutes=20,
scopes=CARGO_CACHE_SCOPES,
cache=CARGO_CACHE,
artifacts=[
("/repo/something-rust/executable.gz", "1 week"),
],
# https://docs.taskcluster.net/docs/reference/workers/docker-worker/docs/caches
scopes=[
"docker-worker:cache:cargo-registry-cache",
"docker-worker:cache:cargo-git-cache",
],
cache={
"cargo-registry-cache": "/root/.cargo/registry",
"cargo-git-cache": "/root/.cargo/git",
},
)
decision.create_task(