1[
2  {
3    "cmd": [
4      "python",
5      "-u",
6      "\nimport sys, os\npath = sys.argv[1]\nmode = int(sys.argv[2])\nif not os.path.isdir(path):\n  if os.path.exists(path):\n    print \"%s exists but is not a dir\" % path\n    sys.exit(1)\n  os.makedirs(path, mode)\n",
7      "[CUSTOM_/_B_WORK]",
8      "511"
9    ],
10    "infra_step": true,
11    "name": "makedirs checkout_path",
12    "~followup_annotations": [
13      "@@@STEP_LOG_LINE@python.inline@@@@",
14      "@@@STEP_LOG_LINE@python.inline@import sys, os@@@",
15      "@@@STEP_LOG_LINE@python.inline@path = sys.argv[1]@@@",
16      "@@@STEP_LOG_LINE@python.inline@mode = int(sys.argv[2])@@@",
17      "@@@STEP_LOG_LINE@python.inline@if not os.path.isdir(path):@@@",
18      "@@@STEP_LOG_LINE@python.inline@  if os.path.exists(path):@@@",
19      "@@@STEP_LOG_LINE@python.inline@    print \"%s exists but is not a dir\" % path@@@",
20      "@@@STEP_LOG_LINE@python.inline@    sys.exit(1)@@@",
21      "@@@STEP_LOG_LINE@python.inline@  os.makedirs(path, mode)@@@",
22      "@@@STEP_LOG_END@python.inline@@@"
23    ]
24  },
25  {
26    "cmd": [
27      "python",
28      "-u",
29      "RECIPE_MODULE[depot_tools::bot_update]/resources/bot_update.py",
30      "--spec",
31      "cache_dir = '[CUSTOM_/_B_CACHE]'\nsolutions = [{'deps_file': '.DEPS.git', 'managed': False, 'name': 'skia', 'url': 'https://skia.googlesource.com/skia.git'}, {'deps_file': '.DEPS.git', 'managed': False, 'name': 'src', 'url': 'https://chromium.googlesource.com/chromium/src.git'}]",
32      "--patch_root",
33      "skia",
34      "--revision_mapping_file",
35      "{\"skia\": \"got_revision\"}",
36      "--git-cache-dir",
37      "[CUSTOM_/_B_CACHE]",
38      "--output_json",
39      "/path/to/tmp/json",
40      "--revision",
41      "skia@abc123",
42      "--revision",
43      "src@origin/lkgr",
44      "--output_manifest"
45    ],
46    "cwd": "[CUSTOM_/_B_WORK]",
47    "env": {
48      "GIT_HTTP_LOW_SPEED_LIMIT": "1000",
49      "GIT_HTTP_LOW_SPEED_TIME": "300",
50      "PATH": "%(PATH)s:RECIPE_PACKAGE_REPO[depot_tools]"
51    },
52    "infra_step": true,
53    "name": "bot_update",
54    "~followup_annotations": [
55      "@@@STEP_TEXT@Some step text@@@",
56      "@@@STEP_LOG_LINE@json.output@{@@@",
57      "@@@STEP_LOG_LINE@json.output@  \"did_run\": true, @@@",
58      "@@@STEP_LOG_LINE@json.output@  \"fixed_revisions\": {@@@",
59      "@@@STEP_LOG_LINE@json.output@    \"skia\": \"abc123\", @@@",
60      "@@@STEP_LOG_LINE@json.output@    \"src\": \"origin/lkgr\"@@@",
61      "@@@STEP_LOG_LINE@json.output@  }, @@@",
62      "@@@STEP_LOG_LINE@json.output@  \"manifest\": {@@@",
63      "@@@STEP_LOG_LINE@json.output@    \"skia\": {@@@",
64      "@@@STEP_LOG_LINE@json.output@      \"repository\": \"https://fake.org/skia.git\", @@@",
65      "@@@STEP_LOG_LINE@json.output@      \"revision\": \"9046e2e693bb92a76e972b694580e5d17ad10748\"@@@",
66      "@@@STEP_LOG_LINE@json.output@    }@@@",
67      "@@@STEP_LOG_LINE@json.output@  }, @@@",
68      "@@@STEP_LOG_LINE@json.output@  \"patch_failure\": false, @@@",
69      "@@@STEP_LOG_LINE@json.output@  \"patch_root\": \"skia\", @@@",
70      "@@@STEP_LOG_LINE@json.output@  \"properties\": {@@@",
71      "@@@STEP_LOG_LINE@json.output@    \"got_revision\": \"9046e2e693bb92a76e972b694580e5d17ad10748\", @@@",
72      "@@@STEP_LOG_LINE@json.output@    \"got_revision_cp\": \"refs/heads/master@{#164710}\"@@@",
73      "@@@STEP_LOG_LINE@json.output@  }, @@@",
74      "@@@STEP_LOG_LINE@json.output@  \"root\": \"skia\", @@@",
75      "@@@STEP_LOG_LINE@json.output@  \"step_text\": \"Some step text\"@@@",
76      "@@@STEP_LOG_LINE@json.output@}@@@",
77      "@@@STEP_LOG_END@json.output@@@",
78      "@@@SET_BUILD_PROPERTY@got_revision@\"9046e2e693bb92a76e972b694580e5d17ad10748\"@@@",
79      "@@@SET_BUILD_PROPERTY@got_revision_cp@\"refs/heads/master@{#164710}\"@@@"
80    ]
81  },
82  {
83    "cmd": [
84      "python",
85      "-u",
86      "RECIPE_PACKAGE_REPO[depot_tools]/gclient.py",
87      "runhooks"
88    ],
89    "cwd": "[CUSTOM_/_B_WORK]",
90    "env": {
91      "GYP_CHROMIUM_NO_ACTION": "0",
92      "PATH": "%(PATH)s:RECIPE_PACKAGE_REPO[depot_tools]"
93    },
94    "name": "gclient runhooks"
95  },
96  {
97    "cmd": [
98      "python",
99      "-u",
100      "[CUSTOM_/_B_WORK]/skia/tools/build_command_buffer.py",
101      "--chrome-dir",
102      "[CUSTOM_/_B_WORK]",
103      "--output-dir",
104      "[CUSTOM_/_B_WORK]/skia/out/Build-Mac-Clang-x86_64-Debug-CommandBuffer/Debug",
105      "--no-sync",
106      "--make-output-dir"
107    ],
108    "env": {
109      "BUILDTYPE": "Debug",
110      "CC": "/usr/bin/clang",
111      "CHROME_HEADLESS": "1",
112      "CXX": "/usr/bin/clang++",
113      "PATH": "%(PATH)s:RECIPE_PACKAGE_REPO[depot_tools]",
114      "SKIA_OUT": "[CUSTOM_/_B_WORK]/skia/out/Build-Mac-Clang-x86_64-Debug-CommandBuffer"
115    },
116    "name": "build command_buffer"
117  },
118  {
119    "cmd": [
120      "python",
121      "-u",
122      "[CUSTOM_/_B_WORK]/skia/bin/fetch-gn"
123    ],
124    "cwd": "[CUSTOM_/_B_WORK]/skia",
125    "env": {
126      "BUILDTYPE": "Debug",
127      "CC": "/usr/bin/clang",
128      "CHROME_HEADLESS": "1",
129      "CXX": "/usr/bin/clang++",
130      "PATH": "%(PATH)s:RECIPE_PACKAGE_REPO[depot_tools]",
131      "SKIA_OUT": "[CUSTOM_/_B_WORK]/skia/out/Build-Mac-Clang-x86_64-Debug-CommandBuffer"
132    },
133    "infra_step": true,
134    "name": "fetch-gn"
135  },
136  {
137    "cmd": [
138      "[CUSTOM_/_B_WORK]/skia/bin/gn",
139      "gen",
140      "[CUSTOM_/_B_WORK]/skia/out/Build-Mac-Clang-x86_64-Debug-CommandBuffer/Debug",
141      "--args=cc=\"clang\" cxx=\"clang++\" extra_cflags=[\"-O1\"] target_cpu=\"x86_64\""
142    ],
143    "cwd": "[CUSTOM_/_B_WORK]/skia",
144    "env": {
145      "BUILDTYPE": "Debug",
146      "CC": "/usr/bin/clang",
147      "CHROME_HEADLESS": "1",
148      "CXX": "/usr/bin/clang++",
149      "PATH": "%(PATH)s:RECIPE_PACKAGE_REPO[depot_tools]",
150      "SKIA_OUT": "[CUSTOM_/_B_WORK]/skia/out/Build-Mac-Clang-x86_64-Debug-CommandBuffer"
151    },
152    "name": "gn gen"
153  },
154  {
155    "cmd": [
156      "ninja",
157      "-C",
158      "[CUSTOM_/_B_WORK]/skia/out/Build-Mac-Clang-x86_64-Debug-CommandBuffer/Debug"
159    ],
160    "cwd": "[CUSTOM_/_B_WORK]/skia",
161    "env": {
162      "BUILDTYPE": "Debug",
163      "CC": "/usr/bin/clang",
164      "CHROME_HEADLESS": "1",
165      "CXX": "/usr/bin/clang++",
166      "PATH": "%(PATH)s:RECIPE_PACKAGE_REPO[depot_tools]",
167      "SKIA_OUT": "[CUSTOM_/_B_WORK]/skia/out/Build-Mac-Clang-x86_64-Debug-CommandBuffer"
168    },
169    "name": "ninja"
170  },
171  {
172    "cmd": [
173      "python",
174      "-u",
175      "import errno\nimport glob\nimport os\nimport shutil\nimport sys\n\nsrc = sys.argv[1]\ndst = sys.argv[2]\nbuild_products_whitelist = ['dm', 'dm.exe', 'get_images_from_skps', 'get_images_from_skps.exe', 'nanobench', 'nanobench.exe', 'skpbench', '*.so', '*.dll', '*.dylib', 'skia_launcher', 'lib/*.so', 'iOSShell.app', 'iOSShell.ipa', 'visualbench', 'visualbench.exe', 'vulkan-1.dll']\n\ntry:\n  os.makedirs(dst)\nexcept OSError as e:\n  if e.errno != errno.EEXIST:\n    raise\n\nfor pattern in build_products_whitelist:\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    shutil.move(f, dst_path)\n",
176      "[CUSTOM_/_B_WORK]/skia/out/Build-Mac-Clang-x86_64-Debug-CommandBuffer/Debug",
177      "[CUSTOM_[SWARM_OUT_DIR]]/out/Debug"
178    ],
179    "infra_step": true,
180    "name": "copy build products",
181    "~followup_annotations": [
182      "@@@STEP_LOG_LINE@python.inline@import errno@@@",
183      "@@@STEP_LOG_LINE@python.inline@import glob@@@",
184      "@@@STEP_LOG_LINE@python.inline@import os@@@",
185      "@@@STEP_LOG_LINE@python.inline@import shutil@@@",
186      "@@@STEP_LOG_LINE@python.inline@import sys@@@",
187      "@@@STEP_LOG_LINE@python.inline@@@@",
188      "@@@STEP_LOG_LINE@python.inline@src = sys.argv[1]@@@",
189      "@@@STEP_LOG_LINE@python.inline@dst = sys.argv[2]@@@",
190      "@@@STEP_LOG_LINE@python.inline@build_products_whitelist = ['dm', 'dm.exe', 'get_images_from_skps', 'get_images_from_skps.exe', 'nanobench', 'nanobench.exe', 'skpbench', '*.so', '*.dll', '*.dylib', 'skia_launcher', 'lib/*.so', 'iOSShell.app', 'iOSShell.ipa', 'visualbench', 'visualbench.exe', 'vulkan-1.dll']@@@",
191      "@@@STEP_LOG_LINE@python.inline@@@@",
192      "@@@STEP_LOG_LINE@python.inline@try:@@@",
193      "@@@STEP_LOG_LINE@python.inline@  os.makedirs(dst)@@@",
194      "@@@STEP_LOG_LINE@python.inline@except OSError as e:@@@",
195      "@@@STEP_LOG_LINE@python.inline@  if e.errno != errno.EEXIST:@@@",
196      "@@@STEP_LOG_LINE@python.inline@    raise@@@",
197      "@@@STEP_LOG_LINE@python.inline@@@@",
198      "@@@STEP_LOG_LINE@python.inline@for pattern in build_products_whitelist:@@@",
199      "@@@STEP_LOG_LINE@python.inline@  path = os.path.join(src, pattern)@@@",
200      "@@@STEP_LOG_LINE@python.inline@  for f in glob.glob(path):@@@",
201      "@@@STEP_LOG_LINE@python.inline@    dst_path = os.path.join(dst, os.path.relpath(f, src))@@@",
202      "@@@STEP_LOG_LINE@python.inline@    if not os.path.isdir(os.path.dirname(dst_path)):@@@",
203      "@@@STEP_LOG_LINE@python.inline@      os.makedirs(os.path.dirname(dst_path))@@@",
204      "@@@STEP_LOG_LINE@python.inline@    print 'Copying build product %s to %s' % (f, dst_path)@@@",
205      "@@@STEP_LOG_LINE@python.inline@    shutil.move(f, dst_path)@@@",
206      "@@@STEP_LOG_END@python.inline@@@"
207    ]
208  },
209  {
210    "name": "$result",
211    "recipe_result": null,
212    "status_code": 0
213  }
214]