Repository navigation
111 lines (99 loc) · 3.98 KB
/
Copy pathrender-golden.yml
File metadata and controls
111 lines (99 loc) · 3.98 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
name: Registry Render golden gate
# The Render byte-stability gate: the three coequal example bundles must
# produce the exact golden hashes pinned in products/render/golden.json on
# BOTH operating systems. Any difference — Typst pin, lockfile (including
# the deflate stack, see products/render/EVIDENCE.md), bundle content, or
# platform-dependent layout — fails here and must be reviewed, never
# silenced. Invariant: cross-machine byte stability as promised by the
# product. Owner: the Render product. Removal condition: only if the
# Render Definition of Done deliberately narrows the byte-stability
# promise to same-machine reproducibility.
on:
pull_request:
paths:
- "crates/registry-render/**"
# The platform crates render links against: a change there can move
# bytes without touching any path above (path deps do not surface in
# Cargo.lock), so the cross-OS proof must run for them too.
- "crates/registry-platform-audit/**"
- "crates/registry-platform-authcommon/**"
- "crates/registry-platform-buildinfo/**"
- "crates/registry-platform-canonical-json/**"
- "crates/registry-platform-config/**"
- "crates/registry-platform-crypto/**"
- "crates/registry-platform-httpsec/**"
- "crates/registry-platform-testing/**"
- "crates/registry-platform-yaml/**"
- "products/render/**"
- "Cargo.lock"
- "Cargo.toml"
- ".github/workflows/render-golden.yml"
# GitHub offers no paths filter for merge_group, so a merge queue run is
# never skipped here.
merge_group:
types:
- checks_requested
push:
branches:
- main
# Keep this list equal to the pull_request paths above.
paths:
- "crates/registry-render/**"
- "crates/registry-platform-audit/**"
- "crates/registry-platform-authcommon/**"
- "crates/registry-platform-buildinfo/**"
- "crates/registry-platform-canonical-json/**"
- "crates/registry-platform-config/**"
- "crates/registry-platform-crypto/**"
- "crates/registry-platform-httpsec/**"
- "crates/registry-platform-testing/**"
- "crates/registry-platform-yaml/**"
- "products/render/**"
- "Cargo.lock"
- "Cargo.toml"
- ".github/workflows/render-golden.yml"
concurrency:
group: render-golden-${{ github.event_name == 'pull_request' && format('pr-{0}', github.event.pull_request.number) || format('run-{0}', github.run_id) }}
cancel-in-progress: ${{ github.event_name == 'pull_request' }}
permissions:
contents: read
env:
CARGO_TERM_COLOR: always
CARGO_INCREMENTAL: "0"
CARGO_PROFILE_DEV_DEBUG: "0"
CARGO_PROFILE_TEST_DEBUG: "0"
RUSTUP_TOOLCHAIN: "1.95.0"
jobs:
golden:
name: Golden hashes (${{ matrix.os }})
runs-on: ${{ matrix.os }}
strategy:
# Both OSes must report independently: one failing must not cancel
# the other's signal.
fail-fast: false
matrix:
os: [ubuntu-24.04, macos-26]
steps:
- name: Checkout
uses: actions/checkout@3d3c42e5aac5ba805825da76410c181273ba90b1
with:
persist-credentials: false
submodules: false
- name: Install Go for the AWS-LC-FIPS source build
uses: actions/setup-go@b7ad1dad31e06c5925ef5d2fc7ad053ef454303e # v7.0.0
with:
go-version: 1.27.2
cache: false
- name: Install pinned Rust toolchain
run: rustup toolchain install 1.95.0 --profile minimal
- name: Cache Cargo registry and build artifacts
uses: Swatinem/rust-cache@c8037a86dde8214a8310e9f54a8fc61ab362aa31 # v2
with:
key: render-golden-go-1.27.2-${{ matrix.os }}
save-if: ${{ github.ref == 'refs/heads/main' }}
- name: Golden and determinism tests
run: cargo test --locked -p registry-render --test golden
- name: Serve end-to-end tests
run: cargo test --locked -p registry-render --test serve
- name: Scaffold and CLI tests
run: cargo test --locked -p registry-render --test scaffold