Add canonical material reference construction #100
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| name: Bench Badge | |
| on: | |
| push: | |
| branches: [main] | |
| workflow_dispatch: | |
| permissions: | |
| contents: write | |
| jobs: | |
| update-badge: | |
| runs-on: ubuntu-latest | |
| steps: | |
| - uses: actions/checkout@v4 | |
| - uses: actions/setup-python@v5 | |
| with: | |
| python-version: '3.11' | |
| - name: Install package | |
| run: | | |
| python -m pip install --upgrade pip | |
| pip install -e '.[dev]' | |
| - name: Run expanded benchmark | |
| run: ovk bench --expanded --leaderboard .verification/formal-pr-bench-leaderboard.json | |
| - name: Render shields.io badge JSON | |
| run: python scripts/render_bench_badge.py --verified-source-sha "${GITHUB_SHA}" | |
| - name: Commit badge artifacts | |
| run: | | |
| git config user.name "github-actions[bot]" | |
| git config user.email "41898282+github-actions[bot]@users.noreply.github.com" | |
| git add docs/benchmarks/leaderboard-badge.json docs/benchmarks/latest-leaderboard-summary.json | |
| if git diff --staged --quiet; then | |
| echo "No badge changes to commit" | |
| else | |
| # Badge commits skip CI by design. Health claims must cite verified_source_sha | |
| # inside the JSON (the commit that ran the bench), not this commit. | |
| git commit -m "chore: update FormalPR-Bench badge [skip ci]" | |
| git push | |
| fi | |
| - name: Upload full leaderboard artifact | |
| uses: actions/upload-artifact@v4 | |
| with: | |
| name: formal-pr-bench-leaderboard | |
| path: | | |
| .verification/formal-pr-bench-leaderboard.json | |
| docs/benchmarks/leaderboard-badge.json | |
| docs/benchmarks/latest-leaderboard-summary.json | |
| retention-days: 90 |