From 30c82cd12aba58fe6092de931b6789332fe111d4 Mon Sep 17 00:00:00 2001 From: Pierre Kancir Date: Mon, 25 Nov 2024 17:19:04 +0100 Subject: [PATCH] wscript: print CI group tag on CI --- wscript | 15 +++++++++++++++ 1 file changed, 15 insertions(+) diff --git a/wscript b/wscript index fff0a563f2111..2d01864f22bde 100644 --- a/wscript +++ b/wscript @@ -82,6 +82,10 @@ Build.BuildContext.execute = ardupilotwaf.ap_autoconfigure(Build.BuildContext.ex Configure.ConfigurationContext.post_recurse = ardupilotwaf.ap_configure_post_recurse() +# Get the GitHub Actions summary file path +is_ci = os.getenv('CI') + + def _set_build_context_variant(board): for c in Context.classes: if not issubclass(c, Build.BuildContext): @@ -476,6 +480,8 @@ def _collect_autoconfig_files(cfg): cfg.files.append(p) def configure(cfg): + if is_ci: + print(f"::group::Waf Configure") # we need to enable debug mode when building for gconv, and force it to sitl if cfg.options.board is None: cfg.options.board = 'sitl' @@ -651,6 +657,8 @@ def configure(cfg): cfg.remove_target_list() _collect_autoconfig_files(cfg) + if is_ci: + print("::endgroup::") def collect_dirs_to_recurse(bld, globs, **kw): dirs = [] @@ -876,6 +884,8 @@ def _load_pre_build(bld): brd.pre_build(bld) def build(bld): + if is_ci: + print(f"::group::Waf Build") config_hash = Utils.h_file(bld.bldnode.make_node('ap_config.h').abspath()) bld.env.CCDEPS = config_hash bld.env.CXXDEPS = config_hash @@ -911,6 +921,11 @@ def build(bld): _build_recursion(bld) _build_post_funs(bld) + if is_ci: + def print_ci_endgroup(bld): + print(f"::endgroup::") + bld.add_post_fun(print_ci_endgroup) + ardupilotwaf.build_command('check', program_group_list='all',