32 checkout_root = api.checkout.default_checkout_root
34 revision = api.properties[
'revision']
36 if 'NoDEPS' in api.properties[
'buildername']:
38 checkout_root = api.path[
'start_dir']
39 if 'NoPatch' in api.vars.builder_name:
41 checkout_root = api.path[
'start_dir']
47 if not api.vars.is_trybot:
52 response, _ = api.gitiles.log(
53 url = api.properties[
'repository'],
54 ref = api.properties[
'revision'],
61 revision = response[0][
'parents'][0]
64 api.checkout.bot_update(
65 checkout_root=checkout_root,
66 skip_patch=skip_patch,
67 override_revision=revision)
69 if 'NoPatch' in api.vars.builder_name:
87 src = api.path[
'start_dir'].join(
'k',
'skia')
88 dst = api.path[
'start_dir'].join(
'skia')
89 script = api.infra.resource(
'copytree.py')
91 name=
'copy Skia repository checkout from %s to %s' % (src, dst),
92 cmd=[
'python3', script, src, dst])
93 api.file.rmtree(
'remove %s' % src, src)
96 api.checkout.git(checkout_root=checkout_root)
98 api.file.ensure_directory(
'makedirs tmp_dir', api.vars.tmp_dir)
100 out_dir = checkout_root.join(
101 'skia',
'out', api.vars.builder_name, api.vars.configuration)
102 if 'NoPatch' in api.vars.builder_name:
105 out_dir = api.vars.cache_dir.join(
106 'work',
'skia',
'out', api.vars.builder_name, api.vars.configuration)
109 api.build(checkout_root=checkout_root, out_dir=out_dir)
112 dst = api.vars.swarming_out_dir
113 api.build.copy_build_products(out_dir=out_dir, dst=dst)
115 if 'Win' in api.vars.builder_cfg.get(
'os',
''):
116 script = api.build.resource(
'cleanup_win_processes.py')
119 cmd=[
'vpython3', script],
122 api.run.check_failure()