Commit f1a41b1
committed
ci(build_template): produce decls.txt + imports.json artifact via mathlib-ci (#39880)
Adds a post-build step that invokes `dumpReasonableDecls.lean` from mathlib-ci and bundles its two outputs into the existing `import-graph` artifact alongside `import_graph.dot`.
## What lands in the artifact
- `decls.txt`: sorted list of "reasonable" declarations from the Lean environment. Includes `to_additive` / `to_dual` / `to_op` autogenerated outputs that the regex-based `declarations_diff.sh` silently misses.
- `imports.json`: per-module transitive-import counts computed from `Lean.Environment.importGraph`. Format-compatible with `count-trans-deps.py`.
Both files come from a single Lean env load in the post-build step.
## Why this PR has no consumer (yet)
This is stage 1 of a multi-PR feature. Subsequent PRs (across both repos) add the consumers: a post-build `decls-diff.yml` workflow that downloads the artifact pair, computes the Lean-aware declarations diff, and patches the `### PR summary` comment with the result. The architecture relies on the master-side artifact being available so PRs can do cross-run downloads; hence the conditional `retention-days` (90 days on master pushes, 7 elsewhere).
## Dependency on mathlib-ci
Depends on leanprover-community/mathlib-ci#42, which adds `scripts/pr_summary/dumpReasonableDecls.lean`. The mathlib-ci pin in `.github/actions/get-mathlib-ci/action.yml` is bumped to a commit on that PR's branch so CI here is green during review. Once mathlib-ci#42 lands, the pin will be re-bumped to the merged-master SHA before this PR merges.
🤖 Generated with [Claude Code](https://claude.com/claude-code)1 parent 93231e1 commit f1a41b1
1 file changed
Lines changed: 24 additions & 5 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
733 | 733 | | |
734 | 734 | | |
735 | 735 | | |
| 736 | + | |
| 737 | + | |
| 738 | + | |
| 739 | + | |
| 740 | + | |
| 741 | + | |
| 742 | + | |
| 743 | + | |
| 744 | + | |
| 745 | + | |
| 746 | + | |
| 747 | + | |
| 748 | + | |
| 749 | + | |
| 750 | + | |
| 751 | + | |
736 | 752 | | |
737 | 753 | | |
738 | 754 | | |
739 | 755 | | |
740 | | - | |
741 | | - | |
742 | | - | |
743 | | - | |
| 756 | + | |
| 757 | + | |
| 758 | + | |
| 759 | + | |
| 760 | + | |
| 761 | + | |
| 762 | + | |
744 | 763 | | |
745 | 764 | | |
746 | | - | |
| 765 | + | |
747 | 766 | | |
748 | 767 | | |
749 | 768 | | |
| |||
0 commit comments