1[
2  {
3    "cmd": [
4      "vpython",
5      "-u",
6      "RECIPE_MODULE[recipe_engine::file]/resources/fileutil.py",
7      "--json-output",
8      "/path/to/tmp/json",
9      "copy",
10      "[START_DIR]/cache/work/skia/infra/bots/assets/clang_linux/VERSION",
11      "/path/to/tmp/"
12    ],
13    "infra_step": true,
14    "name": "Get clang_linux VERSION",
15    "~followup_annotations": [
16      "@@@STEP_LOG_LINE@VERSION@42@@@",
17      "@@@STEP_LOG_END@VERSION@@@"
18    ]
19  },
20  {
21    "cmd": [
22      "python",
23      "-u",
24      "[START_DIR]/cache/work/skia/bin/fetch-gn"
25    ],
26    "cwd": "[START_DIR]/cache/work/skia",
27    "env": {
28      "CHROME_HEADLESS": "1",
29      "PATH": "<PATH>:RECIPE_REPO[depot_tools]"
30    },
31    "infra_step": true,
32    "name": "fetch-gn"
33  },
34  {
35    "cmd": [
36      "[START_DIR]/cache/work/skia/bin/gn",
37      "gen",
38      "[START_DIR]/cache/work/skia/out/Build-Debian10-Clang-x86_64-Debug-Tidy/Debug",
39      "--args=cc=\"[START_DIR]/clang_linux/bin/clang\" cxx=\"[START_DIR]/cache/work/skia/tools/clang-tidy.sh\" extra_cflags=[\"-B[START_DIR]/clang_linux/bin\", \"-DPLACEHOLDER_clang_linux_version=42\", \"-O1\"] extra_ldflags=[\"-B[START_DIR]/clang_linux/bin\", \"-fuse-ld=lld\", \"-L[START_DIR]/clang_linux/lib\"] skia_enable_fontmgr_empty=true skia_enable_pdf=true skia_use_expat=true skia_use_freetype=true skia_use_vulkan=true target_cpu=\"x86_64\" werror=true"
40    ],
41    "cwd": "[START_DIR]/cache/work/skia",
42    "env": {
43      "CHROME_HEADLESS": "1",
44      "PATH": "[START_DIR]/clang_linux/bin:<PATH>:RECIPE_REPO[depot_tools]"
45    },
46    "name": "gn gen"
47  },
48  {
49    "cmd": [
50      "ninja",
51      "-C",
52      "[START_DIR]/cache/work/skia/out/Build-Debian10-Clang-x86_64-Debug-Tidy/Debug"
53    ],
54    "cwd": "[START_DIR]/cache/work/skia",
55    "env": {
56      "CHROME_HEADLESS": "1",
57      "PATH": "[START_DIR]/clang_linux/bin:<PATH>:RECIPE_REPO[depot_tools]"
58    },
59    "name": "ninja"
60  },
61  {
62    "cmd": [
63      "python",
64      "-u",
65      "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",
66      "[START_DIR]/cache/work/skia/out/Build-Debian10-Clang-x86_64-Debug-Tidy/Debug",
67      "[START_DIR]/[SWARM_OUT_DIR]/out/Debug"
68    ],
69    "infra_step": true,
70    "name": "copy build products",
71    "~followup_annotations": [
72      "@@@STEP_LOG_LINE@python.inline@import errno@@@",
73      "@@@STEP_LOG_LINE@python.inline@import glob@@@",
74      "@@@STEP_LOG_LINE@python.inline@import os@@@",
75      "@@@STEP_LOG_LINE@python.inline@import shutil@@@",
76      "@@@STEP_LOG_LINE@python.inline@import sys@@@",
77      "@@@STEP_LOG_LINE@python.inline@@@@",
78      "@@@STEP_LOG_LINE@python.inline@src = sys.argv[1]@@@",
79      "@@@STEP_LOG_LINE@python.inline@dst = sys.argv[2]@@@",
80      "@@@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']@@@",
81      "@@@STEP_LOG_LINE@python.inline@@@@",
82      "@@@STEP_LOG_LINE@python.inline@try:@@@",
83      "@@@STEP_LOG_LINE@python.inline@  os.makedirs(dst)@@@",
84      "@@@STEP_LOG_LINE@python.inline@except OSError as e:@@@",
85      "@@@STEP_LOG_LINE@python.inline@  if e.errno != errno.EEXIST:@@@",
86      "@@@STEP_LOG_LINE@python.inline@    raise@@@",
87      "@@@STEP_LOG_LINE@python.inline@@@@",
88      "@@@STEP_LOG_LINE@python.inline@for pattern in build_products:@@@",
89      "@@@STEP_LOG_LINE@python.inline@  path = os.path.join(src, pattern)@@@",
90      "@@@STEP_LOG_LINE@python.inline@  for f in glob.glob(path):@@@",
91      "@@@STEP_LOG_LINE@python.inline@    dst_path = os.path.join(dst, os.path.relpath(f, src))@@@",
92      "@@@STEP_LOG_LINE@python.inline@    if not os.path.isdir(os.path.dirname(dst_path)):@@@",
93      "@@@STEP_LOG_LINE@python.inline@      os.makedirs(os.path.dirname(dst_path))@@@",
94      "@@@STEP_LOG_LINE@python.inline@    print 'Copying build product %s to %s' % (f, dst_path)@@@",
95      "@@@STEP_LOG_LINE@python.inline@    shutil.move(f, dst_path)@@@",
96      "@@@STEP_LOG_END@python.inline@@@"
97    ]
98  },
99  {
100    "name": "$result"
101  }
102]