Reproducible release build: scripts/build-release.ps1, and a workflow that builds and attests victory.exe #872
No reviewers
Labels
No labels
AMD
audio
bug
confirmed
crash
cutscene
dlss
documentation
duplicate
enhancement
fixed-on-main
frame-generation
good first issue
help wanted
input
INTEL
invalid
lighting
linux-proton
memory
needs-info
needs-logs
needs-rebase
NVIDIA
performance
pr-diagnostics
pr-docs
pr-feature
pr-fix
pr-performance
pr-refactor
pr-tests
question
RAYTRACING
rendering
report
series-s
shaders
spam
startup
upstream
wontfix
No milestone
No assignees
1 participant
Notifications
Due date
No due date set.
Dependencies
No dependencies set
Reference
github/trustno1-coder--VIctory-NVIDIA!872
Loading…
Reference in a new issue
No description provided.
Delete branch "github-bot/gh-872"
Deleting a branch is permanent. Although the deleted branch may continue to exist for a short time before it actually gets removed, it CANNOT be undone in most cases. Continue?
@jptorres96 on GitHub · 2026-11-28 08:18 UTC · original
jptorres96:reproducible-release→main· +143 −0 · 3 files · 1 commits · openReleases that can be checked against the source. The release notes give the commit and a SHA-256, but building that commit does not give that SHA-256: on
48ad785, two checkouts on one PC and the release came out as three different hashes. The exe also carries the builder's checkout path, user folder included (env!("CARGO_MANIFEST_DIR")in victory-core, victory-pipeline and the shader build script).scripts/build-release.ps1: builds from asubstdrive (V:\) so every build sees the same paths, remaps cargo's registry, and links with/Breproand/PDBALTPATH(no timestamp, no random PDB GUID). It writesdist/victory.exeandvictory.exe.sha256, and prints the commit, rustc and MSVC versions to publish with the hash..github/workflows/release.yml: on av*tag (or by hand), builds with that script on a GitHub runner, signs a build provenance attestation, and attaches the exe and its hash to the tag's release (a draft if there is none).gh attestation verify victory.exe --repo trustno1-coder/VIctory-NVIDIAthen shows which commit and workflow built a download.Checked on Windows (rustc 1.98.1, MSVC 14.42.34433): at
48ad785, two checkouts in different folders built to the same SHA-256 with this recipe; at this branch's head,scripts/build-release.ps1run in two checkouts gave the same55EB502D…E318. Matching bytes across PCs also needs the same MSVC tools, which is why the script prints them.Actions shows no runs on this repository, so it may need enabling (Settings → Actions) for the workflow to run. No runtime code changes.
@ANDREANIADS on GitHub · 2026-11-28 21:21 UTC · original · edited 2026-11-28 21:34 UTC
One compatibility case for
scripts/build-release.ps1at6154310: a space inCARGO_HOMEsplits the remap argument before compilation. With a dependency-free library, Cargo/rustc 1.98.1 on Linux andcargo check --release --offline --target x86_64-pc-windows-msvc, the script’s space-joined flags passed withCargoHome(exit 0) and failed withCargo Home(exit 101:--remap-path-prefix must contain '=' between FROM and TO). With the same spaced path and the same arguments joined with ASCII 31 inCARGO_ENCODED_RUSTFLAGS, the check passed (exit 0).Suggested fix: keep each rustc argument separate (including
-Cand its value), join with[char]31, and restore the previous encoded environment value infinally. This checks Cargo argument handling only. I did not run the Windows release script, link an EXE, or compare release hashes.A second offline check on 1.98.1 showed that even an explicitly empty
CARGO_ENCODED_RUSTFLAGSsuppressesRUSTFLAGS. A library requiring--cfg recipe_markerpassed with that marker inRUSTFLAGSalone. With the encoded variable empty the marker was absent; with an encoded user marker only the user marker reached rustc. Passing the recipe marker in the encoded variable passed again. For reproducible builds, set the encoded recipe in the Cargo child environment and reject conflicting caller flags up front, leaving the caller’s environment intact.View command line instructions
Manual merge helper
Use this merge commit message when completing the merge manually.
Checkout
From your project repository, check out a new branch and test the changes.Merge
Merge the changes and update on Forgejo.