signal errors in ci_fetch_deps subprocesses
A recent build failed. The original error seemed to be during ci_fetch_deps where a build message said ``` fatal: reference is not a tree: 346c936e14c6ea3a8d3d65cb1fa46202dc92999d fatal: Unable to checkout '346c936e14c6ea3a8d3d65cb1fa46202dc92999d' in submodule path 'extmod/ulab' ``` (along with other problems), but this step didn't signal failure to github actions. By adding the check= parameter, a failure of the subprocess will cause a CalledProcessError to be raised, which will make ci_fetch_deps exit with nonzero status. In turn, this should let Actions understand that something went wrong with this step, instead of waiting for some subsequent step(s) to go wrong.
This commit is contained in:
parent
f869a86d9a
commit
104ac5b965
|
@ -47,9 +47,11 @@ def run(title, command):
|
|||
print("::group::" + title, flush=True)
|
||||
print(command, flush=True)
|
||||
start = time.monotonic()
|
||||
subprocess.run(shlex.split(command), stderr=subprocess.STDOUT)
|
||||
print("Duration:", time.monotonic() - start, flush=True)
|
||||
print("::endgroup::", flush=True)
|
||||
try:
|
||||
subprocess.run(shlex.split(command), stderr=subprocess.STDOUT, check=True)
|
||||
finally:
|
||||
print("Duration:", time.monotonic() - start, flush=True)
|
||||
print("::endgroup::", flush=True)
|
||||
|
||||
|
||||
run(
|
||||
|
|
Loading…
Reference in New Issue