8PYTHON_VERSION_COMPATIBILITY =
"PY3"
14 'recipe_engine/context',
18 'recipe_engine/platform',
19 'recipe_engine/properties',
21 'depot_tools/gitiles',
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()
127 api.test(
'Build-Win10-Clang-x86_64-Release-NoDEPS') +
128 api.properties(buildername=
'Build-Win10-Clang-x86_64-Release-NoDEPS',
129 repository=
'https://skia.googlesource.com/skia.git',
131 path_config=
'kitchen',
132 swarm_out_dir=
'[SWARM_OUT_DIR]') +
133 api.platform(
'win', 64)
138 api.test(
'Build-Debian10-Clang-arm-Release-NoPatch') +
139 api.properties(buildername=
'Build-Debian10-Clang-arm-Release-NoPatch',
140 repository=
'https://skia.googlesource.com/skia.git',
141 revision=
'b44572fbfeb669998053b023f473b9c274f2f2cf',
142 path_config=
'kitchen',
143 swarm_out_dir=
'[SWARM_OUT_DIR]') +
152 'gitiles log: b44572fbfeb669998053b023f473b9c274f2f2cf',
153 api.gitiles.make_log_test_data(
'6e0e0a9f6cbf09078aa4730d1a0dc0aa722ddc11'),
158 api.test(
'Build-Debian10-Clang-arm-Release-NoPatch (tryjob)') +
159 api.properties(buildername=
'Build-Debian10-Clang-arm-Release-NoPatch',
160 repository=
'https://skia.googlesource.com/skia.git',
162 path_config=
'kitchen',
163 swarm_out_dir=
'[SWARM_OUT_DIR]',