Flutter Engine
The Flutter Engine
Loading...
Searching...
No Matches
compile.py
Go to the documentation of this file.
1# Copyright 2016 The Chromium Authors. All rights reserved.
2# Use of this source code is governed by a BSD-style license that can be
3# found in the LICENSE file.
4
5
6# Recipe module for compiling Skia when the checkout has already been done
7# (e.g. repo brought in via CAS)
8
9PYTHON_VERSION_COMPATIBILITY = "PY3"
10
11DEPS = [
12 'build',
13 'checkout',
14 'recipe_engine/context',
15 'recipe_engine/file',
16 'recipe_engine/json',
17 'recipe_engine/path',
18 'recipe_engine/platform',
19 'recipe_engine/properties',
20 'recipe_engine/step',
21 'run',
22 'vars',
23]
24
25
26def RunSteps(api):
27 api.vars.setup()
28
29 checkout_root = api.path['start_dir']
30 out_dir = api.vars.cache_dir.join(
31 'work', 'skia', 'out', api.vars.builder_name, api.vars.configuration)
32
33 try:
34 api.build(checkout_root=checkout_root, out_dir=out_dir)
35
36 # TODO(borenet): Move this out of the try/finally.
37 dst = api.vars.swarming_out_dir
38 api.build.copy_build_products(out_dir=out_dir, dst=dst)
39 finally:
40 if 'Win' in api.vars.builder_cfg.get('os', ''):
41 script = api.build.resource('cleanup_win_processes.py')
42 api.step(
43 name='cleanup',
44 cmd=['vpython3', script],
45 infra_step=True)
46
47 api.run.check_failure()
48
49
50TEST_BUILDERS = [
51 'Build-Win-Clang-x86-Debug',
52]
53
54
55def GenTests(api):
56 for builder in TEST_BUILDERS:
57 test = (
58 api.test(builder) +
59 api.properties(buildername=builder,
60 repository='https://skia.googlesource.com/skia.git',
61 revision='abc123',
62 path_config='kitchen',
63 swarm_out_dir='[SWARM_OUT_DIR]')
64 )
65 if 'Win' in builder:
66 test += api.platform('win', 64)
67 yield test
RunSteps(api)
Definition compile.py:26
GenTests(api)
Definition compile.py:55