|
| 1 | +# SPDX-License-Identifier: MPL-2.0 |
| 2 | +# Copyright (c) 2026 Jonathan D.A. Jewell (hyperpolymath) <j.d.a.jewell@open.ac.uk> |
| 3 | +# |
| 4 | +# proof-corpus.yml — machine-checks the git-reticulator Idris2 proof corpus. |
| 5 | +# |
| 6 | +# First mechanized proofs for the lattice core (see PROOF-NEEDS.md): elementary |
| 7 | +# order theory (P1a witnessed, P2a essence). The gate fails if the corpus stops |
| 8 | +# typechecking under idris2 0.8.0, or if a proof-escape symbol is introduced. |
| 9 | +# Mirrors the canonical vcl-ut `proof-corpus.yml`, plus `libgmp-dev` (required by |
| 10 | +# the Idris2 RefC support lib and missing from the vcl-ut recipe). |
| 11 | + |
| 12 | +name: Proof Corpus |
| 13 | + |
| 14 | +on: |
| 15 | + pull_request: |
| 16 | + branches: ['**'] |
| 17 | + push: |
| 18 | + branches: [main, master] |
| 19 | + |
| 20 | +permissions: |
| 21 | + contents: read |
| 22 | + |
| 23 | +concurrency: |
| 24 | + group: ${{ github.workflow }}-${{ github.ref }} |
| 25 | + cancel-in-progress: true |
| 26 | + |
| 27 | +jobs: |
| 28 | + machine-check: |
| 29 | + name: idris2 0.8.0 --build git-reticulator-proofs |
| 30 | + runs-on: ubuntu-latest |
| 31 | + timeout-minutes: 30 |
| 32 | + |
| 33 | + steps: |
| 34 | + - name: Checkout repository |
| 35 | + uses: actions/checkout@9c091bb21b7c1c1d1991bb908d89e4e9dddfe3e0 # v7.0.0 |
| 36 | + |
| 37 | + # Idris2 0.8.0 from PINNED official source (tag v0.8.0 == this commit). |
| 38 | + # No maintained setup action exists; a SHA-pinned source build is |
| 39 | + # deterministic and depends on no third-party action. |
| 40 | + - name: Build & install Idris2 0.8.0 from pinned source |
| 41 | + run: | |
| 42 | + set -euo pipefail |
| 43 | + sudo apt-get update -qq |
| 44 | + sudo apt-get install -y --no-install-recommends chezscheme make gcc libgmp-dev |
| 45 | + git clone --no-checkout https://github.com/idris-lang/Idris2.git /tmp/Idris2 |
| 46 | + git -C /tmp/Idris2 checkout 15a3e4e70843f7a34100f6470c04b791330788df |
| 47 | + make -C /tmp/Idris2 bootstrap SCHEME=chezscheme |
| 48 | + make -C /tmp/Idris2 install PREFIX="$HOME/.idris2" |
| 49 | + echo "$HOME/.idris2/bin" >> "$GITHUB_PATH" |
| 50 | + echo "IDRIS2_PREFIX=$HOME/.idris2" >> "$GITHUB_ENV" |
| 51 | +
|
| 52 | + - name: Proof-escape audit (no believe_me / postulate / assert_* / sorry) |
| 53 | + run: | |
| 54 | + set -euo pipefail |
| 55 | + files="verification/proofs/Lattice/Order.idr" |
| 56 | + if grep -nE '\b(believe_me|really_believe_me|assert_total|assert_smaller|idris_crash|postulate|sorry)\b' \ |
| 57 | + $files | grep -vE ':\s*(--|\|\|\|)' ; then |
| 58 | + echo "::error::proof-escape symbol found in the corpus" |
| 59 | + exit 1 |
| 60 | + fi |
| 61 | + echo "OK: zero proof-escape symbols outside comments" |
| 62 | +
|
| 63 | + - name: Build the proof corpus |
| 64 | + run: | |
| 65 | + set -euo pipefail |
| 66 | + idris2 --version |
| 67 | + cd verification/proofs && idris2 --build git-reticulator-proofs.ipkg |
0 commit comments