Revert "Revert "Cache $CARGO_HOME""

This reverts commit 248c23039c.
This commit is contained in:
Simon Sapin 2018-09-03 17:12:19 +02:00
parent 97e843c4c5
commit 91ccaf08cc
2 changed files with 11 additions and 0 deletions

View file

@ -18,6 +18,8 @@ tasks:
source: ${event.compare} source: ${event.compare}
scopes: scopes:
- "queue:create-task:aws-provisioner-v1/github-worker" - "queue:create-task:aws-provisioner-v1/github-worker"
- "docker-worker:cache:cargo-registry-cache"
- "docker-worker:cache:cargo-git-cache"
payload: payload:
maxRunTime: 600 maxRunTime: 600

View file

@ -36,7 +36,16 @@ def create_task(name, command, artifacts=None, dependencies=None, env=None):
"owner": event["pusher"]["name"] + "@users.noreply.github.com", "owner": event["pusher"]["name"] + "@users.noreply.github.com",
"source": event["compare"], "source": event["compare"],
}, },
# https://docs.taskcluster.net/docs/reference/workers/docker-worker/docs/caches
"scopes": [
"docker-worker:cache:cargo-registry-cache",
"docker-worker:cache:cargo-git-cache",
],
"payload": { "payload": {
"cache": {
"cargo-registry-cache": "/root/.cargo/registry",
"cargo-git-cache": "/root/.cargo/git",
},
"maxRunTime": 600, "maxRunTime": 600,
"image": "buildpack-deps:bionic", "image": "buildpack-deps:bionic",
"command": [ "command": [