Skip to content

[Release] Make the Windows and macOS archives reproducible #266

Open

Description

@saworbit

Context

#242 made the Linux release archives reproducible: two builds of a commit give the same bytes. The Windows and macOS archives aren't, and docs/CI_CD_STRATEGY.md says to check them with the attestation instead.

What still varies, in .github/workflows/release-build.yml:

  • Windows: the MSVC linker writes a timestamp into the PE header unless it's given /Brepro. The zip is made with 7z a -tzip over freshly checked out files, so it records their checkout times.
  • macOS: not checked yet. The tar step already uses GNU tar with sorted names, fixed owners and the commit's time, so any difference would come from the binary.
  • Both: --remap-path-prefix is applied, but the cargo home is only remapped when CARGO_HOME is set in the form rustc sees.

Proposed

  • Windows: link with -C link-arg=/Brepro, and write the zip with every entry's time set to SOURCE_DATE_EPOCH, in sorted order.
  • macOS: build twice and compare. If the binaries differ, find out why.
  • Print each archive's checksum in the job log, as the Linux builds already do, so two dry runs can be compared.

Acceptance

  • Two dry runs of release-build.yml on the same commit give identical checksums for the Windows and macOS archives.
  • docs/CI_CD_STRATEGY.md, Reproducing a release, covers them, or says which one can't be made reproducible and why.

Activity

  1. added
    enhancement
    P3
    on Nov 16, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    P3buildenhancement

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions