Skip to content

Commit

Permalink
wscript: print CI group tag on CI
Browse files Browse the repository at this point in the history
  • Loading branch information
khancyr committed Nov 25, 2024
1 parent 54c0068 commit 820a1a2
Showing 1 changed file with 15 additions and 0 deletions.
15 changes: 15 additions & 0 deletions wscript
Original file line number Diff line number Diff line change
Expand Up @@ -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):
Expand Down Expand Up @@ -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'
Expand Down Expand Up @@ -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 = []
Expand Down Expand Up @@ -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
Expand Down Expand Up @@ -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',
Expand Down

0 comments on commit 820a1a2

Please sign in to comment.