[fabrica] Layers and the verifiable build: the layers pipeline runs all five test layers on a NixOS runner with KVM, verify-nix rebuilds a tag and compares with its pin, the release publishes the Nix pin (ianitor-nix.json) under the signed SHA256SUMS; scripts for conformance, load and the pin; docs/verify.md
This commit is contained in:
@@ -0,0 +1,39 @@
|
||||
# Ianitor Domi: the five test layers (ROADMAP §5) on a push to main, or by hand. Layer 1 (the differential
|
||||
# suite against Caddy) runs inside the workspace tests; layer 2 is scripts/conformance.sh (h2spec, testssl.sh);
|
||||
# layer 3 tests/fuzz/run.sh (cargo-fuzz, 2 minutes a target; any crash fails); layer 4 the NixOS VM tests;
|
||||
# layer 5 scripts/bench.sh (load and a 5-minute soak against Caddy; results kept as artifacts).
|
||||
# Runner: label `nixos`, on a host with /dev/kvm and Nix's `kvm` system feature (the VM tests; on Hyper-V,
|
||||
# nested virtualisation on), outbound HTTPS (crates.io, cache.nixos.org) and about 20 GB free. Every tool comes
|
||||
# from the flake's `ci` shell, so the runner needs only Nix with flakes.
|
||||
name: layers
|
||||
on:
|
||||
push: [main]
|
||||
manual: true
|
||||
runner: nixos
|
||||
env:
|
||||
CARGO_TERM_COLOR: "never"
|
||||
CARGO_BUILD_JOBS: "8"
|
||||
steps:
|
||||
- id: workspace-tests
|
||||
run: nix --extra-experimental-features "nix-command flakes" develop .#ci -c cargo test --workspace --no-fail-fast
|
||||
- id: conformance
|
||||
needs: [workspace-tests]
|
||||
run: nix --extra-experimental-features "nix-command flakes" develop .#ci -c scripts/conformance.sh
|
||||
artifacts: ["bench/conformance/*"]
|
||||
- id: fuzz
|
||||
needs: [workspace-tests]
|
||||
run: nix --extra-experimental-features "nix-command flakes" develop .#ci -c tests/fuzz/run.sh 120
|
||||
- id: vm-apply-reverts
|
||||
nix: .#checks.x86_64-linux.vm-apply-reverts
|
||||
- id: vm-engine-switch
|
||||
nix: .#checks.x86_64-linux.vm-engine-switch
|
||||
- id: vm-intermediate-renewal
|
||||
nix: .#checks.x86_64-linux.vm-intermediate-renewal
|
||||
- id: vm-control-loopback
|
||||
nix: .#checks.x86_64-linux.vm-control-loopback
|
||||
- id: vm-sockets
|
||||
nix: .#checks.x86_64-linux.vm-sockets
|
||||
- id: load
|
||||
needs: [conformance, fuzz]
|
||||
run: nix --extra-experimental-features "nix-command flakes" develop .#ci -c scripts/bench.sh fabrica-runner
|
||||
artifacts: ["bench/results/**"]
|
||||
@@ -6,6 +6,9 @@
|
||||
# `notes` is Fabrica's release notes since the previous v* tag (Fabrica docs/12_release_kit.md); `shots` takes the
|
||||
# same files as `fabrica aula shots` (core docs/FORMATS.md, "Fabrica: the Aula page") from the built web UI against
|
||||
# the demo control plane with invented data, in headless Edge. No landing page while app.yaml has no `aula: true`.
|
||||
# `pin` publishes the Nix build's NAR hashes (.fabrica/nix/pin.json, written by scripts/nix-pin.sh on Linux and
|
||||
# committed before the tag) with the tag's commit as ianitor-nix.json, so SHA256SUMS also vouches for the build
|
||||
# anyone can repeat (docs/verify.md); the `verify-nix` pipeline rebuilds the tag on the NixOS runner and compares.
|
||||
name: release
|
||||
on:
|
||||
tag: "v*"
|
||||
@@ -29,8 +32,12 @@ steps:
|
||||
needs: [check, test]
|
||||
run: node apps/web/scripts/shots.mjs
|
||||
artifacts: ["target/aula/aula-*.png", "target/aula/aula.json"]
|
||||
- id: pin
|
||||
needs: [version]
|
||||
run: node scripts/release-pin.mjs ${{ version }} ${{ tag }} ${{ commit }}
|
||||
artifacts: ["target/nix/ianitor-nix.json"]
|
||||
- id: approve
|
||||
needs: [version, notes, shots]
|
||||
needs: [version, notes, shots, pin]
|
||||
approve: "Publish Ianitor ${{ tag }}: its notes and screenshots?"
|
||||
- id: publish
|
||||
needs: [approve]
|
||||
@@ -41,4 +48,5 @@ steps:
|
||||
- "**/release-notes.json"
|
||||
- "**/aula-*.png"
|
||||
- "**/aula.json"
|
||||
- "**/ianitor-nix.json"
|
||||
sums: domi-release
|
||||
|
||||
@@ -0,0 +1,17 @@
|
||||
# Ianitor Domi: the verifiable build (docs/verify.md). On a v* tag the NixOS runner builds .#ianitor and
|
||||
# .#ianitor-web from the tag (the run record keeps each output's store path and NAR hash), builds them again
|
||||
# from scratch, and compares with the pin the release publishes (.fabrica/nix/pin.json at the tag); any
|
||||
# difference fails the run. Runner: label `nixos`, Nix with flakes; no KVM needed.
|
||||
name: verify-nix
|
||||
on:
|
||||
tag: "v*"
|
||||
manual: true
|
||||
runner: nixos
|
||||
steps:
|
||||
- id: ianitor
|
||||
nix: .#ianitor
|
||||
- id: web
|
||||
nix: .#ianitor-web
|
||||
- id: pin
|
||||
needs: [ianitor, web]
|
||||
run: nix --extra-experimental-features "nix-command flakes" develop .#ci -c scripts/nix-pin.sh --check
|
||||
Reference in New Issue
Block a user