-
Notifications
You must be signed in to change notification settings - Fork 2
365 lines (351 loc) · 15 KB
/
Copy pathformal-governance.yml
File metadata and controls
365 lines (351 loc) · 15 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
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
292
293
294
295
296
297
298
299
300
301
302
303
304
305
306
307
308
309
310
311
312
313
314
315
316
317
318
319
320
321
322
323
324
325
326
327
328
329
330
331
332
333
334
335
336
337
338
339
340
341
342
343
344
345
346
347
348
349
350
351
352
353
354
355
356
357
358
359
360
361
362
363
364
365
name: Gate A
on:
push:
branches: [main]
pull_request:
merge_group:
permissions:
contents: read
env:
CARGO_BUILD_JOBS: "2"
RUST_VERSION: 1.97.1
RUSTUP_TOOLCHAIN: 1.97.1
ACTIONLINT_VERSION: 1.7.12
ACTIONLINT_LINUX_SHA256: 8aca8db96f1b94770f1b0d72b6dddcb1ebb8123cb3712530b08cc387b349a3d8
VERUS_VERSION: 0.2026.08.09.92f466f
VERUS_LINUX_SHA256: 2f5a41c553f424aacdd732339e9d125563716a0b003c27730f75d6f81a282cef
PERITUS_PROOF_IMPACT_BASE: ${{ github.event.pull_request.base.sha || github.event.merge_group.base_sha || github.event.before }}
jobs:
bootstrap:
name: Candidate bootstrap
runs-on: ubuntu-24.04
timeout-minutes: 5
steps:
- name: Check out candidate revision
uses: actions/checkout@3d3c42e5aac5ba805825da76410c181273ba90b1 # v7.0.1
with:
repository: ${{ github.repository }}
ref: ${{ github.sha }}
path: candidate
fetch-depth: 0
persist-credentials: false
- name: Verify candidate pre-Cargo policy
shell: bash
run: git -C candidate diff --no-ext-diff --no-textconv --exit-code 6ca5f56d2ab12e93f155d684b33f4a86c2f877b8 -- .cargo/config.toml .gitattributes
policy:
name: Candidate policy
needs: bootstrap
runs-on: ubuntu-24.04
timeout-minutes: 10
steps:
- name: Check out candidate revision
uses: actions/checkout@3d3c42e5aac5ba805825da76410c181273ba90b1 # v7.0.1
with:
repository: ${{ github.repository }}
ref: ${{ github.sha }}
path: candidate
fetch-depth: 0
persist-credentials: false
- name: Verify candidate pre-Cargo policy
shell: bash
run: git -C candidate diff --no-ext-diff --no-textconv --exit-code 6ca5f56d2ab12e93f155d684b33f4a86c2f877b8 -- .cargo/config.toml .gitattributes
- name: Install pinned Rust
uses: dtolnay/rust-toolchain@6c977a6ca4077a0ceb28ffbe03f59d46e9ac8772 # v1
env:
RUSTUP_MAX_RETRIES: "10"
with:
toolchain: ${{ env.RUST_VERSION }}
- name: Evaluate candidate policy
working-directory: candidate
run: cargo +1.97.1 run --locked --package xtask -- all
workflow-lint:
name: Workflow lint
needs: policy
runs-on: ubuntu-24.04
timeout-minutes: 10
steps:
- name: Check out candidate revision
uses: actions/checkout@3d3c42e5aac5ba805825da76410c181273ba90b1 # v7.0.1
with:
repository: ${{ github.repository }}
ref: ${{ github.sha }}
path: candidate
fetch-depth: 0
persist-credentials: false
- name: Install digest-checked actionlint archive
shell: bash
run: |
set -euo pipefail
archive="$RUNNER_TEMP/actionlint.tar.gz"
install_root="$RUNNER_TEMP/peritus-actionlint"
curl --fail --location --retry 3 \
--output "$archive" \
"https://github.com/rhysd/actionlint/releases/download/v$ACTIONLINT_VERSION/actionlint_${ACTIONLINT_VERSION}_linux_amd64.tar.gz"
printf '%s %s\n' "$ACTIONLINT_LINUX_SHA256" "$archive" | sha256sum --check --strict
mkdir -p "$install_root"
tar -xzf "$archive" -C "$install_root" actionlint
printf '%s\n' "$install_root" >> "$GITHUB_PATH"
- name: Lint every workflow
working-directory: candidate
run: actionlint -config-file .github/actionlint.yaml
rust-format:
name: Rust format source
needs: policy
runs-on: ubuntu-24.04
timeout-minutes: 10
steps:
- name: Check out candidate revision
uses: actions/checkout@3d3c42e5aac5ba805825da76410c181273ba90b1 # v7.0.1
with:
repository: ${{ github.repository }}
ref: ${{ github.sha }}
path: candidate
fetch-depth: 0
persist-credentials: false
- name: Verify candidate pre-Cargo policy
shell: bash
run: git -C candidate diff --no-ext-diff --no-textconv --exit-code 6ca5f56d2ab12e93f155d684b33f4a86c2f877b8 -- .cargo/config.toml .gitattributes
- name: Install pinned Rust
uses: dtolnay/rust-toolchain@6c977a6ca4077a0ceb28ffbe03f59d46e9ac8772 # v1
env:
RUSTUP_MAX_RETRIES: "10"
with:
toolchain: ${{ env.RUST_VERSION }}
components: rustfmt
- name: Check formatting
working-directory: candidate
run: cargo run --locked --package xtask -- format-check
rust-shards:
name: Rust shard ${{ matrix.operation }} ${{ matrix.shard }} (${{ matrix.os }})
needs: policy
strategy:
fail-fast: false
matrix:
os: [ubuntu-24.04, macos-15, windows-2025]
operation: [build, test, doc-test, clippy, docs]
shard: [foundation-state, runtime-tools, model-orchestration, app-runner, app-shell, testing, testing-platform, testing-external, edge]
include:
- { os: ubuntu-24.04, operation: test-platform-terminal-interactive, shard: testing-platform }
- { os: ubuntu-24.04, operation: test-platform-terminal-signal, shard: testing-platform }
- { os: ubuntu-24.04, operation: test-platform-terminal-cancel, shard: testing-platform }
- { os: macos-15, operation: test-platform-terminal-interactive, shard: testing-platform }
- { os: macos-15, operation: test-platform-terminal-signal, shard: testing-platform }
- { os: macos-15, operation: test-platform-terminal-cancel, shard: testing-platform }
- { os: windows-2025, operation: test-platform-terminal-interactive, shard: testing-platform }
- { os: windows-2025, operation: test-platform-terminal-signal, shard: testing-platform }
- { os: windows-2025, operation: test-platform-terminal-cancel, shard: testing-platform }
- { os: ubuntu-24.04, operation: test-runner-recovery, shard: app-runner }
- { os: ubuntu-24.04, operation: test-runner-product, shard: app-runner }
- { os: macos-15, operation: test-runner-recovery, shard: app-runner }
- { os: macos-15, operation: test-runner-product, shard: app-runner }
- { os: windows-2025, operation: test-runner-recovery, shard: app-runner }
- { os: windows-2025, operation: test-runner-product, shard: app-runner }
- { os: ubuntu-24.04, operation: test-daemon, shard: app-shell }
- { os: macos-15, operation: test-daemon, shard: app-shell }
- { os: windows-2025, operation: test-daemon, shard: app-shell }
- { os: windows-2025, operation: test-daemon-product, shard: app-shell }
- { os: windows-2025, operation: test-daemon-cancellation, shard: app-shell }
- { os: windows-2025, operation: test-daemon-continuation, shard: app-shell }
- { os: windows-2025, operation: test-daemon-interaction, shard: app-shell }
- { os: windows-2025, operation: test-daemon-folder, shard: app-shell }
- { os: windows-2025, operation: test-daemon-workbench, shard: app-shell }
- { os: windows-2025, operation: test-daemon-checkpoints, shard: app-shell }
- { os: windows-2025, operation: test-daemon-models, shard: app-shell }
- { os: windows-2025, operation: test-daemon-library, shard: app-shell }
- { os: windows-2025, operation: test-daemon-review, shard: app-shell }
- { os: windows-2025, operation: test-daemon-rewinds, shard: app-shell }
runs-on: ${{ matrix.os }}
timeout-minutes: 15
steps:
- name: Check out candidate revision
uses: actions/checkout@3d3c42e5aac5ba805825da76410c181273ba90b1 # v7.0.1
with:
repository: ${{ github.repository }}
ref: ${{ github.sha }}
path: candidate
fetch-depth: 0
persist-credentials: false
- name: Verify candidate pre-Cargo policy
shell: bash
run: git -C candidate diff --no-ext-diff --no-textconv --exit-code 6ca5f56d2ab12e93f155d684b33f4a86c2f877b8 -- .cargo/config.toml .gitattributes
- name: Install pinned Rust
uses: dtolnay/rust-toolchain@6c977a6ca4077a0ceb28ffbe03f59d46e9ac8772 # v1
env:
RUSTUP_MAX_RETRIES: "10"
with:
toolchain: ${{ env.RUST_VERSION }}
components: clippy,rustfmt
- name: Run reviewed package shard
working-directory: candidate
run: cargo run --locked --target-dir target/xtask-bootstrap --package xtask -- ci-shard ${{ matrix.operation }} ${{ matrix.shard }}
rust:
name: Rust ${{ matrix.operation }} (${{ matrix.os }})
if: always()
needs: [rust-format, rust-shards]
strategy:
fail-fast: false
matrix:
os: [ubuntu-24.04, macos-15, windows-2025]
operation: [fmt, build, test, doc-test, clippy, docs]
runs-on: ubuntu-24.04
timeout-minutes: 5
steps:
- name: Require every Rust shard
shell: bash
env:
FORMAT_RESULT: ${{ needs.rust-format.result }}
SHARD_RESULT: ${{ needs.rust-shards.result }}
run: |
test "$FORMAT_RESULT" = success
test "$SHARD_RESULT" = success
supply-chain:
name: Supply chain
needs: policy
runs-on: ubuntu-24.04
timeout-minutes: 10
steps:
- name: Check out candidate revision
uses: actions/checkout@3d3c42e5aac5ba805825da76410c181273ba90b1 # v7.0.1
with:
repository: ${{ github.repository }}
ref: ${{ github.sha }}
path: candidate
fetch-depth: 0
persist-credentials: false
- name: Verify candidate pre-Cargo policy
shell: bash
run: git -C candidate diff --no-ext-diff --no-textconv --exit-code 6ca5f56d2ab12e93f155d684b33f4a86c2f877b8 -- .cargo/config.toml .gitattributes
- name: Install pinned Rust
uses: dtolnay/rust-toolchain@6c977a6ca4077a0ceb28ffbe03f59d46e9ac8772 # v1
env:
RUSTUP_MAX_RETRIES: "10"
with:
toolchain: ${{ env.RUST_VERSION }}
- name: Install pinned cargo-deny
working-directory: candidate
run: cargo install cargo-deny --version 0.20.2 --locked
- name: Check advisories, licenses, bans, and sources
working-directory: candidate
run: cargo deny --locked check
verus-policy:
name: Verus policy
needs: policy
runs-on: ubuntu-24.04
timeout-minutes: 10
steps:
- name: Check out candidate revision
uses: actions/checkout@3d3c42e5aac5ba805825da76410c181273ba90b1 # v7.0.1
with:
repository: ${{ github.repository }}
ref: ${{ github.sha }}
path: candidate
fetch-depth: 0
persist-credentials: false
- name: Verify candidate pre-Cargo policy
shell: bash
run: git -C candidate diff --no-ext-diff --no-textconv --exit-code 6ca5f56d2ab12e93f155d684b33f4a86c2f877b8 -- .cargo/config.toml .gitattributes
- name: Install pinned Rust
uses: dtolnay/rust-toolchain@6c977a6ca4077a0ceb28ffbe03f59d46e9ac8772 # v1
env:
RUSTUP_MAX_RETRIES: "10"
with:
toolchain: ${{ env.RUST_VERSION }}
- name: Install digest-checked Verus archive
shell: bash
run: |
set -euo pipefail
archive="$RUNNER_TEMP/verus.zip"
install_root="$RUNNER_TEMP/peritus-verus"
curl --fail --location --retry 3 \
--output "$archive" \
"https://github.com/verus-lang/verus/releases/download/release/$VERUS_VERSION/verus-$VERUS_VERSION-x86-linux.zip"
printf '%s %s\n' "$VERUS_LINUX_SHA256" "$archive" | sha256sum --check --strict
mkdir -p "$install_root"
unzip -q "$archive" -d "$install_root"
printf '%s\n' "$install_root/verus-x86-linux" >> "$GITHUB_PATH"
- name: Probe every pinned tool component
working-directory: candidate
run: cargo +1.97.1 run --locked --package xtask -- toolchain-check
- name: Enforce ordinary-Rust formal API contracts
working-directory: candidate
run: cargo +1.97.1 run --locked --package xtask -- ordinary-api-check
verus-shards:
name: Verus shard ${{ matrix.operation }} ${{ matrix.shard }}
needs: policy
strategy:
fail-fast: false
matrix:
operation: [verus-verify, verus-verify-strict, verus-build, verus-build-strict]
shard: [foundation-state, runtime-tools, model-orchestration, app-runner, app-shell, edge]
runs-on: ubuntu-24.04
timeout-minutes: 15
steps:
- name: Check out candidate revision
uses: actions/checkout@3d3c42e5aac5ba805825da76410c181273ba90b1 # v7.0.1
with:
repository: ${{ github.repository }}
ref: ${{ github.sha }}
path: candidate
fetch-depth: 0
persist-credentials: false
- name: Verify candidate pre-Cargo policy
shell: bash
run: git -C candidate diff --no-ext-diff --no-textconv --exit-code 6ca5f56d2ab12e93f155d684b33f4a86c2f877b8 -- .cargo/config.toml .gitattributes
- name: Install pinned Rust
uses: dtolnay/rust-toolchain@6c977a6ca4077a0ceb28ffbe03f59d46e9ac8772 # v1
env:
RUSTUP_MAX_RETRIES: "10"
with:
toolchain: ${{ env.RUST_VERSION }}
- name: Install digest-checked Verus archive
shell: bash
run: |
set -euo pipefail
archive="$RUNNER_TEMP/verus.zip"
install_root="$RUNNER_TEMP/peritus-verus"
curl --fail --location --retry 3 \
--output "$archive" \
"https://github.com/verus-lang/verus/releases/download/release/$VERUS_VERSION/verus-$VERUS_VERSION-x86-linux.zip"
printf '%s %s\n' "$VERUS_LINUX_SHA256" "$archive" | sha256sum --check --strict
mkdir -p "$install_root"
unzip -q "$archive" -d "$install_root"
printf '%s\n' "$install_root/verus-x86-linux" >> "$GITHUB_PATH"
- name: Run reviewed Verus package shard
working-directory: candidate
run: cargo +1.97.1 run --locked --package xtask -- ci-shard ${{ matrix.operation }} ${{ matrix.shard }}
verus:
name: Verus
if: always()
needs: [verus-policy, verus-shards]
runs-on: ubuntu-24.04
timeout-minutes: 5
steps:
- name: Require every Verus shard
shell: bash
env:
POLICY_RESULT: ${{ needs.verus-policy.result }}
SHARD_RESULT: ${{ needs.verus-shards.result }}
run: |
test "$POLICY_RESULT" = success
test "$SHARD_RESULT" = success
gate-a:
name: Gate A
if: always()
needs: [policy, workflow-lint, rust, supply-chain, verus]
runs-on: ubuntu-24.04
timeout-minutes: 5
steps:
- name: Require every Gate A job
shell: bash
env:
POLICY_RESULT: ${{ needs.policy.result }}
WORKFLOW_LINT_RESULT: ${{ needs.workflow-lint.result }}
RUST_RESULT: ${{ needs.rust.result }}
SUPPLY_CHAIN_RESULT: ${{ needs.supply-chain.result }}
VERUS_RESULT: ${{ needs.verus.result }}
run: |
test "$POLICY_RESULT" = success
test "$WORKFLOW_LINT_RESULT" = success
test "$RUST_RESULT" = success
test "$SUPPLY_CHAIN_RESULT" = success
test "$VERUS_RESULT" = success