Skip to content
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
13 changes: 12 additions & 1 deletion ci/ci-util.py
Original file line number Diff line number Diff line change
Expand Up @@ -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,
Expand All @@ -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")


Expand Down
Loading