diff --git a/ci/ci-util.py b/ci/ci-util.py index 113820b7..ef9ce455 100755 --- a/ci/ci-util.py +++ b/ci/ci-util.py @@ -390,6 +390,7 @@ def locate_baseline(flags: list[str]) -> None: artifact_glob = f"{ARTIFACT_PREFIX}{f"-{tag}" if tag else ""}*" + # Skip checking because this will fail if the file already exists, which is fine. sp.run( ["gh", "run", "download", str(job_id), f"--pattern={artifact_glob}"], check=False, @@ -409,7 +410,17 @@ def locate_baseline(flags: list[str]) -> None: candidate_baselines.sort(reverse=True) baseline_archive = candidate_baselines[0] eprint(f"extracting {baseline_archive}") - sp.run(["tar", "xJvf", baseline_archive], check=True) + + all_paths = sp.check_output(["tar", "tJf", baseline_archive], encoding="utf8") + sp.run(["tar", "xJf", baseline_archive], check=True) + + # Print a short summary of paths, we don't use `tar v` since the list is huge + short_paths = re.findall(r"^(?:[^/\n]+/?){1,3}", all_paths, re.MULTILINE) + + print("Extracted:") + for path in sorted(set(short_paths)): + print(f"* {path}") + eprint("baseline extracted successfully")