• Home
  • Line#
  • Scopes#
  • Navigate#
  • Raw
  • Download
1[
2  {
3    "cmd": [
4      "python",
5      "-u",
6      "\nimport subprocess\nimport sys\n\nwhich = 'where' if sys.platform == 'win32' else 'which'\ngit = subprocess.check_output([which, 'git'])\nprint 'git was found at %s' % git\nif 'cipd_bin_packages' not in git:\n  print >> sys.stderr, 'Git must be obtained through CIPD.'\n  sys.exit(1)\n"
7    ],
8    "env": {
9      "CHROME_HEADLESS": "1",
10      "PATH": "<PATH>:RECIPE_REPO[depot_tools]"
11    },
12    "name": "Assert that Git is from CIPD",
13    "~followup_annotations": [
14      "@@@STEP_LOG_LINE@python.inline@@@@",
15      "@@@STEP_LOG_LINE@python.inline@import subprocess@@@",
16      "@@@STEP_LOG_LINE@python.inline@import sys@@@",
17      "@@@STEP_LOG_LINE@python.inline@@@@",
18      "@@@STEP_LOG_LINE@python.inline@which = 'where' if sys.platform == 'win32' else 'which'@@@",
19      "@@@STEP_LOG_LINE@python.inline@git = subprocess.check_output([which, 'git'])@@@",
20      "@@@STEP_LOG_LINE@python.inline@print 'git was found at %s' % git@@@",
21      "@@@STEP_LOG_LINE@python.inline@if 'cipd_bin_packages' not in git:@@@",
22      "@@@STEP_LOG_LINE@python.inline@  print >> sys.stderr, 'Git must be obtained through CIPD.'@@@",
23      "@@@STEP_LOG_LINE@python.inline@  sys.exit(1)@@@",
24      "@@@STEP_LOG_END@python.inline@@@"
25    ]
26  },
27  {
28    "cmd": [
29      "vpython",
30      "-u",
31      "RECIPE_MODULE[recipe_engine::file]/resources/fileutil.py",
32      "--json-output",
33      "/path/to/tmp/json",
34      "rmtree",
35      "[START_DIR]/cache/work/flutter"
36    ],
37    "infra_step": true,
38    "name": "rmtree flutter"
39  },
40  {
41    "cmd": [
42      "vpython",
43      "-u",
44      "RECIPE_MODULE[recipe_engine::file]/resources/fileutil.py",
45      "--json-output",
46      "/path/to/tmp/json",
47      "ensure-directory",
48      "--mode",
49      "0777",
50      "[START_DIR]/cache/work/flutter"
51    ],
52    "infra_step": true,
53    "name": "makedirs checkout_path"
54  },
55  {
56    "cmd": [
57      "vpython",
58      "-u",
59      "RECIPE_MODULE[recipe_engine::file]/resources/fileutil.py",
60      "--json-output",
61      "/path/to/tmp/json",
62      "remove",
63      "[START_DIR]/cache/work/flutter/.gclient_entries"
64    ],
65    "infra_step": true,
66    "name": "remove [START_DIR]/cache/work/flutter/.gclient_entries"
67  },
68  {
69    "cmd": [
70      "python",
71      "-u",
72      "RECIPE_MODULE[depot_tools::bot_update]/resources/bot_update.py",
73      "--spec-path",
74      "cache_dir = '[START_DIR]/cache/git'\nsolutions = [{'deps_file': '.DEPS.git', 'managed': True, 'name': 'src/flutter', 'url': 'https://github.com/flutter/engine.git'}]\ntarget_os = ['android']",
75      "--patch_root",
76      "src/third_party/skia",
77      "--revision_mapping_file",
78      "{\"got_flutter_revision\": \"src/flutter\", \"got_revision\": \"src/third_party/skia\"}",
79      "--git-cache-dir",
80      "[START_DIR]/cache/git",
81      "--cleanup-dir",
82      "[CLEANUP]/bot_update",
83      "--output_json",
84      "/path/to/tmp/json",
85      "--revision",
86      "src/flutter@origin/master",
87      "--revision",
88      "src/third_party/skia@abc123"
89    ],
90    "cwd": "[START_DIR]/cache/work/flutter",
91    "env": {
92      "GIT_HTTP_LOW_SPEED_LIMIT": "102400",
93      "GIT_HTTP_LOW_SPEED_TIME": "1800"
94    },
95    "env_suffixes": {
96      "DEPOT_TOOLS_UPDATE": [
97        "0"
98      ],
99      "PATH": [
100        "RECIPE_REPO[depot_tools]"
101      ]
102    },
103    "infra_step": true,
104    "name": "bot_update",
105    "~followup_annotations": [
106      "@@@STEP_TEXT@Some step text@@@",
107      "@@@STEP_LOG_LINE@json.output@{@@@",
108      "@@@STEP_LOG_LINE@json.output@  \"did_run\": true, @@@",
109      "@@@STEP_LOG_LINE@json.output@  \"fixed_revisions\": {@@@",
110      "@@@STEP_LOG_LINE@json.output@    \"src/flutter\": \"origin/master\", @@@",
111      "@@@STEP_LOG_LINE@json.output@    \"src/third_party/skia\": \"abc123\"@@@",
112      "@@@STEP_LOG_LINE@json.output@  }, @@@",
113      "@@@STEP_LOG_LINE@json.output@  \"manifest\": {@@@",
114      "@@@STEP_LOG_LINE@json.output@    \"src/flutter\": {@@@",
115      "@@@STEP_LOG_LINE@json.output@      \"repository\": \"https://fake.org/src/flutter.git\", @@@",
116      "@@@STEP_LOG_LINE@json.output@      \"revision\": \"a1681567f61ff6b59df53546991904bbf6eda393\"@@@",
117      "@@@STEP_LOG_LINE@json.output@    }, @@@",
118      "@@@STEP_LOG_LINE@json.output@    \"src/third_party/skia\": {@@@",
119      "@@@STEP_LOG_LINE@json.output@      \"repository\": \"https://fake.org/src/third_party/skia.git\", @@@",
120      "@@@STEP_LOG_LINE@json.output@      \"revision\": \"abc123\"@@@",
121      "@@@STEP_LOG_LINE@json.output@    }@@@",
122      "@@@STEP_LOG_LINE@json.output@  }, @@@",
123      "@@@STEP_LOG_LINE@json.output@  \"patch_failure\": false, @@@",
124      "@@@STEP_LOG_LINE@json.output@  \"patch_root\": \"src/third_party/skia\", @@@",
125      "@@@STEP_LOG_LINE@json.output@  \"properties\": {@@@",
126      "@@@STEP_LOG_LINE@json.output@    \"got_flutter_revision\": \"a1681567f61ff6b59df53546991904bbf6eda393\", @@@",
127      "@@@STEP_LOG_LINE@json.output@    \"got_flutter_revision_cp\": \"refs/heads/master@{#84512}\", @@@",
128      "@@@STEP_LOG_LINE@json.output@    \"got_revision\": \"abc123\", @@@",
129      "@@@STEP_LOG_LINE@json.output@    \"got_revision_cp\": \"refs/heads/master@{#143121}\"@@@",
130      "@@@STEP_LOG_LINE@json.output@  }, @@@",
131      "@@@STEP_LOG_LINE@json.output@  \"root\": \"src/flutter\", @@@",
132      "@@@STEP_LOG_LINE@json.output@  \"source_manifest\": {@@@",
133      "@@@STEP_LOG_LINE@json.output@    \"directories\": {@@@",
134      "@@@STEP_LOG_LINE@json.output@      \"src/flutter\": {@@@",
135      "@@@STEP_LOG_LINE@json.output@        \"git_checkout\": {@@@",
136      "@@@STEP_LOG_LINE@json.output@          \"repo_url\": \"https://fake.org/src/flutter.git\", @@@",
137      "@@@STEP_LOG_LINE@json.output@          \"revision\": \"a1681567f61ff6b59df53546991904bbf6eda393\"@@@",
138      "@@@STEP_LOG_LINE@json.output@        }@@@",
139      "@@@STEP_LOG_LINE@json.output@      }, @@@",
140      "@@@STEP_LOG_LINE@json.output@      \"src/third_party/skia\": {@@@",
141      "@@@STEP_LOG_LINE@json.output@        \"git_checkout\": {@@@",
142      "@@@STEP_LOG_LINE@json.output@          \"repo_url\": \"https://fake.org/src/third_party/skia.git\", @@@",
143      "@@@STEP_LOG_LINE@json.output@          \"revision\": \"abc123\"@@@",
144      "@@@STEP_LOG_LINE@json.output@        }@@@",
145      "@@@STEP_LOG_LINE@json.output@      }@@@",
146      "@@@STEP_LOG_LINE@json.output@    }, @@@",
147      "@@@STEP_LOG_LINE@json.output@    \"version\": 0@@@",
148      "@@@STEP_LOG_LINE@json.output@  }, @@@",
149      "@@@STEP_LOG_LINE@json.output@  \"step_text\": \"Some step text\"@@@",
150      "@@@STEP_LOG_LINE@json.output@}@@@",
151      "@@@STEP_LOG_END@json.output@@@",
152      "@@@SET_BUILD_PROPERTY@got_flutter_revision@\"a1681567f61ff6b59df53546991904bbf6eda393\"@@@",
153      "@@@SET_BUILD_PROPERTY@got_flutter_revision_cp@\"refs/heads/master@{#84512}\"@@@",
154      "@@@SET_BUILD_PROPERTY@got_revision@\"abc123\"@@@",
155      "@@@SET_BUILD_PROPERTY@got_revision_cp@\"refs/heads/master@{#143121}\"@@@"
156    ]
157  },
158  {
159    "cmd": [
160      "python",
161      "-u",
162      "RECIPE_REPO[depot_tools]/gclient.py",
163      "runhooks"
164    ],
165    "cwd": "[START_DIR]/cache/work/flutter",
166    "env": {
167      "DEPOT_TOOLS_UPDATE": "0"
168    },
169    "env_suffixes": {
170      "PATH": [
171        "RECIPE_REPO[depot_tools]"
172      ]
173    },
174    "name": "gclient runhooks"
175  },
176  {
177    "cmd": [
178      "vpython",
179      "-u",
180      "RECIPE_MODULE[recipe_engine::file]/resources/fileutil.py",
181      "--json-output",
182      "/path/to/tmp/json",
183      "ensure-directory",
184      "--mode",
185      "0777",
186      "[START_DIR]/tmp"
187    ],
188    "infra_step": true,
189    "name": "makedirs tmp_dir"
190  },
191  {
192    "cmd": [
193      "vpython",
194      "-u",
195      "RECIPE_MODULE[recipe_engine::file]/resources/fileutil.py",
196      "--json-output",
197      "/path/to/tmp/json",
198      "rmtree",
199      "[START_DIR]/cache/work/flutter/src/out/android_release"
200    ],
201    "cwd": "[START_DIR]/cache/work/flutter/src",
202    "infra_step": true,
203    "name": "rmtree android_release"
204  },
205  {
206    "cmd": [
207      "flutter/tools/gn",
208      "--runtime-mode=release",
209      "--android"
210    ],
211    "cwd": "[START_DIR]/cache/work/flutter/src",
212    "env": {
213      "CHROME_HEADLESS": "1",
214      "PATH": "<PATH>:RECIPE_REPO[depot_tools]"
215    },
216    "name": "gn_gen"
217  },
218  {
219    "cmd": [
220      "ninja",
221      "-C",
222      "[START_DIR]/cache/work/flutter/src/out/android_release",
223      "-j100"
224    ],
225    "cwd": "[START_DIR]/cache/work/flutter/src",
226    "env": {
227      "CHROME_HEADLESS": "1",
228      "PATH": "<PATH>:RECIPE_REPO[depot_tools]"
229    },
230    "name": "build_flutter"
231  },
232  {
233    "cmd": [
234      "python",
235      "-u",
236      "import errno\nimport glob\nimport os\nimport shutil\nimport sys\n\nsrc = sys.argv[1]\ndst = sys.argv[2]\nbuild_products = ['*.so', 'lib/*.so']\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    shutil.move(f, dst_path)\n",
237      "[START_DIR]/cache/work/flutter/src/out/android_release",
238      "[START_DIR]/[SWARM_OUT_DIR]"
239    ],
240    "infra_step": true,
241    "name": "copy build products",
242    "~followup_annotations": [
243      "@@@STEP_LOG_LINE@python.inline@import errno@@@",
244      "@@@STEP_LOG_LINE@python.inline@import glob@@@",
245      "@@@STEP_LOG_LINE@python.inline@import os@@@",
246      "@@@STEP_LOG_LINE@python.inline@import shutil@@@",
247      "@@@STEP_LOG_LINE@python.inline@import sys@@@",
248      "@@@STEP_LOG_LINE@python.inline@@@@",
249      "@@@STEP_LOG_LINE@python.inline@src = sys.argv[1]@@@",
250      "@@@STEP_LOG_LINE@python.inline@dst = sys.argv[2]@@@",
251      "@@@STEP_LOG_LINE@python.inline@build_products = ['*.so', 'lib/*.so']@@@",
252      "@@@STEP_LOG_LINE@python.inline@@@@",
253      "@@@STEP_LOG_LINE@python.inline@try:@@@",
254      "@@@STEP_LOG_LINE@python.inline@  os.makedirs(dst)@@@",
255      "@@@STEP_LOG_LINE@python.inline@except OSError as e:@@@",
256      "@@@STEP_LOG_LINE@python.inline@  if e.errno != errno.EEXIST:@@@",
257      "@@@STEP_LOG_LINE@python.inline@    raise@@@",
258      "@@@STEP_LOG_LINE@python.inline@@@@",
259      "@@@STEP_LOG_LINE@python.inline@for pattern in build_products:@@@",
260      "@@@STEP_LOG_LINE@python.inline@  path = os.path.join(src, pattern)@@@",
261      "@@@STEP_LOG_LINE@python.inline@  for f in glob.glob(path):@@@",
262      "@@@STEP_LOG_LINE@python.inline@    dst_path = os.path.join(dst, os.path.relpath(f, src))@@@",
263      "@@@STEP_LOG_LINE@python.inline@    if not os.path.isdir(os.path.dirname(dst_path)):@@@",
264      "@@@STEP_LOG_LINE@python.inline@      os.makedirs(os.path.dirname(dst_path))@@@",
265      "@@@STEP_LOG_LINE@python.inline@    print 'Copying build product %s to %s' % (f, dst_path)@@@",
266      "@@@STEP_LOG_LINE@python.inline@    shutil.move(f, dst_path)@@@",
267      "@@@STEP_LOG_END@python.inline@@@"
268    ]
269  },
270  {
271    "cmd": [
272      "python",
273      "-u",
274      "\nimport os\nimport shutil\nimport sys\n\nsrc = sys.argv[1]\ndst = sys.argv[2]\n\nif not os.path.isdir(os.path.dirname(dst)):\n  os.makedirs(os.path.dirname(dst))\n\nshutil.copyfile(src, dst)\n",
275      "[START_DIR]/cache/work/flutter/src/out/android_release/lib.stripped/libflutter.so",
276      "[START_DIR]/[SWARM_OUT_DIR]/libflutter_stripped.so"
277    ],
278    "infra_step": true,
279    "name": "copy stripped library",
280    "~followup_annotations": [
281      "@@@STEP_LOG_LINE@python.inline@@@@",
282      "@@@STEP_LOG_LINE@python.inline@import os@@@",
283      "@@@STEP_LOG_LINE@python.inline@import shutil@@@",
284      "@@@STEP_LOG_LINE@python.inline@import sys@@@",
285      "@@@STEP_LOG_LINE@python.inline@@@@",
286      "@@@STEP_LOG_LINE@python.inline@src = sys.argv[1]@@@",
287      "@@@STEP_LOG_LINE@python.inline@dst = sys.argv[2]@@@",
288      "@@@STEP_LOG_LINE@python.inline@@@@",
289      "@@@STEP_LOG_LINE@python.inline@if not os.path.isdir(os.path.dirname(dst)):@@@",
290      "@@@STEP_LOG_LINE@python.inline@  os.makedirs(os.path.dirname(dst))@@@",
291      "@@@STEP_LOG_LINE@python.inline@@@@",
292      "@@@STEP_LOG_LINE@python.inline@shutil.copyfile(src, dst)@@@",
293      "@@@STEP_LOG_END@python.inline@@@"
294    ]
295  },
296  {
297    "name": "$result"
298  }
299]