|
| 1 | +# SPDX-License-Identifier: PMPL-1.0-or-later |
| 2 | +# Copyright (c) 2026 Jonathan D.A. Jewell (hyperpolymath) <j.d.a.jewell@open.ac.uk> |
| 3 | +# |
| 4 | +# parse-gate.yml — Gates the trusted String->Statement parser |
| 5 | +# (`vcltotal-parse`, P5a of #25 reinforcing the verified-corpus |
| 6 | +# boundary). vcl-ut is the doubly-trusted hypatia<->verisim interface, |
| 7 | +# so the boundary parser must stay panic-free / total: clippy's |
| 8 | +# SPARK-grade lint set (no unsafe / unwrap / expect / panic / indexing / |
| 9 | +# unchecked arithmetic) is a HARD gate, and the proptest panic-free |
| 10 | +# invariant must pass. Tracked: hyperpolymath/standards#124, vcl-ut#25. |
| 11 | + |
| 12 | +name: Parse Gate |
| 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 | + parse-gate: |
| 29 | + name: vcltotal-parse — panic-free / clippy / tests |
| 30 | + runs-on: ubuntu-latest |
| 31 | + |
| 32 | + steps: |
| 33 | + - name: Checkout repository |
| 34 | + uses: actions/checkout@de0fac2e4500dabe0009e67214ff5f5447ce83dd # v6.0.2 |
| 35 | + |
| 36 | + # rustup is preinstalled on ubuntu-latest; no third-party action |
| 37 | + # (avoids the action-pinning / deprecated-cache hazards). |
| 38 | + - name: Pin toolchain + components |
| 39 | + run: | |
| 40 | + set -euo pipefail |
| 41 | + rustup show active-toolchain || rustup default stable |
| 42 | + rustup component add clippy |
| 43 | + cargo --version && cargo clippy --version |
| 44 | +
|
| 45 | + # `vcltotal-parse` is its own workspace root (see its Cargo.toml). |
| 46 | + # Operate via its manifest path so CI never traverses the parent |
| 47 | + # virtual workspace (whose pre-existing `src/interface` member has |
| 48 | + # an external path-dep that does not resolve in a standalone |
| 49 | + # checkout). Self-contained: no external path-deps here. |
| 50 | + - name: Clippy — SPARK-grade lint set as a hard gate |
| 51 | + run: | |
| 52 | + set -euo pipefail |
| 53 | + cargo clippy --manifest-path src/interface/parse/Cargo.toml \ |
| 54 | + --all-targets --locked -- -D warnings |
| 55 | +
|
| 56 | + - name: Tests + panic-free proptest invariant |
| 57 | + run: | |
| 58 | + set -euo pipefail |
| 59 | + cargo test --manifest-path src/interface/parse/Cargo.toml --locked |
0 commit comments