mirror of https://github.com/ArduPilot/ardupilot
wscript: print CI group tag on CI
This commit is contained in:
parent
0f144b5d01
commit
fc5a02c231
15
wscript
15
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',
|
||||
|
|
Loading…
Reference in New Issue