From d7c977e0fd5693a6faa930daf1db09bfb40373c0 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Petr=20=C5=A0tetiar?= Date: Sat, 1 Jun 2024 11:57:11 +0000 Subject: [PATCH] phase1: make list of builders configurable MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit 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 --- phase1/config.ini.example | 5 +++++ phase1/master.cfg | 9 ++++++++- 2 files changed, 13 insertions(+), 1 deletion(-) diff --git a/phase1/config.ini.example b/phase1/config.ini.example index 267184f..0e4b551 100644 --- a/phase1/config.ini.example +++ b/phase1/config.ini.example @@ -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 diff --git a/phase1/master.cfg b/phase1/master.cfg index 970f7f9..e8764bc 100644 --- a/phase1/master.cfg +++ b/phase1/master.cfg @@ -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):