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": { 77 "GIT_HTTP_LOW_SPEED_LIMIT": "102400", 78 "GIT_HTTP_LOW_SPEED_TIME": "1800" 79 }, 80 "env_suffixes": { 81 "DEPOT_TOOLS_UPDATE": [ 82 "0" 83 ], 84 "PATH": [ 85 "RECIPE_REPO[depot_tools]" 86 ] 87 }, 88 "infra_step": true, 89 "name": "bot_update", 90 "~followup_annotations": [ 91 "@@@STEP_TEXT@Some step text@@@", 92 "@@@STEP_LOG_LINE@json.output@{@@@", 93 "@@@STEP_LOG_LINE@json.output@ \"did_run\": true, @@@", 94 "@@@STEP_LOG_LINE@json.output@ \"fixed_revisions\": {@@@", 95 "@@@STEP_LOG_LINE@json.output@ \"skia\": \"abc123\"@@@", 96 "@@@STEP_LOG_LINE@json.output@ }, @@@", 97 "@@@STEP_LOG_LINE@json.output@ \"manifest\": {@@@", 98 "@@@STEP_LOG_LINE@json.output@ \"skia\": {@@@", 99 "@@@STEP_LOG_LINE@json.output@ \"repository\": \"https://fake.org/skia.git\", @@@", 100 "@@@STEP_LOG_LINE@json.output@ \"revision\": \"abc123\"@@@", 101 "@@@STEP_LOG_LINE@json.output@ }@@@", 102 "@@@STEP_LOG_LINE@json.output@ }, @@@", 103 "@@@STEP_LOG_LINE@json.output@ \"patch_failure\": false, @@@", 104 "@@@STEP_LOG_LINE@json.output@ \"patch_root\": \"skia\", @@@", 105 "@@@STEP_LOG_LINE@json.output@ \"properties\": {@@@", 106 "@@@STEP_LOG_LINE@json.output@ \"got_revision\": \"abc123\", @@@", 107 "@@@STEP_LOG_LINE@json.output@ \"got_revision_cp\": \"refs/heads/master@{#164710}\"@@@", 108 "@@@STEP_LOG_LINE@json.output@ }, @@@", 109 "@@@STEP_LOG_LINE@json.output@ \"root\": \"skia\", @@@", 110 "@@@STEP_LOG_LINE@json.output@ \"source_manifest\": {@@@", 111 "@@@STEP_LOG_LINE@json.output@ \"directories\": {@@@", 112 "@@@STEP_LOG_LINE@json.output@ \"skia\": {@@@", 113 "@@@STEP_LOG_LINE@json.output@ \"git_checkout\": {@@@", 114 "@@@STEP_LOG_LINE@json.output@ \"repo_url\": \"https://fake.org/skia.git\", @@@", 115 "@@@STEP_LOG_LINE@json.output@ \"revision\": \"abc123\"@@@", 116 "@@@STEP_LOG_LINE@json.output@ }@@@", 117 "@@@STEP_LOG_LINE@json.output@ }@@@", 118 "@@@STEP_LOG_LINE@json.output@ }, @@@", 119 "@@@STEP_LOG_LINE@json.output@ \"version\": 0@@@", 120 "@@@STEP_LOG_LINE@json.output@ }, @@@", 121 "@@@STEP_LOG_LINE@json.output@ \"step_text\": \"Some step text\"@@@", 122 "@@@STEP_LOG_LINE@json.output@}@@@", 123 "@@@STEP_LOG_END@json.output@@@", 124 "@@@SET_BUILD_PROPERTY@got_revision@\"abc123\"@@@", 125 "@@@SET_BUILD_PROPERTY@got_revision_cp@\"refs/heads/master@{#164710}\"@@@" 126 ] 127 }, 128 { 129 "cmd": [ 130 "vpython", 131 "-u", 132 "RECIPE_MODULE[recipe_engine::file]/resources/fileutil.py", 133 "--json-output", 134 "/path/to/tmp/json", 135 "ensure-directory", 136 "--mode", 137 "0777", 138 "[START_DIR]/tmp" 139 ], 140 "infra_step": true, 141 "name": "makedirs tmp_dir" 142 }, 143 { 144 "cmd": [ 145 "git", 146 "diff", 147 "--no-ext-diff" 148 ], 149 "cwd": "[START_DIR]/cache/work/skia", 150 "env": { 151 "CHROME_HEADLESS": "1", 152 "PATH": "<PATH>:RECIPE_REPO[depot_tools]" 153 }, 154 "name": "git diff #1" 155 }, 156 { 157 "cmd": [ 158 "make", 159 "-C", 160 "tools/gpu/gl/interface", 161 "generate" 162 ], 163 "cwd": "[START_DIR]/cache/work/skia", 164 "env": { 165 "GOCACHE": "[START_DIR]/cache/go_cache", 166 "GOPATH": "[START_DIR]/cache/gopath", 167 "GOROOT": "[START_DIR]/go/go", 168 "PATH": "[START_DIR]/go/go/bin:[START_DIR]/cache/gopath/bin:<PATH>" 169 }, 170 "name": "generate gl interfaces" 171 }, 172 { 173 "cmd": [ 174 "python", 175 "-u", 176 "import os\nimport subprocess\n\nfor r, d, files in os.walk(os.path.join('[START_DIR]/cache/work/skia', 'src')):\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" 177 ], 178 "cwd": "[START_DIR]/cache/work/skia", 179 "env": { 180 "CHROME_HEADLESS": "1", 181 "PATH": "<PATH>:RECIPE_REPO[depot_tools]" 182 }, 183 "name": "touch fp files", 184 "~followup_annotations": [ 185 "@@@STEP_LOG_LINE@python.inline@import os@@@", 186 "@@@STEP_LOG_LINE@python.inline@import subprocess@@@", 187 "@@@STEP_LOG_LINE@python.inline@@@@", 188 "@@@STEP_LOG_LINE@python.inline@for r, d, files in os.walk(os.path.join('[START_DIR]/cache/work/skia', 'src')):@@@", 189 "@@@STEP_LOG_LINE@python.inline@ for f in files:@@@", 190 "@@@STEP_LOG_LINE@python.inline@ if f.endswith('.fp'):@@@", 191 "@@@STEP_LOG_LINE@python.inline@ path = os.path.join(r, f)@@@", 192 "@@@STEP_LOG_LINE@python.inline@ print 'touch %s' % path@@@", 193 "@@@STEP_LOG_LINE@python.inline@ subprocess.check_call(['touch', path])@@@", 194 "@@@STEP_LOG_END@python.inline@@@" 195 ] 196 }, 197 { 198 "cmd": [ 199 "vpython", 200 "-u", 201 "RECIPE_MODULE[recipe_engine::file]/resources/fileutil.py", 202 "--json-output", 203 "/path/to/tmp/json", 204 "copy", 205 "[START_DIR]/cache/work/skia/infra/bots/assets/clang_linux/VERSION", 206 "/path/to/tmp/" 207 ], 208 "cwd": "[START_DIR]/cache/work/skia", 209 "infra_step": true, 210 "name": "Get clang_linux VERSION", 211 "~followup_annotations": [ 212 "@@@STEP_LOG_LINE@VERSION@42@@@", 213 "@@@STEP_LOG_END@VERSION@@@" 214 ] 215 }, 216 { 217 "cmd": [ 218 "python", 219 "-u", 220 "[START_DIR]/cache/work/skia/bin/fetch-gn" 221 ], 222 "cwd": "[START_DIR]/cache/work/skia", 223 "env": { 224 "CHROME_HEADLESS": "1", 225 "PATH": "<PATH>:RECIPE_REPO[depot_tools]" 226 }, 227 "infra_step": true, 228 "name": "fetch-gn" 229 }, 230 { 231 "cmd": [ 232 "python", 233 "-u", 234 "[START_DIR]/cache/work/skia/bin/fetch-clang-format" 235 ], 236 "cwd": "[START_DIR]/cache/work/skia", 237 "env": { 238 "CHROME_HEADLESS": "1", 239 "PATH": "<PATH>:RECIPE_REPO[depot_tools]" 240 }, 241 "infra_step": true, 242 "name": "fetch-clang-format" 243 }, 244 { 245 "cmd": [ 246 "[START_DIR]/ccache_linux/bin/ccache", 247 "-s" 248 ], 249 "cwd": "[START_DIR]/cache/work/skia", 250 "env": { 251 "CCACHE_COMPILERCHECK": "content", 252 "CCACHE_DIR": "[START_DIR]/cache/ccache", 253 "CCACHE_MAXFILES": "0", 254 "CCACHE_MAXSIZE": "75G", 255 "CHROME_HEADLESS": "1", 256 "PATH": "[START_DIR]/cache/work/skia/bin:<PATH>:RECIPE_REPO[depot_tools]" 257 }, 258 "name": "ccache stats-start" 259 }, 260 { 261 "cmd": [ 262 "[START_DIR]/cache/work/skia/bin/gn", 263 "gen", 264 "[START_DIR]/build/out/Release", 265 "--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\", \"-DPLACEHOLDER_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_compile_sksl_tests=true skia_generate_workarounds=true werror=true" 266 ], 267 "cwd": "[START_DIR]/cache/work/skia", 268 "env": { 269 "CCACHE_COMPILERCHECK": "content", 270 "CCACHE_DIR": "[START_DIR]/cache/ccache", 271 "CCACHE_MAXFILES": "0", 272 "CCACHE_MAXSIZE": "75G", 273 "CHROME_HEADLESS": "1", 274 "PATH": "[START_DIR]/cache/work/skia/bin:<PATH>:RECIPE_REPO[depot_tools]" 275 }, 276 "name": "gn gen" 277 }, 278 { 279 "cmd": [ 280 "ninja", 281 "-C", 282 "[START_DIR]/build/out/Release" 283 ], 284 "cwd": "[START_DIR]/cache/work/skia", 285 "env": { 286 "CCACHE_COMPILERCHECK": "content", 287 "CCACHE_DIR": "[START_DIR]/cache/ccache", 288 "CCACHE_MAXFILES": "0", 289 "CCACHE_MAXSIZE": "75G", 290 "CHROME_HEADLESS": "1", 291 "PATH": "[START_DIR]/cache/work/skia/bin:<PATH>:RECIPE_REPO[depot_tools]" 292 }, 293 "name": "ninja" 294 }, 295 { 296 "cmd": [ 297 "[START_DIR]/ccache_linux/bin/ccache", 298 "-s" 299 ], 300 "cwd": "[START_DIR]/cache/work/skia", 301 "env": { 302 "CCACHE_COMPILERCHECK": "content", 303 "CCACHE_DIR": "[START_DIR]/cache/ccache", 304 "CCACHE_MAXFILES": "0", 305 "CCACHE_MAXSIZE": "75G", 306 "CHROME_HEADLESS": "1", 307 "PATH": "[START_DIR]/cache/work/skia/bin:<PATH>:RECIPE_REPO[depot_tools]" 308 }, 309 "name": "ccache stats-end" 310 }, 311 { 312 "cmd": [ 313 "git", 314 "diff", 315 "--no-ext-diff" 316 ], 317 "cwd": "[START_DIR]/cache/work/skia", 318 "env": { 319 "CHROME_HEADLESS": "1", 320 "PATH": "<PATH>:RECIPE_REPO[depot_tools]" 321 }, 322 "name": "git diff #2" 323 }, 324 { 325 "cmd": [ 326 "python", 327 "-u", 328 "\ndiff1 = ''''''\n\ndiff2 = ''''''\n\nif diff1 != diff2:\n print 'Generated files have been edited!'\n exit(1)\n" 329 ], 330 "cwd": "[START_DIR]/cache/work/skia", 331 "env": { 332 "CHROME_HEADLESS": "1", 333 "PATH": "<PATH>:RECIPE_REPO[depot_tools]" 334 }, 335 "name": "compare diffs", 336 "~followup_annotations": [ 337 "@@@STEP_LOG_LINE@python.inline@@@@", 338 "@@@STEP_LOG_LINE@python.inline@diff1 = ''''''@@@", 339 "@@@STEP_LOG_LINE@python.inline@@@@", 340 "@@@STEP_LOG_LINE@python.inline@diff2 = ''''''@@@", 341 "@@@STEP_LOG_LINE@python.inline@@@@", 342 "@@@STEP_LOG_LINE@python.inline@if diff1 != diff2:@@@", 343 "@@@STEP_LOG_LINE@python.inline@ print 'Generated files have been edited!'@@@", 344 "@@@STEP_LOG_LINE@python.inline@ exit(1)@@@", 345 "@@@STEP_LOG_END@python.inline@@@" 346 ] 347 }, 348 { 349 "name": "$result" 350 } 351]