phase1: make list of builders configurable
authorPetr Štetiar <ynezz@true.cz>
Sat, 1 Jun 2024 11:57:11 +0000 (11:57 +0000)
committerPetr Štetiar <ynezz@true.cz>
Sat, 1 Jun 2024 12:16:36 +0000 (12:16 +0000)
Currently we always populate builders (build targets) from the Git tree,
but for staging environment this is usually overkill as we might need
just a bunch of targets, so lets make this configurable.

Signed-off-by: Petr Štetiar <ynezz@true.cz>
phase1/config.ini.example
phase1/master.cfg

index 267184f01594584fbfd74aaa00b3163d551e1fcd..0e4b551b5d3547b9df964b3ce19284d0048e3982 100644 (file)
@@ -45,6 +45,11 @@ config_seed = # Seed configuration
        CONFIG_CCACHE=n
        CONFIG_KERNEL_KALLSYMS=y
        CONFIG_AUTOREMOVE=y
+build_targets = armsr/armv8
+       malta/be
+       mediatek/filogic
+       qualcommax/ipq807x
+       x86/64
 
 [branch openwrt-22.03]
 name = openwrt-22.03
index 970f7f91b5c4437b98707bca52dbc9989f1d76d8..e8764bc52a840c6c9175e234d78bd9aa891a729e 100644 (file)
@@ -93,6 +93,7 @@ def ini_parse_branch(section):
     b["usign_comment"] = section.get("usign_comment", usign_comment)
 
     b["config_seed"] = section.get("config_seed")
+    b["build_targets"] = section.get("build_targets")
 
     b["kmod_archive"] = section.getboolean("kmod_archive", False)
 
@@ -300,8 +301,14 @@ targets = dict()
 
 
 def populateTargets():
+    def buildTargetsConfigured(branch):
+        builders = branches[branch].get("build_targets")
+        return builders and set(filter(None, [t.strip() for t in builders.split("\n")]))
+
     for branch in branchNames:
-        populateTargetsForBranch(branch)
+        targets[branch] = buildTargetsConfigured(branch)
+        if not targets[branch]:
+            populateTargetsForBranch(branch)
 
 
 def populateTargetsForBranch(branch):