• Home
  • Line#
  • Scopes#
  • Navigate#
  • Raw
  • Download
1[
2  {
3    "cmd": [
4      "vpython",
5      "-u",
6      "RECIPE_MODULE[recipe_engine::file]/resources/fileutil.py",
7      "--json-output",
8      "/path/to/tmp/json",
9      "ensure-directory",
10      "--mode",
11      "0777",
12      "[START_DIR]/cache/docker/canvaskit"
13    ],
14    "infra_step": true,
15    "name": "mkdirs out_dir"
16  },
17  {
18    "cmd": [
19      "python",
20      "-u",
21      "[START_DIR]/cache/work/skia/bin/activate-emsdk"
22    ],
23    "cwd": "[START_DIR]/cache/work/skia",
24    "env": {
25      "CHROME_HEADLESS": "1",
26      "PATH": "<PATH>:RECIPE_REPO[depot_tools]"
27    },
28    "infra_step": true,
29    "name": "activate-emsdk"
30  },
31  {
32    "cmd": [
33      "docker",
34      "run",
35      "--rm",
36      "--volume",
37      "[START_DIR]/cache/work:/SRC",
38      "--volume",
39      "[START_DIR]/cache/docker/canvaskit:/OUT",
40      "gcr.io/skia-public/canvaskit-emsdk:3.1.3_v1",
41      "/SRC/skia/infra/canvaskit/build_canvaskit.sh",
42      "debug"
43    ],
44    "env": {
45      "CHROME_HEADLESS": "1",
46      "DOCKER_CONFIG": "/home/chrome-bot/.docker",
47      "PATH": "<PATH>:RECIPE_REPO[depot_tools]"
48    },
49    "name": "Build CanvasKit with Docker"
50  },
51  {
52    "cmd": [
53      "python",
54      "-u",
55      "import errno\nimport glob\nimport os\nimport shutil\nimport sys\n\nsrc = sys.argv[1]\ndst = sys.argv[2]\nbuild_products = ['canvaskit.*']\n\ntry:\n  os.makedirs(dst)\nexcept OSError as e:\n  if e.errno != errno.EEXIST:\n    raise\n\nfor pattern in build_products:\n  path = os.path.join(src, pattern)\n  for f in glob.glob(path):\n    dst_path = os.path.join(dst, os.path.relpath(f, src))\n    if not os.path.isdir(os.path.dirname(dst_path)):\n      os.makedirs(os.path.dirname(dst_path))\n    print('Copying build product %s to %s' % (f, dst_path))\n    # Because Docker usually has some strange permissions (like root\n    # ownership), we'd rather not keep those around. copyfile doesn't\n    # keep the metadata around, so that helps us.\n    shutil.copyfile(f, dst_path)\n",
56      "[START_DIR]/cache/docker/canvaskit",
57      "[START_DIR]/[SWARM_OUT_DIR]/out/Debug"
58    ],
59    "infra_step": true,
60    "name": "copy wasm output",
61    "~followup_annotations": [
62      "@@@STEP_LOG_LINE@python.inline@import errno@@@",
63      "@@@STEP_LOG_LINE@python.inline@import glob@@@",
64      "@@@STEP_LOG_LINE@python.inline@import os@@@",
65      "@@@STEP_LOG_LINE@python.inline@import shutil@@@",
66      "@@@STEP_LOG_LINE@python.inline@import sys@@@",
67      "@@@STEP_LOG_LINE@python.inline@@@@",
68      "@@@STEP_LOG_LINE@python.inline@src = sys.argv[1]@@@",
69      "@@@STEP_LOG_LINE@python.inline@dst = sys.argv[2]@@@",
70      "@@@STEP_LOG_LINE@python.inline@build_products = ['canvaskit.*']@@@",
71      "@@@STEP_LOG_LINE@python.inline@@@@",
72      "@@@STEP_LOG_LINE@python.inline@try:@@@",
73      "@@@STEP_LOG_LINE@python.inline@  os.makedirs(dst)@@@",
74      "@@@STEP_LOG_LINE@python.inline@except OSError as e:@@@",
75      "@@@STEP_LOG_LINE@python.inline@  if e.errno != errno.EEXIST:@@@",
76      "@@@STEP_LOG_LINE@python.inline@    raise@@@",
77      "@@@STEP_LOG_LINE@python.inline@@@@",
78      "@@@STEP_LOG_LINE@python.inline@for pattern in build_products:@@@",
79      "@@@STEP_LOG_LINE@python.inline@  path = os.path.join(src, pattern)@@@",
80      "@@@STEP_LOG_LINE@python.inline@  for f in glob.glob(path):@@@",
81      "@@@STEP_LOG_LINE@python.inline@    dst_path = os.path.join(dst, os.path.relpath(f, src))@@@",
82      "@@@STEP_LOG_LINE@python.inline@    if not os.path.isdir(os.path.dirname(dst_path)):@@@",
83      "@@@STEP_LOG_LINE@python.inline@      os.makedirs(os.path.dirname(dst_path))@@@",
84      "@@@STEP_LOG_LINE@python.inline@    print('Copying build product %s to %s' % (f, dst_path))@@@",
85      "@@@STEP_LOG_LINE@python.inline@    # Because Docker usually has some strange permissions (like root@@@",
86      "@@@STEP_LOG_LINE@python.inline@    # ownership), we'd rather not keep those around. copyfile doesn't@@@",
87      "@@@STEP_LOG_LINE@python.inline@    # keep the metadata around, so that helps us.@@@",
88      "@@@STEP_LOG_LINE@python.inline@    shutil.copyfile(f, dst_path)@@@",
89      "@@@STEP_LOG_END@python.inline@@@"
90    ]
91  },
92  {
93    "name": "$result"
94  }
95]