1# -*- bazel-starlark -*- 2# Copyright 2023 The Chromium Authors 3# Use of this source code is governed by a BSD-style license that can be 4# found in the LICENSE file. 5"""Siso configuration for blink scripts.""" 6 7load("@builtin//runtime.star", "runtime") 8load("@builtin//struct.star", "module") 9load("./platform.star", "platform") 10 11def __filegroups(ctx): 12 return { 13 "third_party/pyjson5/src/json5:pylib": { 14 "type": "glob", 15 "includes": ["*.py"], 16 }, 17 "third_party/jinja2:pylib": { 18 "type": "glob", 19 "includes": ["*.py"], 20 }, 21 "third_party/markupsafe:pylib": { 22 "type": "glob", 23 "includes": ["*.py"], 24 }, 25 "third_party/blink/renderer/build/scripts:scripts": { 26 "type": "glob", 27 "includes": ["*.py"], 28 }, 29 "third_party/blink/renderer/build/scripts/templates:templates": { 30 "type": "glob", 31 "includes": ["*.tmpl"], 32 }, 33 } 34 35__handlers = { 36} 37 38def __step_config(ctx, step_config): 39 step_config["rules"].extend([ 40 { 41 "name": "blink/generate_bindings", 42 "command_prefix": platform.python_bin + " ../../third_party/blink/renderer/bindings/scripts/generate_bindings.py", 43 "remote": True, 44 "timeout": "2m", 45 "platform_ref": "large", 46 }, 47 ]) 48 49 # TODO: Enable remote actions for Mac and Windows. 50 if runtime.os == "linux": 51 step_config["rules"].extend([ 52 { 53 "name": "blink/run_with_pythonpath", 54 "command_prefix": platform.python_bin + " ../../third_party/blink/renderer/build/scripts/run_with_pythonpath.py -I ../../third_party/blink/renderer/build/scripts -I ../../third_party -I ../../third_party/pyjson5/src -I ../../tools ../../third_party/blink/renderer/build/scripts/", 55 # TODO: b/330095451 - specify the following inputs in GN configs. 56 "inputs": [ 57 "third_party/blink/renderer/build/scripts:scripts", 58 "third_party/blink/renderer/build/scripts/templates:templates", 59 "third_party/jinja2:pylib", 60 "third_party/markupsafe:pylib", 61 "third_party/pyjson5/src/json5:pylib", 62 ], 63 "remote": True, 64 "timeout": "2m", 65 }, 66 ]) 67 return step_config 68 69blink_all = module( 70 "blink_all", 71 filegroups = __filegroups, 72 handlers = __handlers, 73 step_config = __step_config, 74) 75