• Home
  • Line#
  • Scopes#
  • Navigate#
  • Raw
  • Download
1[
2  {
3    "cmd": [],
4    "name": "Docker setup"
5  },
6  {
7    "cmd": [
8      "python",
9      "-u",
10      "import os\nprint('%d:%d' % (os.getuid(), os.getgid()))\n"
11    ],
12    "name": "Docker setup.Get uid and gid",
13    "~followup_annotations": [
14      "@@@STEP_NEST_LEVEL@1@@@",
15      "@@@STEP_LOG_LINE@python.inline@import os@@@",
16      "@@@STEP_LOG_LINE@python.inline@print('%d:%d' % (os.getuid(), os.getgid()))@@@",
17      "@@@STEP_LOG_END@python.inline@@@"
18    ]
19  },
20  {
21    "cmd": [
22      "vpython",
23      "-u",
24      "RECIPE_MODULE[recipe_engine::file]/resources/fileutil.py",
25      "--json-output",
26      "/path/to/tmp/json",
27      "ensure-directory",
28      "--mode",
29      "0777",
30      "[START_DIR]/cache/work/skia/out/Build-Debian10-GCC-x86-Debug-Docker/Debug"
31    ],
32    "infra_step": true,
33    "name": "Docker setup.mkdirs out_dir",
34    "~followup_annotations": [
35      "@@@STEP_NEST_LEVEL@1@@@"
36    ]
37  },
38  {
39    "cmd": [
40      "chmod",
41      "777",
42      "[START_DIR]/cache/work/skia/out/Build-Debian10-GCC-x86-Debug-Docker/Debug"
43    ],
44    "infra_step": true,
45    "name": "Docker setup.chmod 777 [START_DIR]/cache/work/skia/out/Build-Debian10-GCC-x86-Debug-Docker/Debug",
46    "~followup_annotations": [
47      "@@@STEP_NEST_LEVEL@1@@@"
48    ]
49  },
50  {
51    "cmd": [
52      "chmod",
53      "755",
54      "[START_DIR]/cache/work"
55    ],
56    "infra_step": true,
57    "name": "Docker setup.chmod 755 [START_DIR]/cache/work",
58    "~followup_annotations": [
59      "@@@STEP_NEST_LEVEL@1@@@"
60    ]
61  },
62  {
63    "cmd": [
64      "chmod",
65      "0755",
66      "RECIPE_MODULE[skia::build]/resources/docker-compile.sh"
67    ],
68    "infra_step": true,
69    "name": "Docker setup.chmod 0755 RECIPE_MODULE[skia::build]/resources/docker-compile.sh",
70    "~followup_annotations": [
71      "@@@STEP_NEST_LEVEL@1@@@"
72    ]
73  },
74  {
75    "cmd": [
76      "docker",
77      "run",
78      "--shm-size=2gb",
79      "--rm",
80      "--user",
81      "13:17",
82      "--mount",
83      "type=bind,source=[START_DIR]/cache/work,target=/SRC",
84      "--mount",
85      "type=bind,source=[START_DIR]/cache/work/skia/out/Build-Debian10-GCC-x86-Debug-Docker/Debug,target=/OUT",
86      "gcr.io/skia-public/gcc-debian10-x86@sha256:b1ec55403ac66d9500d033d6ffd7663894d32335711fbbb0fb4c67dfce812203",
87      "/SRC/../RECIPE_MODULE[skia::build]/resources/docker-compile.sh",
88      "cc=\"gcc\" cxx=\"g++\" extra_cflags=[\"-O1\",\"-g1\",\"-DREBUILD_IF_CHANGED_docker_image=gcr.io/skia-public/gcc-debian10-x86@sha256:b1ec55403ac66d9500d033d6ffd7663894d32335711fbbb0fb4c67dfce812203\"] extra_ldflags=[] target_cpu=\"x86\" werror=true"
89    ],
90    "env": {
91      "CHROME_HEADLESS": "1",
92      "DOCKER_CONFIG": "/home/chrome-bot/.docker",
93      "PATH": "<PATH>:RECIPE_REPO[depot_tools]"
94    },
95    "name": "Run build script in Docker"
96  },
97  {
98    "cmd": [
99      "python",
100      "-u",
101      "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', 'nanobench', 'nanobench.exe', 'skpbench', 'skpbench.exe', '*.so', '*.dll', '*.dylib', 'skia_launcher', 'skottie_tool', 'lib/*.so', 'run_testlab']\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",
102      "[START_DIR]/cache/work/skia/out/Build-Debian10-GCC-x86-Debug-Docker/Debug",
103      "[START_DIR]/[SWARM_OUT_DIR]/out/Debug"
104    ],
105    "infra_step": true,
106    "name": "copy build products",
107    "~followup_annotations": [
108      "@@@STEP_LOG_LINE@python.inline@import errno@@@",
109      "@@@STEP_LOG_LINE@python.inline@import glob@@@",
110      "@@@STEP_LOG_LINE@python.inline@import os@@@",
111      "@@@STEP_LOG_LINE@python.inline@import shutil@@@",
112      "@@@STEP_LOG_LINE@python.inline@import sys@@@",
113      "@@@STEP_LOG_LINE@python.inline@@@@",
114      "@@@STEP_LOG_LINE@python.inline@src = sys.argv[1]@@@",
115      "@@@STEP_LOG_LINE@python.inline@dst = sys.argv[2]@@@",
116      "@@@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', 'nanobench', 'nanobench.exe', 'skpbench', 'skpbench.exe', '*.so', '*.dll', '*.dylib', 'skia_launcher', 'skottie_tool', 'lib/*.so', 'run_testlab']@@@",
117      "@@@STEP_LOG_LINE@python.inline@@@@",
118      "@@@STEP_LOG_LINE@python.inline@try:@@@",
119      "@@@STEP_LOG_LINE@python.inline@  os.makedirs(dst)@@@",
120      "@@@STEP_LOG_LINE@python.inline@except OSError as e:@@@",
121      "@@@STEP_LOG_LINE@python.inline@  if e.errno != errno.EEXIST:@@@",
122      "@@@STEP_LOG_LINE@python.inline@    raise@@@",
123      "@@@STEP_LOG_LINE@python.inline@@@@",
124      "@@@STEP_LOG_LINE@python.inline@for pattern in build_products:@@@",
125      "@@@STEP_LOG_LINE@python.inline@  path = os.path.join(src, pattern)@@@",
126      "@@@STEP_LOG_LINE@python.inline@  for f in glob.glob(path):@@@",
127      "@@@STEP_LOG_LINE@python.inline@    dst_path = os.path.join(dst, os.path.relpath(f, src))@@@",
128      "@@@STEP_LOG_LINE@python.inline@    if not os.path.isdir(os.path.dirname(dst_path)):@@@",
129      "@@@STEP_LOG_LINE@python.inline@      os.makedirs(os.path.dirname(dst_path))@@@",
130      "@@@STEP_LOG_LINE@python.inline@    print('Copying build product %s to %s' % (f, dst_path))@@@",
131      "@@@STEP_LOG_LINE@python.inline@    shutil.move(f, dst_path)@@@",
132      "@@@STEP_LOG_END@python.inline@@@"
133    ]
134  },
135  {
136    "name": "$result"
137  }
138]