10 skia_dir = checkout_root.join('skia')
11 out_dir = api.vars.cache_dir.join('docker', 'canvaskit')
12 configuration = api.vars.builder_cfg.get('configuration', '')
13 extra = api.vars.builder_cfg.get('extra_config', '')
14
15
16
17
18
19
20 api.file.ensure_directory('mkdirs out_dir', out_dir, mode=0o777)
21
22
23
24 with api.context(cwd=skia_dir):
25 api.run(api.step, 'activate-emsdk',
26 cmd=['python3', skia_dir.join('bin', 'activate-emsdk')],
27 infra_step=True)
28
29
30
31
32
33
34
35
36
37
38
39 cmd = ['docker', 'run', '--rm', '--volume', '%s:/SRC' % checkout_root,
40 '--volume', '%s:/OUT' % out_dir,
41 DOCKER_IMAGE, INNER_BUILD_SCRIPT]
42
43
44
45 if 'CPU' in extra:
46 cmd.append('cpu')
47 if 'WebGPU' in extra:
48 cmd.append('webgpu')
49
50 if configuration == 'Debug':
51 cmd.append('debug')
52
53 env = {'DOCKER_CONFIG': '/home/chrome-bot/.docker'}
54 with api.env(env):
55 api.run(
56 api.step,
57 'Build CanvasKit with Docker',
58 cmd=cmd)
59
60
def compile_fn(api, checkout_root, _ignore)