mirror of
https://github.com/storytold/craft-libs.git
synced 2026-11-27 09:19:28 +00:00
CI: a failed deps-profile hash stops the step instead of naming every entry v2-
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
This commit is contained in:
co-authored by
Claude Opus 5.5
parent
6d1dbd47ac
commit
68ab35c9bb
@@ -78,7 +78,8 @@ jobs:
|
||||
- id: profile
|
||||
run: |
|
||||
echo "profile=$(cat .config/cargo-dev.toml .config/cargo-ci.toml | sha256sum | cut -c1-12)" >> "$GITHUB_OUTPUT"
|
||||
echo "deps-profile=$(python3 -I - <<'PY'
|
||||
# An assignment, so a failure stops the step (`bash -e`) instead of naming every entry `v2-`.
|
||||
deps=$(python3 -I - <<'PY'
|
||||
import hashlib, json, tomllib
|
||||
kept = []
|
||||
for path in (".config/cargo-dev.toml", ".config/cargo-ci.toml"):
|
||||
@@ -87,7 +88,8 @@ jobs:
|
||||
kept.append([dev, dev.pop("package", {}).get("*", {})])
|
||||
print(hashlib.sha256(json.dumps(kept, sort_keys=True).encode()).hexdigest()[:12])
|
||||
PY
|
||||
)" >> "$GITHUB_OUTPUT"
|
||||
)
|
||||
echo "deps-profile=$deps" >> "$GITHUB_OUTPUT"
|
||||
|
||||
# The Linux leg keeps the compiled workspace crates between runs (`cache-workspace-crates`): each
|
||||
# main run saves a rolling cache entry of its own, every run restores the newest one, and Cargo
|
||||
|
||||
Reference in New Issue
Block a user