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 "ensure-directory", 35 "--mode", 36 "0777", 37 "[START_DIR]/cache/work" 38 ], 39 "infra_step": true, 40 "name": "makedirs checkout_path" 41 }, 42 { 43 "cmd": [ 44 "vpython", 45 "-u", 46 "RECIPE_MODULE[recipe_engine::file]/resources/fileutil.py", 47 "--json-output", 48 "/path/to/tmp/json", 49 "remove", 50 "[START_DIR]/cache/work/.gclient_entries" 51 ], 52 "infra_step": true, 53 "name": "remove [START_DIR]/cache/work/.gclient_entries" 54 }, 55 { 56 "cmd": [ 57 "python", 58 "-u", 59 "RECIPE_MODULE[depot_tools::bot_update]/resources/bot_update.py", 60 "--spec-path", 61 "cache_dir = '[START_DIR]/cache/git'\nsolutions = [{'deps_file': '.DEPS.git', 'managed': False, 'name': 'skia', 'url': 'https://skia.googlesource.com/skia.git'}]", 62 "--patch_root", 63 "skia", 64 "--revision_mapping_file", 65 "{\"got_revision\": \"skia\"}", 66 "--git-cache-dir", 67 "[START_DIR]/cache/git", 68 "--cleanup-dir", 69 "[CLEANUP]/bot_update", 70 "--output_json", 71 "/path/to/tmp/json", 72 "--revision", 73 "skia@abc123" 74 ], 75 "cwd": "[START_DIR]/cache/work", 76 "env_suffixes": { 77 "PATH": [ 78 "RECIPE_REPO[depot_tools]" 79 ] 80 }, 81 "infra_step": true, 82 "name": "bot_update", 83 "~followup_annotations": [ 84 "@@@STEP_TEXT@Some step text@@@", 85 "@@@STEP_LOG_LINE@json.output@{@@@", 86 "@@@STEP_LOG_LINE@json.output@ \"did_run\": true, @@@", 87 "@@@STEP_LOG_LINE@json.output@ \"fixed_revisions\": {@@@", 88 "@@@STEP_LOG_LINE@json.output@ \"skia\": \"abc123\"@@@", 89 "@@@STEP_LOG_LINE@json.output@ }, @@@", 90 "@@@STEP_LOG_LINE@json.output@ \"manifest\": {@@@", 91 "@@@STEP_LOG_LINE@json.output@ \"skia\": {@@@", 92 "@@@STEP_LOG_LINE@json.output@ \"repository\": \"https://fake.org/skia.git\", @@@", 93 "@@@STEP_LOG_LINE@json.output@ \"revision\": \"9046e2e693bb92a76e972b694580e5d17ad10748\"@@@", 94 "@@@STEP_LOG_LINE@json.output@ }@@@", 95 "@@@STEP_LOG_LINE@json.output@ }, @@@", 96 "@@@STEP_LOG_LINE@json.output@ \"patch_failure\": false, @@@", 97 "@@@STEP_LOG_LINE@json.output@ \"patch_root\": \"skia\", @@@", 98 "@@@STEP_LOG_LINE@json.output@ \"properties\": {@@@", 99 "@@@STEP_LOG_LINE@json.output@ \"got_revision\": \"9046e2e693bb92a76e972b694580e5d17ad10748\", @@@", 100 "@@@STEP_LOG_LINE@json.output@ \"got_revision_cp\": \"refs/heads/master@{#164710}\"@@@", 101 "@@@STEP_LOG_LINE@json.output@ }, @@@", 102 "@@@STEP_LOG_LINE@json.output@ \"root\": \"skia\", @@@", 103 "@@@STEP_LOG_LINE@json.output@ \"source_manifest\": {@@@", 104 "@@@STEP_LOG_LINE@json.output@ \"directories\": {@@@", 105 "@@@STEP_LOG_LINE@json.output@ \"skia\": {@@@", 106 "@@@STEP_LOG_LINE@json.output@ \"git_checkout\": {@@@", 107 "@@@STEP_LOG_LINE@json.output@ \"repo_url\": \"https://fake.org/skia.git\", @@@", 108 "@@@STEP_LOG_LINE@json.output@ \"revision\": \"9046e2e693bb92a76e972b694580e5d17ad10748\"@@@", 109 "@@@STEP_LOG_LINE@json.output@ }@@@", 110 "@@@STEP_LOG_LINE@json.output@ }@@@", 111 "@@@STEP_LOG_LINE@json.output@ }, @@@", 112 "@@@STEP_LOG_LINE@json.output@ \"version\": 0@@@", 113 "@@@STEP_LOG_LINE@json.output@ }, @@@", 114 "@@@STEP_LOG_LINE@json.output@ \"step_text\": \"Some step text\"@@@", 115 "@@@STEP_LOG_LINE@json.output@}@@@", 116 "@@@STEP_LOG_END@json.output@@@", 117 "@@@SET_BUILD_PROPERTY@got_revision@\"9046e2e693bb92a76e972b694580e5d17ad10748\"@@@", 118 "@@@SET_BUILD_PROPERTY@got_revision_cp@\"refs/heads/master@{#164710}\"@@@" 119 ] 120 }, 121 { 122 "cmd": [ 123 "vpython", 124 "-u", 125 "RECIPE_MODULE[recipe_engine::file]/resources/fileutil.py", 126 "--json-output", 127 "/path/to/tmp/json", 128 "ensure-directory", 129 "--mode", 130 "0777", 131 "[START_DIR]/tmp" 132 ], 133 "infra_step": true, 134 "name": "makedirs tmp_dir" 135 }, 136 { 137 "cmd": [ 138 "git", 139 "diff", 140 "--no-ext-diff" 141 ], 142 "cwd": "[START_DIR]/cache/work/skia", 143 "env": { 144 "CHROME_HEADLESS": "1", 145 "PATH": "<PATH>:RECIPE_REPO[depot_tools]" 146 }, 147 "name": "git diff #1" 148 }, 149 { 150 "cmd": [ 151 "make", 152 "-C", 153 "tools/gpu/gl/interface", 154 "generate" 155 ], 156 "cwd": "[START_DIR]/cache/work/skia", 157 "env": { 158 "GOCACHE": "[START_DIR]/cache/go_cache", 159 "GOPATH": "[START_DIR]/cache/gopath", 160 "GOROOT": "[START_DIR]/go/go", 161 "PATH": "[START_DIR]/go/go/bin:[START_DIR]/cache/gopath/bin:<PATH>" 162 }, 163 "name": "generate gl interfaces" 164 }, 165 { 166 "cmd": [ 167 "python", 168 "-u", 169 "bin/fetch-gn" 170 ], 171 "cwd": "[START_DIR]/cache/work/skia", 172 "env": { 173 "CHROME_HEADLESS": "1", 174 "PATH": "<PATH>:RECIPE_REPO[depot_tools]" 175 }, 176 "infra_step": true, 177 "name": "fetch-gn" 178 }, 179 { 180 "cmd": [ 181 "git", 182 "ls-files", 183 "*.gn" 184 ], 185 "cwd": "[START_DIR]/cache/work/skia", 186 "env": { 187 "CHROME_HEADLESS": "1", 188 "PATH": "<PATH>:RECIPE_REPO[depot_tools]" 189 }, 190 "infra_step": true, 191 "name": "list .gn files" 192 }, 193 { 194 "cmd": [ 195 "bin/gn", 196 "format", 197 "BUILD.gn" 198 ], 199 "cwd": "[START_DIR]/cache/work/skia", 200 "env": { 201 "CHROME_HEADLESS": "1", 202 "PATH": "<PATH>:RECIPE_REPO[depot_tools]" 203 }, 204 "name": "format BUILD.gn" 205 }, 206 { 207 "cmd": [ 208 "bin/gn", 209 "format", 210 "gn/foo.gn" 211 ], 212 "cwd": "[START_DIR]/cache/work/skia", 213 "env": { 214 "CHROME_HEADLESS": "1", 215 "PATH": "<PATH>:RECIPE_REPO[depot_tools]" 216 }, 217 "name": "format gn/foo.gn" 218 }, 219 { 220 "cmd": [ 221 "python", 222 "-u", 223 "tools/rewrite_includes.py" 224 ], 225 "cwd": "[START_DIR]/cache/work/skia", 226 "env": { 227 "CHROME_HEADLESS": "1", 228 "PATH": "<PATH>:RECIPE_REPO[depot_tools]" 229 }, 230 "name": "rewrite #includes" 231 }, 232 { 233 "cmd": [ 234 "python", 235 "-u", 236 "import os\nimport subprocess\n\nfor r, d, files in os.walk('[START_DIR]/cache/work/skia'):\n for f in files:\n if f.endswith('.fp'):\n path = os.path.join(r, f)\n print 'touch %s' % path\n subprocess.check_call(['touch', path])\n" 237 ], 238 "cwd": "[START_DIR]/cache/work/skia", 239 "env": { 240 "CHROME_HEADLESS": "1", 241 "PATH": "<PATH>:RECIPE_REPO[depot_tools]" 242 }, 243 "name": "touch fp files", 244 "~followup_annotations": [ 245 "@@@STEP_LOG_LINE@python.inline@import os@@@", 246 "@@@STEP_LOG_LINE@python.inline@import subprocess@@@", 247 "@@@STEP_LOG_LINE@python.inline@@@@", 248 "@@@STEP_LOG_LINE@python.inline@for r, d, files in os.walk('[START_DIR]/cache/work/skia'):@@@", 249 "@@@STEP_LOG_LINE@python.inline@ for f in files:@@@", 250 "@@@STEP_LOG_LINE@python.inline@ if f.endswith('.fp'):@@@", 251 "@@@STEP_LOG_LINE@python.inline@ path = os.path.join(r, f)@@@", 252 "@@@STEP_LOG_LINE@python.inline@ print 'touch %s' % path@@@", 253 "@@@STEP_LOG_LINE@python.inline@ subprocess.check_call(['touch', path])@@@", 254 "@@@STEP_LOG_END@python.inline@@@" 255 ] 256 }, 257 { 258 "cmd": [ 259 "vpython", 260 "-u", 261 "RECIPE_MODULE[recipe_engine::file]/resources/fileutil.py", 262 "--json-output", 263 "/path/to/tmp/json", 264 "copy", 265 "[START_DIR]/cache/work/skia/infra/bots/assets/clang_linux/VERSION", 266 "/path/to/tmp/" 267 ], 268 "cwd": "[START_DIR]/cache/work/skia", 269 "infra_step": true, 270 "name": "Get clang_linux VERSION", 271 "~followup_annotations": [ 272 "@@@STEP_LOG_LINE@VERSION@42@@@", 273 "@@@STEP_LOG_END@VERSION@@@" 274 ] 275 }, 276 { 277 "cmd": [ 278 "python", 279 "-u", 280 "[START_DIR]/cache/work/skia/bin/fetch-gn" 281 ], 282 "cwd": "[START_DIR]/cache/work/skia", 283 "env": { 284 "CHROME_HEADLESS": "1", 285 "PATH": "<PATH>:RECIPE_REPO[depot_tools]" 286 }, 287 "infra_step": true, 288 "name": "fetch-gn (2)" 289 }, 290 { 291 "cmd": [ 292 "python", 293 "-u", 294 "[START_DIR]/cache/work/skia/bin/fetch-clang-format" 295 ], 296 "cwd": "[START_DIR]/cache/work/skia", 297 "env": { 298 "CHROME_HEADLESS": "1", 299 "PATH": "<PATH>:RECIPE_REPO[depot_tools]" 300 }, 301 "infra_step": true, 302 "name": "fetch-clang-format" 303 }, 304 { 305 "cmd": [ 306 "[START_DIR]/ccache_linux/bin/ccache", 307 "-s" 308 ], 309 "cwd": "[START_DIR]/cache/work/skia", 310 "env": { 311 "CCACHE_COMPILERCHECK": "content", 312 "CCACHE_DIR": "[START_DIR]/cache/ccache", 313 "CCACHE_MAXFILES": "0", 314 "CCACHE_MAXSIZE": "75G", 315 "CHROME_HEADLESS": "1", 316 "PATH": "[START_DIR]/cache/work/skia/bin:<PATH>:RECIPE_REPO[depot_tools]" 317 }, 318 "name": "ccache stats-start" 319 }, 320 { 321 "cmd": [ 322 "[START_DIR]/cache/work/skia/bin/gn", 323 "gen", 324 "[START_DIR]/build/out/Release", 325 "--args=cc=\"[START_DIR]/clang_linux/bin/clang\" cc_wrapper=\"[START_DIR]/ccache_linux/bin/ccache\" cxx=\"[START_DIR]/clang_linux/bin/clang++\" extra_cflags=[\"-B[START_DIR]/clang_linux/bin\", \"-DDUMMY_clang_linux_version=42\"] extra_ldflags=[\"-B[START_DIR]/clang_linux/bin\", \"-fuse-ld=lld\", \"-L[START_DIR]/clang_linux/lib\"] is_debug=false skia_compile_processors=true skia_generate_workarounds=true werror=true" 326 ], 327 "cwd": "[START_DIR]/cache/work/skia", 328 "env": { 329 "CCACHE_COMPILERCHECK": "content", 330 "CCACHE_DIR": "[START_DIR]/cache/ccache", 331 "CCACHE_MAXFILES": "0", 332 "CCACHE_MAXSIZE": "75G", 333 "CHROME_HEADLESS": "1", 334 "PATH": "[START_DIR]/cache/work/skia/bin:<PATH>:RECIPE_REPO[depot_tools]" 335 }, 336 "name": "gn gen" 337 }, 338 { 339 "cmd": [ 340 "ninja", 341 "-C", 342 "[START_DIR]/build/out/Release" 343 ], 344 "cwd": "[START_DIR]/cache/work/skia", 345 "env": { 346 "CCACHE_COMPILERCHECK": "content", 347 "CCACHE_DIR": "[START_DIR]/cache/ccache", 348 "CCACHE_MAXFILES": "0", 349 "CCACHE_MAXSIZE": "75G", 350 "CHROME_HEADLESS": "1", 351 "PATH": "[START_DIR]/cache/work/skia/bin:<PATH>:RECIPE_REPO[depot_tools]" 352 }, 353 "name": "ninja" 354 }, 355 { 356 "cmd": [ 357 "[START_DIR]/ccache_linux/bin/ccache", 358 "-s" 359 ], 360 "cwd": "[START_DIR]/cache/work/skia", 361 "env": { 362 "CCACHE_COMPILERCHECK": "content", 363 "CCACHE_DIR": "[START_DIR]/cache/ccache", 364 "CCACHE_MAXFILES": "0", 365 "CCACHE_MAXSIZE": "75G", 366 "CHROME_HEADLESS": "1", 367 "PATH": "[START_DIR]/cache/work/skia/bin:<PATH>:RECIPE_REPO[depot_tools]" 368 }, 369 "name": "ccache stats-end" 370 }, 371 { 372 "cmd": [ 373 "git", 374 "diff", 375 "--no-ext-diff" 376 ], 377 "cwd": "[START_DIR]/cache/work/skia", 378 "env": { 379 "CHROME_HEADLESS": "1", 380 "PATH": "<PATH>:RECIPE_REPO[depot_tools]" 381 }, 382 "name": "git diff #2" 383 }, 384 { 385 "cmd": [ 386 "python", 387 "-u", 388 "\ndiff1 = ''''''\n\ndiff2 = ''''''\n\nif diff1 != diff2:\n print 'Generated files have been edited!'\n exit(1)\n" 389 ], 390 "cwd": "[START_DIR]/cache/work/skia", 391 "env": { 392 "CHROME_HEADLESS": "1", 393 "PATH": "<PATH>:RECIPE_REPO[depot_tools]" 394 }, 395 "name": "compare diffs", 396 "~followup_annotations": [ 397 "@@@STEP_LOG_LINE@python.inline@@@@", 398 "@@@STEP_LOG_LINE@python.inline@diff1 = ''''''@@@", 399 "@@@STEP_LOG_LINE@python.inline@@@@", 400 "@@@STEP_LOG_LINE@python.inline@diff2 = ''''''@@@", 401 "@@@STEP_LOG_LINE@python.inline@@@@", 402 "@@@STEP_LOG_LINE@python.inline@if diff1 != diff2:@@@", 403 "@@@STEP_LOG_LINE@python.inline@ print 'Generated files have been edited!'@@@", 404 "@@@STEP_LOG_LINE@python.inline@ exit(1)@@@", 405 "@@@STEP_LOG_END@python.inline@@@" 406 ] 407 }, 408 { 409 "name": "$result" 410 } 411]