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