Index of theproofnetwork/open-problems@860a535/.github/workflows/index.yml

qedmarket’s copy of theproofnetwork/open-problems@860a535, 3 Dec 2026original source ↗

71 lines · 2.7 kBraw
# Builds every statement on the official verifier's Lean and Mathlib, then regenerates index.json and excluded.json# from the compiled modules (scripts/build_index.py) and commits them when they changed.## Runs after a push that changes statements, the package or the scripts, and by hand (Actions → Build and index).# Mathlib comes from Mathlib's own build cache for the pinned commit; this repository's builds (the support package# and the statements) are kept in the GitHub cache, so a later run compiles only what changed. The first run# compiles all ~1,500 statement files: a few hours on a hosted runner.name: Build and index on:  push:    branches: [main]    paths:      - "FormalConjectures/**"      - "Prove2Me/**"      - "lakefile.toml"      - "lake-manifest.json"      - "lean-toolchain"      - "scripts/**"      - "metadata/**"  workflow_dispatch: concurrency:  group: build-and-index  cancel-in-progress: false permissions:  contents: write jobs:  index:    runs-on: ubuntu-24.04    timeout-minutes: 350    steps:      - uses: actions/checkout@11bd71901bbe5b1630ceea73d27597364c9af683 # v4.2.2       # Lean (lean-toolchain), Mathlib's cached build, and this repository's .lake from earlier runs.      - uses: leanprover/lean-action@ba3fdfe5c4476c925da13bf11a005ddb47e47aee # v1.7.1        with:          auto-config: "false"          build: "false"          test: "false"          lint: "false"          use-mathlib-cache: "true"          use-github-cache: "true"       - name: Build        run: lake build       - name: Index        run: python3 -I scripts/build_index.py       - name: Commit the index if it changed        run: |          if git diff --quiet -- index.json excluded.json; then            echo "index.json and excluded.json are unchanged"            exit 0          fi          git config user.name "github-actions[bot]"          git config user.email "41898900+github-actions[bot]@users.noreply.github.com"          git add index.json excluded.json          git commit -m "index.json from ${GITHUB_SHA::7}"          # main may have moved while this ran. If statements or scripts changed, a newer run makes the index from          # them: leave it to that one. Otherwise put this commit on top and push.          git fetch origin main          if ! git diff --quiet "$GITHUB_SHA" origin/main -- FormalConjectures Prove2Me lakefile.toml lake-manifest.json lean-toolchain scripts metadata; then            echo "main has newer statements or scripts; the run for them writes the index"            exit 0          fi          git rebase origin/main          git push origin HEAD:main

download (.tar)