Compare commits

4 Commits

Author SHA1 Message Date
Zayden-Jung c43133e733 Merge pull request 'ci: 仅 main 分支执行 CI/CD' (#1) from codex/main-only-cicd into main
ci / test (push) Successful in 46s
Reviewed-on: #1
2026-11-03 19:05:19 +00:00
codex-bot 23f1925cc0 ci: restrict workflows to main branch 2026-10-30 03:44:01 +08:00
claude-bot a3021d9c39 docs: note Lean 4.35.0 as the verified toolchain
ci / test (push) Successful in 1m15s
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01FYqwNMyPUHeTbFWg83GQq6
2026-10-21 11:33:07 +00:00
claude-bot 9e983edaa7 ci: test on the ubuntu24.04-x64-lean4.35 runner; move to Lean 4.35.0
ci / test (push) Successful in 9s
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01FYqwNMyPUHeTbFWg83GQq6
2026-10-21 10:58:41 +00:00
3 changed files with 70 additions and 2 deletions
+68
View File
@@ -0,0 +1,68 @@
name: ci
# Runs on the ubuntu24.04-x64-lean4.35 runner: jobs execute on the host, Lean 4.35
# comes from /root/.elan, and there is no Node, so the commit is cloned with git
# instead of actions/checkout.
on:
push:
branches: [main]
workflow_dispatch:
jobs:
test:
if: gitea.ref == 'refs/heads/main'
runs-on: ubuntu24.04-x64-lean4.35
timeout-minutes: 20
steps:
- name: Check out
run: |
set -eu
git init -q . && git remote add origin "${{ github.server_url }}/${{ github.repository }}.git"
git -c http.extraHeader="Authorization: token ${{ github.token }}" fetch -q --depth 1 origin "${{ github.sha }}"
git checkout -q FETCH_HEAD && git log --oneline -1
- name: Lean
run: |
lean --version
echo "project toolchain: $(cat lean-toolchain)"
- name: Install
run: |
set -eu
python3 -m venv .venv 2>/dev/null || { apt-get update -qq && apt-get install -y -qq python3-venv && python3 -m venv .venv; }
.venv/bin/python -m pip install --quiet --disable-pip-version-check -e .
.venv/bin/lean-agent --help > /dev/null
- name: Unit tests (real Lean verifier)
run: .venv/bin/python -m unittest discover -s tests -v
- name: CLI end to end (scripted provider, real Lean)
run: |
set -eu
printf '%s\n' '{"id":"refl","statement":"∀ n : Nat, n + 0 = n"}' > task.json
cat > provider.py <<'PY'
import sys
sys.stdin.read()
print("intro n\nrfl")
PY
.venv/bin/lean-agent task.json --provider-command '["python3","provider.py"]' --attempts 2 | tee out.json
grep -q '"success": true' out.json
- name: With Mathlib (uses lean-bench's host cache, if present)
run: |
set -eu
dir="$(ls -d /opt/lean-cache/leanbench-*/ 2>/dev/null | while read d; do [ -f "$d/.ready" ] && echo "$d"; done | tail -1)"
if [ -z "$dir" ]; then
echo "No ready Mathlib project on this host yet (lean-bench CI builds it); skipping."
exit 0
fi
printf '%s\n' '{"id":"m","statement":"(2 : ℕ) + 2 = 4","prelude":"import Mathlib"}' > mtask.json
cat > mprovider.py <<'PY'
import sys
sys.stdin.read()
print("norm_num")
PY
.venv/bin/lean-agent mtask.json --provider-command '["python3","mprovider.py"]' \
--lean-project "$dir" --lean-command '["lake","env","lean"]' --lean-timeout 300 | tee mout.json
grep -q '"success": true' mout.json
+1 -1
View File
@@ -1,6 +1,6 @@
# Lean Agent
独立 Python 3.11+ 项目:LLM 生成 tactic → Lean 验证 → 把错误反馈给模型修复。已在 Lean 4.33.1 验证,无 Python 运行时第三方依赖。
独立 Python 3.11+ 项目:LLM 生成 tactic → Lean 验证 → 把错误反馈给模型修复。已在 Lean 4.35.0 验证(CI:ubuntu24.04-x64-lean4.35 runner,含 Mathlib v4.35.0),无 Python 运行时第三方依赖。
## 使用
+1 -1
View File
@@ -1 +1 @@
leanprover/lean4:v4.33.1
leanprover/lean4:v4.35.0