-
Notifications
You must be signed in to change notification settings - Fork 5
140 lines (128 loc) · 4.65 KB
/
Copy pathci.yml
File metadata and controls
140 lines (128 loc) · 4.65 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
# SPDX-License-Identifier: Apache-2.0
#
# Merge-gate pipeline (specs.md §15). Every job below must pass for a PR to
# merge. The pipeline is pinned to the project toolchain (the stable channel in
# rust-toolchain.toml) for determinism; post-pivot there is no nightly-only
# proving substrate. Golden-parity (export harness) gates are wired by their own
# issues (backlog M2/M7).
name: CI
on:
pull_request:
push:
branches: [main]
permissions:
contents: read
# Cancel superseded runs on the same ref to keep the queue short.
concurrency:
group: ci-${{ github.workflow }}-${{ github.ref }}
cancel-in-progress: true
env:
CARGO_TERM_COLOR: always
# Pinned project toolchain (must match rust-toolchain.toml).
TOOLCHAIN: "stable"
jobs:
format:
name: Format (cargo fmt --check)
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
- uses: dtolnay/rust-toolchain@master
with:
toolchain: "stable"
components: rustfmt
- run: cargo fmt --all -- --check
clippy:
name: Lint (clippy -D warnings)
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
- uses: dtolnay/rust-toolchain@master
with:
toolchain: "stable"
components: clippy
- uses: Swatinem/rust-cache@v2
- run: cargo clippy --all-targets --all-features --locked -- -D warnings
test:
name: Tests
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
- uses: dtolnay/rust-toolchain@master
with:
toolchain: "stable"
- uses: Swatinem/rust-cache@v2
- run: cargo test --workspace --all-features --locked
no-std:
name: no_std verifier build
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
- uses: dtolnay/rust-toolchain@master
with:
toolchain: "stable"
- uses: Swatinem/rust-cache@v2
# Canonical gate (specs.md §11.2): the verifier chain compiles with no
# default features and no floating point. Post-pivot pwm-core and
# pwm-verifier are #![no_std] with only blake2 (no_std) as a dependency, so
# the no_std contract holds without any proving substrate.
- run: cargo build -p pwm-verifier --no-default-features --locked
- run: cargo build -p pwm-core --no-default-features --locked
docs:
name: Doc build + link check
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
- uses: dtolnay/rust-toolchain@master
with:
toolchain: "stable"
- uses: Swatinem/rust-cache@v2
# rustdoc for the public API; -D warnings fails on broken intra-doc links.
- run: cargo doc --workspace --no-deps --locked
env:
RUSTDOCFLAGS: "-D warnings"
# Internal cross-reference check across the docs corpus (file + anchor).
- name: Internal link check (docs/)
run: python3 ci/check-links.py
# Python<->Rust canonical-encoding parity (the export-side commitment bridge).
- name: Export canonical parity (Python vs Rust)
run: python3 crates/pwm-export/python/tests/test_canonical_parity.py
# Export pipeline (E-201/202/203/208) on synthetic le-wm-shaped data (NumPy).
- name: Export pipeline (ingest/quantize/fold/bundle)
run: |
python3 -m pip install --quiet numpy
python3 crates/pwm-export/python/tests/test_export_pipeline.py
license:
name: License / SPDX
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
- name: SPDX header check
run: bash ci/check-spdx.sh
- name: cargo-deny (licenses)
uses: EmbarkStudios/cargo-deny-action@v2
with:
command: check licenses
mutation:
name: Constraint mutation (scoped)
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
- uses: dtolnay/rust-toolchain@master
with:
toolchain: "stable"
- uses: Swatinem/rust-cache@v2
# Skeleton scope: the runner evaluates every registered campaign (only the
# empty campaign exists yet) and exits non-zero on a survivor or a score
# below target (INV-TEST-05). Components register real campaigns as they land.
- run: cargo run -p pwm-testkit --bin mutation_runner --locked
lean:
name: Lean soundness proofs (D-805)
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
# Builds the argmin uniqueness proof + the Freivalds probability bound.
# lean-action installs elan from lean/lean-toolchain and fetches the prebuilt
# Mathlib cache (`lake exe cache get`) before `lake build` — no Mathlib rebuild.
- uses: leanprover/lean-action@v1
with:
lake-package-directory: "lean"