cdee3af4b9e78098a4cb2333f01e546220fd953d
[platform/upstream/libSkiaSharp.git] /
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       "git",
28       "remote",
29       "set-url",
30       "origin",
31       "https://skia.googlesource.com/skia.git"
32     ],
33     "cwd": "[CUSTOM_/_B_WORK]/skia",
34     "infra_step": true,
35     "name": "git remote set-url"
36   },
37   {
38     "cmd": [
39       "git",
40       "fetch"
41     ],
42     "cwd": "[CUSTOM_/_B_WORK]/skia",
43     "infra_step": true,
44     "name": "git fetch"
45   },
46   {
47     "cmd": [
48       "git",
49       "reset",
50       "--hard",
51       "abc123"
52     ],
53     "cwd": "[CUSTOM_/_B_WORK]/skia",
54     "infra_step": true,
55     "name": "git reset"
56   },
57   {
58     "cmd": [
59       "git",
60       "clean",
61       "-d",
62       "-f"
63     ],
64     "cwd": "[CUSTOM_/_B_WORK]/skia",
65     "infra_step": true,
66     "name": "git clean"
67   },
68   {
69     "cmd": [
70       "python",
71       "-u",
72       "RECIPE_MODULE[depot_tools::bot_update]/resources/bot_update.py",
73       "--spec",
74       "cache_dir = '[CUSTOM_/_B_CACHE]'\nsolutions = [{'deps_file': '.DEPS.git', 'managed': False, 'name': 'skia', 'url': 'https://skia.googlesource.com/skia.git'}]",
75       "--patch_root",
76       "skia",
77       "--revision_mapping_file",
78       "{\"skia\": \"got_revision\"}",
79       "--git-cache-dir",
80       "[CUSTOM_/_B_CACHE]",
81       "--output_json",
82       "/path/to/tmp/json",
83       "--revision",
84       "skia@abc123",
85       "--output_manifest"
86     ],
87     "cwd": "[CUSTOM_/_B_WORK]",
88     "env": {
89       "GIT_HTTP_LOW_SPEED_LIMIT": "1000",
90       "GIT_HTTP_LOW_SPEED_TIME": "300",
91       "PATH": "%(PATH)s:RECIPE_PACKAGE_REPO[depot_tools]"
92     },
93     "infra_step": true,
94     "name": "bot_update",
95     "~followup_annotations": [
96       "@@@STEP_TEXT@Some step text@@@",
97       "@@@STEP_LOG_LINE@json.output@{@@@",
98       "@@@STEP_LOG_LINE@json.output@  \"did_run\": true, @@@",
99       "@@@STEP_LOG_LINE@json.output@  \"fixed_revisions\": {@@@",
100       "@@@STEP_LOG_LINE@json.output@    \"skia\": \"abc123\"@@@",
101       "@@@STEP_LOG_LINE@json.output@  }, @@@",
102       "@@@STEP_LOG_LINE@json.output@  \"manifest\": {@@@",
103       "@@@STEP_LOG_LINE@json.output@    \"skia\": {@@@",
104       "@@@STEP_LOG_LINE@json.output@      \"repository\": \"https://fake.org/skia.git\", @@@",
105       "@@@STEP_LOG_LINE@json.output@      \"revision\": \"9046e2e693bb92a76e972b694580e5d17ad10748\"@@@",
106       "@@@STEP_LOG_LINE@json.output@    }@@@",
107       "@@@STEP_LOG_LINE@json.output@  }, @@@",
108       "@@@STEP_LOG_LINE@json.output@  \"patch_failure\": false, @@@",
109       "@@@STEP_LOG_LINE@json.output@  \"patch_root\": \"skia\", @@@",
110       "@@@STEP_LOG_LINE@json.output@  \"properties\": {@@@",
111       "@@@STEP_LOG_LINE@json.output@    \"got_revision\": \"9046e2e693bb92a76e972b694580e5d17ad10748\", @@@",
112       "@@@STEP_LOG_LINE@json.output@    \"got_revision_cp\": \"refs/heads/master@{#164710}\"@@@",
113       "@@@STEP_LOG_LINE@json.output@  }, @@@",
114       "@@@STEP_LOG_LINE@json.output@  \"root\": \"skia\", @@@",
115       "@@@STEP_LOG_LINE@json.output@  \"step_text\": \"Some step text\"@@@",
116       "@@@STEP_LOG_LINE@json.output@}@@@",
117       "@@@STEP_LOG_END@json.output@@@",
118       "@@@SET_BUILD_PROPERTY@got_revision@\"9046e2e693bb92a76e972b694580e5d17ad10748\"@@@",
119       "@@@SET_BUILD_PROPERTY@got_revision_cp@\"refs/heads/master@{#164710}\"@@@"
120     ]
121   },
122   {
123     "cmd": [
124       "python",
125       "-u",
126       "[CUSTOM_/_B_WORK]/skia/bin/fetch-gn"
127     ],
128     "cwd": "[CUSTOM_/_B_WORK]/skia",
129     "env": {
130       "BUILDTYPE": "Debug",
131       "CHROME_HEADLESS": "1",
132       "CPPFLAGS": "-DSK_USE_DISCARDABLE_SCALEDIMAGECACHE",
133       "PATH": "%(PATH)s:RECIPE_PACKAGE_REPO[depot_tools]",
134       "SKIA_OUT": "[CUSTOM_/_B_WORK]/skia/out/Build-Ubuntu-GCC-x86_64-Debug-SK_USE_DISCARDABLE_SCALEDIMAGECACHE"
135     },
136     "infra_step": true,
137     "name": "fetch-gn"
138   },
139   {
140     "cmd": [
141       "[CUSTOM_/_B_WORK]/skia/bin/gn",
142       "gen",
143       "[CUSTOM_/_B_WORK]/skia/out/Build-Ubuntu-GCC-x86_64-Debug-SK_USE_DISCARDABLE_SCALEDIMAGECACHE/Debug",
144       "--args=cc=\"gcc\" cxx=\"g++\" extra_cflags=[\"-O1\", \"-DSK_USE_DISCARDABLE_SCALEDIMAGECACHE\"] target_cpu=\"x86_64\""
145     ],
146     "cwd": "[CUSTOM_/_B_WORK]/skia",
147     "env": {
148       "BUILDTYPE": "Debug",
149       "CHROME_HEADLESS": "1",
150       "CPPFLAGS": "-DSK_USE_DISCARDABLE_SCALEDIMAGECACHE",
151       "PATH": "%(PATH)s:RECIPE_PACKAGE_REPO[depot_tools]",
152       "SKIA_OUT": "[CUSTOM_/_B_WORK]/skia/out/Build-Ubuntu-GCC-x86_64-Debug-SK_USE_DISCARDABLE_SCALEDIMAGECACHE"
153     },
154     "name": "gn gen"
155   },
156   {
157     "cmd": [
158       "ninja",
159       "-C",
160       "[CUSTOM_/_B_WORK]/skia/out/Build-Ubuntu-GCC-x86_64-Debug-SK_USE_DISCARDABLE_SCALEDIMAGECACHE/Debug"
161     ],
162     "cwd": "[CUSTOM_/_B_WORK]/skia",
163     "env": {
164       "BUILDTYPE": "Debug",
165       "CHROME_HEADLESS": "1",
166       "CPPFLAGS": "-DSK_USE_DISCARDABLE_SCALEDIMAGECACHE",
167       "PATH": "%(PATH)s:RECIPE_PACKAGE_REPO[depot_tools]",
168       "SKIA_OUT": "[CUSTOM_/_B_WORK]/skia/out/Build-Ubuntu-GCC-x86_64-Debug-SK_USE_DISCARDABLE_SCALEDIMAGECACHE"
169     },
170     "name": "ninja"
171   },
172   {
173     "cmd": [
174       "python",
175       "-u",
176       "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', 'dm.app', 'nanobench.app', '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",
177       "[CUSTOM_/_B_WORK]/skia/out/Build-Ubuntu-GCC-x86_64-Debug-SK_USE_DISCARDABLE_SCALEDIMAGECACHE/Debug",
178       "[CUSTOM_[SWARM_OUT_DIR]]/out/Debug"
179     ],
180     "infra_step": true,
181     "name": "copy build products",
182     "~followup_annotations": [
183       "@@@STEP_LOG_LINE@python.inline@import errno@@@",
184       "@@@STEP_LOG_LINE@python.inline@import glob@@@",
185       "@@@STEP_LOG_LINE@python.inline@import os@@@",
186       "@@@STEP_LOG_LINE@python.inline@import shutil@@@",
187       "@@@STEP_LOG_LINE@python.inline@import sys@@@",
188       "@@@STEP_LOG_LINE@python.inline@@@@",
189       "@@@STEP_LOG_LINE@python.inline@src = sys.argv[1]@@@",
190       "@@@STEP_LOG_LINE@python.inline@dst = sys.argv[2]@@@",
191       "@@@STEP_LOG_LINE@python.inline@build_products_whitelist = ['dm', 'dm.exe', 'dm.app', 'nanobench.app', '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']@@@",
192       "@@@STEP_LOG_LINE@python.inline@@@@",
193       "@@@STEP_LOG_LINE@python.inline@try:@@@",
194       "@@@STEP_LOG_LINE@python.inline@  os.makedirs(dst)@@@",
195       "@@@STEP_LOG_LINE@python.inline@except OSError as e:@@@",
196       "@@@STEP_LOG_LINE@python.inline@  if e.errno != errno.EEXIST:@@@",
197       "@@@STEP_LOG_LINE@python.inline@    raise@@@",
198       "@@@STEP_LOG_LINE@python.inline@@@@",
199       "@@@STEP_LOG_LINE@python.inline@for pattern in build_products_whitelist:@@@",
200       "@@@STEP_LOG_LINE@python.inline@  path = os.path.join(src, pattern)@@@",
201       "@@@STEP_LOG_LINE@python.inline@  for f in glob.glob(path):@@@",
202       "@@@STEP_LOG_LINE@python.inline@    dst_path = os.path.join(dst, os.path.relpath(f, src))@@@",
203       "@@@STEP_LOG_LINE@python.inline@    if not os.path.isdir(os.path.dirname(dst_path)):@@@",
204       "@@@STEP_LOG_LINE@python.inline@      os.makedirs(os.path.dirname(dst_path))@@@",
205       "@@@STEP_LOG_LINE@python.inline@    print 'Copying build product %s to %s' % (f, dst_path)@@@",
206       "@@@STEP_LOG_LINE@python.inline@    shutil.move(f, dst_path)@@@",
207       "@@@STEP_LOG_END@python.inline@@@"
208     ]
209   },
210   {
211     "name": "$result",
212     "recipe_result": null,
213     "status_code": 0
214   }
215 ]