-
Notifications
You must be signed in to change notification settings - Fork 0
Lean: Carrier-LCM discharge work, add pinned Lean CI target, and update docs #72
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Changes from all commits
0330f19
aaf58c7
b54b4d7
e1cc6e4
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,49 @@ | ||
| name: carrier-lcm target (Lean) | ||
|
|
||
| # Targeted verifier for the Carrier-LCM proof frontier. | ||
| # This intentionally runs the exact pinned-toolchain command requested for | ||
| # PR acceptance; a green job means the file type-checks under formal/lean-toolchain, | ||
| # while remaining `sorry` leaves still retain their usual no-DEFENDED-status meaning. | ||
|
|
||
| on: | ||
| workflow_dispatch: | ||
| pull_request: | ||
| paths: | ||
| - 'formal/**' | ||
| - '.github/workflows/carrier-lcm-target.yml' | ||
|
|
||
| jobs: | ||
| carrier-lcm: | ||
| runs-on: ubuntu-latest | ||
| steps: | ||
| - name: Checkout | ||
| uses: actions/checkout@v4 | ||
|
|
||
| - name: Install elan using formal/lean-toolchain | ||
| run: | | ||
| curl -sSf https://raw.githubusercontent.com/leanprover/elan/master/elan-init.sh \ | ||
| | sh -s -- -y --default-toolchain "$(cat formal/lean-toolchain)" | ||
|
|
||
| - name: Cache Lake packages | ||
| uses: actions/cache@v4 | ||
| with: | ||
| path: formal/.lake | ||
| key: carrier-lcm-lake-${{ hashFiles('formal/lean-toolchain', 'formal/lakefile.lean', 'formal/lake-manifest.json') }} | ||
|
|
||
| - name: Build Ucns.CarrierLcm with pinned toolchain | ||
| run: | | ||
| source $HOME/.elan/env | ||
| cd formal | ||
| lake build Ucns.CarrierLcm | ||
|
|
||
| - name: Reject admit/axiom in formal Lean files | ||
| run: | | ||
| if git grep -n -E '\b(admit|axiom)\b' -- 'formal/Ucns/*.lean'; then | ||
|
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more.
When an Useful? React with 👍 / 👎. |
||
| echo 'admit/axiom found in formal Lean files' | ||
| exit 1 | ||
| fi | ||
|
|
||
| - name: Report sorry leaves without certifying them | ||
| run: | | ||
| echo 'Open executable sorry leaves:' | ||
| git grep -n -E '\bsorry\b' -- 'formal/Ucns/*.lean' || true | ||
|
Comment on lines
+17
to
+49
|
||
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
In a fresh GitHub runner/cache miss, this target now imports Mathlib modules but goes directly from cache restore to
lake build. I checked the mathlib README, which documentslake exe cache getfor downloading cached build files and warns that skipping the cache makes the next build very slow; without that step the first PR run has to build imported Mathlib oleans locally instead of using the published cache, making this verifier prone to consuming a long CI slot or timing out.Useful? React with 👍 / 👎.