Merge pull request #6588 from jepler/signal-errors-ci-fetch-deps

signal errors in ci_fetch_deps subprocesses
This commit is contained in:
Scott Shawcroft 2022-07-15 11:17:59 -07:00 committed by GitHub
commit bad080a7bb
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
1 changed files with 11 additions and 5 deletions

View File

@ -43,13 +43,15 @@ port_deps = {
} }
def run(title, command): def run(title, command, check=True):
print("::group::" + title, flush=True) print("::group::" + title, flush=True)
print(command, flush=True) print(command, flush=True)
start = time.monotonic() start = time.monotonic()
subprocess.run(shlex.split(command), stderr=subprocess.STDOUT) try:
print("Duration:", time.monotonic() - start, flush=True) subprocess.run(shlex.split(command), stderr=subprocess.STDOUT, check=check)
print("::endgroup::", flush=True) finally:
print("Duration:", time.monotonic() - start, flush=True)
print("::endgroup::", flush=True)
run( run(
@ -106,7 +108,11 @@ if submodules:
submodules = " ".join(submodules) submodules = " ".join(submodules)
# This line will fail because the submodule's need different commits than the tip of the branch. We # This line will fail because the submodule's need different commits than the tip of the branch. We
# fix it later. # fix it later.
run("Init the submodules we'll need", f"git submodule update --init -N --depth 1 {submodules}") run(
"Init the submodules we'll need",
f"git submodule update --init -N --depth 1 {submodules}",
check=False,
)
run( run(
"Fetch the submodule sha", "Fetch the submodule sha",