recipes.star 6.4 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272
  1. # Copyright 2020 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. load("//lib/bootstrap.star", "POLYMORPHIC", "register_recipe_bootstrappability")
  5. load("//lib/recipe_experiments.star", "register_recipe_experiments")
  6. _RECIPE_NAME_PREFIX = "recipe:"
  7. def _recipe_for_package(cipd_package):
  8. def recipe(
  9. *,
  10. name,
  11. cipd_version = None,
  12. recipe = None,
  13. bootstrappable = False,
  14. experiments = None):
  15. """Declare a recipe for the given package.
  16. A wrapper around luci.recipe with a fixed cipd_package and some
  17. chromium-specific functionality. See
  18. https://chromium.googlesource.com/infra/luci/luci-go/+/HEAD/lucicfg/doc/README.md#luci.recipe
  19. for more information.
  20. Args:
  21. name: The name to use to refer to the executable in builder
  22. definitions. Must start with "recipe:". See luci.recipe for more
  23. information.
  24. cipd_version: See luci.recipe.
  25. recipe: See luci.recipe.
  26. bootstrappable: Whether or not the recipe supports the chromium
  27. bootstrapper. A recipe supports the bootstrapper if the following
  28. conditions are met:
  29. * chromium_bootstrap.update_gclient_config is called to update the
  30. gclient config that is used for bot_update. This will be true if
  31. calling chromium_checkout.ensure_checkout or
  32. chromium_tests.prepare_checkout.
  33. * If the recipe does analysis to reduce compilation/testing, it
  34. skips analysis and performs a full build if
  35. chromium_bootstrap.skip_analysis_reasons is non-empty. This will
  36. be true if calling chromium_tests.determine_compilation_targets.
  37. In addition to a True or False value, POLYMORPHIC can be
  38. specified. This value will cause the builder's executable to be
  39. changed to the bootstrapper in properties-optional, polymorphic
  40. mode, which will by default not bootstrap any properties. On a
  41. per-run basis the $bootstrap/properties property can be set to
  42. bootstrap properties for different builders.
  43. experiments: Experiments to apply to a builder using the recipe. If
  44. the builder specifies an experiment, the experiment value from the
  45. recipe will be ignored.
  46. """
  47. # Force the caller to put the recipe prefix rather than adding it
  48. # programatically to make the string greppable
  49. if not name.startswith(_RECIPE_NAME_PREFIX):
  50. fail("Recipe name {!r} does not start with {!r}"
  51. .format(name, _RECIPE_NAME_PREFIX))
  52. if recipe == None:
  53. recipe = name[len(_RECIPE_NAME_PREFIX):]
  54. ret = luci.recipe(
  55. name = name,
  56. cipd_package = cipd_package,
  57. cipd_version = cipd_version,
  58. recipe = recipe,
  59. use_bbagent = True,
  60. use_python3 = True,
  61. )
  62. register_recipe_bootstrappability(name, bootstrappable)
  63. register_recipe_experiments(name, experiments or {})
  64. return ret
  65. return recipe
  66. build_recipe = _recipe_for_package(
  67. "infra/recipe_bundles/chromium.googlesource.com/chromium/tools/build",
  68. )
  69. build_recipe(
  70. name = "recipe:android/androidx_packager",
  71. )
  72. build_recipe(
  73. name = "recipe:android/avd_packager",
  74. )
  75. build_recipe(
  76. name = "recipe:android/sdk_packager",
  77. )
  78. build_recipe(
  79. name = "recipe:angle_chromium",
  80. )
  81. build_recipe(
  82. name = "recipe:angle_chromium_trybot",
  83. )
  84. build_recipe(
  85. name = "recipe:binary_size_generator_tot",
  86. )
  87. build_recipe(
  88. name = "recipe:binary_size_trybot",
  89. )
  90. build_recipe(
  91. name = "recipe:binary_size_fuchsia_trybot",
  92. )
  93. build_recipe(
  94. name = "recipe:branch_configuration/tester",
  95. )
  96. build_recipe(
  97. name = "recipe:build_perf",
  98. )
  99. build_recipe(
  100. name = "recipe:celab",
  101. )
  102. build_recipe(
  103. name = "recipe:chromium",
  104. bootstrappable = True,
  105. )
  106. build_recipe(
  107. name = "recipe:chromium/builder_config_verifier",
  108. )
  109. build_recipe(
  110. name = "recipe:chromium/orchestrator",
  111. bootstrappable = True,
  112. )
  113. build_recipe(
  114. name = "recipe:chromium/compilator",
  115. bootstrappable = True,
  116. )
  117. build_recipe(
  118. name = "recipe:chromium/builder_cache_prewarmer",
  119. bootstrappable = True,
  120. )
  121. build_recipe(
  122. name = "recipe:chromium_polymorphic/launcher",
  123. )
  124. build_recipe(
  125. name = "recipe:chromium_3pp",
  126. )
  127. build_recipe(
  128. name = "recipe:chromium_afl",
  129. )
  130. build_recipe(
  131. name = "recipe:chromium_clang_coverage_tot",
  132. )
  133. build_recipe(
  134. name = "recipe:chromium_codesearch",
  135. )
  136. build_recipe(
  137. name = "recipe:chromium_expectation_files/expectation_file_scripts",
  138. bootstrappable = True,
  139. )
  140. build_recipe(
  141. name = "recipe:chromium_export_metadata",
  142. )
  143. build_recipe(
  144. name = "recipe:chromium_libfuzzer",
  145. )
  146. build_recipe(
  147. name = "recipe:chromium_libfuzzer_trybot",
  148. )
  149. build_recipe(
  150. name = "recipe:chromium_rts/create_model",
  151. )
  152. build_recipe(
  153. name = "recipe:chromium_trybot",
  154. bootstrappable = True,
  155. )
  156. build_recipe(
  157. name = "recipe:chromium_upload_clang",
  158. )
  159. build_recipe(
  160. name = "recipe:cronet",
  161. )
  162. build_recipe(
  163. name = "recipe:flakiness/generate_builder_test_data",
  164. )
  165. build_recipe(
  166. name = "recipe:flakiness/reproducer",
  167. )
  168. build_recipe(
  169. name = "recipe:findit/chromium/single_revision",
  170. bootstrappable = POLYMORPHIC,
  171. )
  172. build_recipe(
  173. name = "recipe:gofindit/chromium/single_revision",
  174. bootstrappable = POLYMORPHIC,
  175. )
  176. build_recipe(
  177. name = "recipe:presubmit",
  178. )
  179. build_recipe(
  180. name = "recipe:reclient_config_deploy_check/tester",
  181. )
  182. build_recipe(
  183. name = "recipe:reclient_goma_comparison",
  184. )
  185. build_recipe(
  186. name = "recipe:requires_testing_checker",
  187. )
  188. build_recipe(
  189. name = "recipe:reviver/chromium/runner",
  190. bootstrappable = POLYMORPHIC,
  191. )
  192. build_recipe(
  193. name = "recipe:swarming/deterministic_build",
  194. )
  195. build_recipe(
  196. name = "recipe:swarming/staging",
  197. )
  198. build_recipe(
  199. name = "recipe:tricium_clang_tidy_wrapper",
  200. )
  201. build_recipe(
  202. name = "recipe:tricium_clang_tidy_orchestrator",
  203. )
  204. build_recipe(
  205. name = "recipe:tricium_metrics",
  206. )
  207. build_recipe(
  208. name = "recipe:tricium_oilpan",
  209. )
  210. build_recipe(
  211. name = "recipe:tricium_simple",
  212. )
  213. build_recipe(
  214. name = "recipe:webrtc/chromium_ios",
  215. )