5DOCKER_IMAGE =
'gcr.io/skia-public/canvaskit-emsdk:3.1.26_v2'
6INNER_BUILD_SCRIPT =
'/SRC/skia/infra/canvaskit/build_canvaskit.sh'
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',
'')
20 api.file.ensure_directory(
'mkdirs out_dir', out_dir, mode=0o777)
24 with api.context(cwd=skia_dir):
25 api.run(api.step,
'activate-emsdk',
26 cmd=[
'python3', skia_dir.join(
'bin',
'activate-emsdk')],
39 cmd = [
'docker',
'run',
'--rm',
'--volume',
'%s:/SRC' % checkout_root,
40 '--volume',
'%s:/OUT' % out_dir,
41 DOCKER_IMAGE, INNER_BUILD_SCRIPT]
50 if configuration ==
'Debug':
53 env = {
'DOCKER_CONFIG':
'/home/chrome-bot/.docker'}
57 'Build CanvasKit with Docker',
61CANVASKIT_BUILD_PRODUCTS = [
67 out_dir = api.vars.cache_dir.join(
'docker',
'canvaskit')
75 script = api.build.resource(
'copy_build_products_no_delete.py')
77 name=
'copy wasm output',
78 cmd=[
'python3', script, out_dir, dst,
','.
join(CANVASKIT_BUILD_PRODUCTS)],
def compile_fn(api, checkout_root, _ignore)
def copy_build_products(api, _ignore, dst)
static SkString join(const CommandLineFlags::StringArray &)