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 "python", 30 "-u", 31 "RECIPE_MODULE[depot_tools::git]\\resources\\git_setup.py", 32 "--path", 33 "[START_DIR]\\skia", 34 "--url", 35 "https://skia.googlesource.com/skia.git" 36 ], 37 "name": "git setup" 38 }, 39 { 40 "cmd": [ 41 "git", 42 "fetch", 43 "origin", 44 "abc123", 45 "--progress" 46 ], 47 "cwd": "[START_DIR]\\skia", 48 "env": { 49 "PATH": "RECIPE_REPO[depot_tools];<PATH>" 50 }, 51 "infra_step": true, 52 "name": "git fetch" 53 }, 54 { 55 "cmd": [ 56 "git", 57 "checkout", 58 "-f", 59 "FETCH_HEAD" 60 ], 61 "cwd": "[START_DIR]\\skia", 62 "infra_step": true, 63 "name": "git checkout" 64 }, 65 { 66 "cmd": [ 67 "git", 68 "rev-parse", 69 "HEAD" 70 ], 71 "cwd": "[START_DIR]\\skia", 72 "infra_step": true, 73 "name": "read revision", 74 "~followup_annotations": [ 75 "@@@STEP_TEXT@<br/>checked out 'deadbeef'<br/>@@@" 76 ] 77 }, 78 { 79 "cmd": [ 80 "git", 81 "clean", 82 "-f", 83 "-d", 84 "-x" 85 ], 86 "cwd": "[START_DIR]\\skia", 87 "infra_step": true, 88 "name": "git clean" 89 }, 90 { 91 "cmd": [ 92 "vpython", 93 "-u", 94 "RECIPE_MODULE[recipe_engine::file]\\resources\\fileutil.py", 95 "--json-output", 96 "/path/to/tmp/json", 97 "ensure-directory", 98 "--mode", 99 "0777", 100 "[START_DIR]\\tmp" 101 ], 102 "infra_step": true, 103 "name": "makedirs tmp_dir" 104 }, 105 { 106 "cmd": [ 107 "vpython", 108 "-u", 109 "RECIPE_MODULE[recipe_engine::file]\\resources\\fileutil.py", 110 "--json-output", 111 "/path/to/tmp/json", 112 "copy", 113 "[START_DIR]\\skia\\infra\\bots\\assets\\clang_win\\VERSION", 114 "/path/to/tmp/" 115 ], 116 "infra_step": true, 117 "name": "Get clang_win VERSION", 118 "~followup_annotations": [ 119 "@@@STEP_LOG_LINE@VERSION@42@@@", 120 "@@@STEP_LOG_END@VERSION@@@" 121 ] 122 }, 123 { 124 "cmd": [ 125 "python", 126 "-u", 127 "[START_DIR]\\skia\\bin\\fetch-gn" 128 ], 129 "cwd": "[START_DIR]\\skia", 130 "env": { 131 "CHROME_HEADLESS": "1", 132 "PATH": "<PATH>;RECIPE_REPO[depot_tools]" 133 }, 134 "infra_step": true, 135 "name": "fetch-gn" 136 }, 137 { 138 "cmd": [ 139 "[START_DIR]\\skia\\bin\\gn", 140 "gen", 141 "[START_DIR]\\skia\\out\\Build-Win10-Clang-x86_64-Release-NoDEPS\\Release_x64", 142 "--args=cc=\"clang\" clang_win=\"[START_DIR]\\clang_win\" cxx=\"clang++\" extra_cflags=[\"-DPLACEHOLDER_clang_win_version=42\"] is_debug=false is_official_build=true skia_enable_fontmgr_empty=true skia_enable_gpu=true skia_enable_pdf=false skia_use_expat=false skia_use_freetype=false skia_use_harfbuzz=false skia_use_libjpeg_turbo_decode=false skia_use_libjpeg_turbo_encode=false skia_use_libpng_decode=false skia_use_libpng_encode=false skia_use_libwebp_decode=false skia_use_libwebp_encode=false skia_use_vulkan=false skia_use_zlib=false target_cpu=\"x86_64\" werror=true win_sdk=\"[START_DIR]\\win_toolchain/win_sdk\" win_vc=\"[START_DIR]\\win_toolchain/VC\"" 143 ], 144 "cwd": "[START_DIR]\\skia", 145 "env": { 146 "CHROME_HEADLESS": "1", 147 "PATH": "<PATH>;RECIPE_REPO[depot_tools]" 148 }, 149 "name": "gn gen" 150 }, 151 { 152 "cmd": [ 153 "ninja", 154 "-C", 155 "[START_DIR]\\skia\\out\\Build-Win10-Clang-x86_64-Release-NoDEPS\\Release_x64" 156 ], 157 "cwd": "[START_DIR]\\skia", 158 "env": { 159 "CHROME_HEADLESS": "1", 160 "PATH": "<PATH>;RECIPE_REPO[depot_tools]" 161 }, 162 "name": "ninja" 163 }, 164 { 165 "cmd": [ 166 "python", 167 "-u", 168 "import errno\nimport glob\nimport os\nimport shutil\nimport sys\n\nsrc = sys.argv[1]\ndst = sys.argv[2]\nbuild_products = ['dm', 'dm.exe', 'dm.app', 'fm', 'fm.exe', 'nanobench.app', 'get_images_from_skps', 'get_images_from_skps.exe', 'hello-opencl', 'hello-opencl.exe', 'nanobench', 'nanobench.exe', 'skpbench', 'skpbench.exe', '*.so', '*.dll', '*.dylib', 'skia_launcher', 'skottie_tool', 'lib/*.so', 'run_testlab', 'skqp-universal-debug.apk']\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", 169 "[START_DIR]\\skia\\out\\Build-Win10-Clang-x86_64-Release-NoDEPS\\Release_x64", 170 "[START_DIR]\\[SWARM_OUT_DIR]" 171 ], 172 "infra_step": true, 173 "name": "copy build products", 174 "~followup_annotations": [ 175 "@@@STEP_LOG_LINE@python.inline@import errno@@@", 176 "@@@STEP_LOG_LINE@python.inline@import glob@@@", 177 "@@@STEP_LOG_LINE@python.inline@import os@@@", 178 "@@@STEP_LOG_LINE@python.inline@import shutil@@@", 179 "@@@STEP_LOG_LINE@python.inline@import sys@@@", 180 "@@@STEP_LOG_LINE@python.inline@@@@", 181 "@@@STEP_LOG_LINE@python.inline@src = sys.argv[1]@@@", 182 "@@@STEP_LOG_LINE@python.inline@dst = sys.argv[2]@@@", 183 "@@@STEP_LOG_LINE@python.inline@build_products = ['dm', 'dm.exe', 'dm.app', 'fm', 'fm.exe', 'nanobench.app', 'get_images_from_skps', 'get_images_from_skps.exe', 'hello-opencl', 'hello-opencl.exe', 'nanobench', 'nanobench.exe', 'skpbench', 'skpbench.exe', '*.so', '*.dll', '*.dylib', 'skia_launcher', 'skottie_tool', 'lib/*.so', 'run_testlab', 'skqp-universal-debug.apk']@@@", 184 "@@@STEP_LOG_LINE@python.inline@@@@", 185 "@@@STEP_LOG_LINE@python.inline@try:@@@", 186 "@@@STEP_LOG_LINE@python.inline@ os.makedirs(dst)@@@", 187 "@@@STEP_LOG_LINE@python.inline@except OSError as e:@@@", 188 "@@@STEP_LOG_LINE@python.inline@ if e.errno != errno.EEXIST:@@@", 189 "@@@STEP_LOG_LINE@python.inline@ raise@@@", 190 "@@@STEP_LOG_LINE@python.inline@@@@", 191 "@@@STEP_LOG_LINE@python.inline@for pattern in build_products:@@@", 192 "@@@STEP_LOG_LINE@python.inline@ path = os.path.join(src, pattern)@@@", 193 "@@@STEP_LOG_LINE@python.inline@ for f in glob.glob(path):@@@", 194 "@@@STEP_LOG_LINE@python.inline@ dst_path = os.path.join(dst, os.path.relpath(f, src))@@@", 195 "@@@STEP_LOG_LINE@python.inline@ if not os.path.isdir(os.path.dirname(dst_path)):@@@", 196 "@@@STEP_LOG_LINE@python.inline@ os.makedirs(os.path.dirname(dst_path))@@@", 197 "@@@STEP_LOG_LINE@python.inline@ print 'Copying build product %s to %s' % (f, dst_path)@@@", 198 "@@@STEP_LOG_LINE@python.inline@ shutil.move(f, dst_path)@@@", 199 "@@@STEP_LOG_END@python.inline@@@" 200 ] 201 }, 202 { 203 "cmd": [ 204 "vpython", 205 "-u", 206 "\n# [VPYTHON:BEGIN]\n# wheel: <\n# name: \"infra/python/wheels/psutil/${vpython_platform}\"\n# version: \"version:5.4.7\"\n# >\n# [VPYTHON:END]\n\nimport psutil\nfor p in psutil.process_iter():\n try:\n if p.name in ('mspdbsrv.exe', 'vctip.exe', 'cl.exe', 'link.exe'):\n p.kill()\n except psutil._error.AccessDenied:\n pass\n" 207 ], 208 "infra_step": true, 209 "name": "cleanup", 210 "~followup_annotations": [ 211 "@@@STEP_LOG_LINE@python.inline@@@@", 212 "@@@STEP_LOG_LINE@python.inline@# [VPYTHON:BEGIN]@@@", 213 "@@@STEP_LOG_LINE@python.inline@# wheel: <@@@", 214 "@@@STEP_LOG_LINE@python.inline@# name: \"infra/python/wheels/psutil/${vpython_platform}\"@@@", 215 "@@@STEP_LOG_LINE@python.inline@# version: \"version:5.4.7\"@@@", 216 "@@@STEP_LOG_LINE@python.inline@# >@@@", 217 "@@@STEP_LOG_LINE@python.inline@# [VPYTHON:END]@@@", 218 "@@@STEP_LOG_LINE@python.inline@@@@", 219 "@@@STEP_LOG_LINE@python.inline@import psutil@@@", 220 "@@@STEP_LOG_LINE@python.inline@for p in psutil.process_iter():@@@", 221 "@@@STEP_LOG_LINE@python.inline@ try:@@@", 222 "@@@STEP_LOG_LINE@python.inline@ if p.name in ('mspdbsrv.exe', 'vctip.exe', 'cl.exe', 'link.exe'):@@@", 223 "@@@STEP_LOG_LINE@python.inline@ p.kill()@@@", 224 "@@@STEP_LOG_LINE@python.inline@ except psutil._error.AccessDenied:@@@", 225 "@@@STEP_LOG_LINE@python.inline@ pass@@@", 226 "@@@STEP_LOG_END@python.inline@@@" 227 ] 228 }, 229 { 230 "name": "$result" 231 } 232]