8000 WIP: [feat] reproducible build (with source_date_epoch) for source distribution by andife · Pull Request #6773 · onnx/onnx · GitHub
[go: up one dir, main page]
More Web Proxy on the site http://driver.im/
Skip to content

WIP: [feat] reproducible build (with source_date_epoch) for source distribution #6773

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Open
wants to merge 15 commits into
base: main
Choose a base branch
from

Conversation

andife
Copy link
Member
@andife andife commented Mar 8, 2025

Description

Motivation and Context

Signed-off-by: Andreas Fehlner <fehlner@arcor.de>
@andife andife requested a review from a team as a code owner March 8, 2025 06:42
@github-project-automation github-project-automation bot moved this to In progress in PR Tracker Mar 8, 2025
Copy link
codecov bot commented Mar 8, 2025

Codecov Report

All modified and coverable lines are covered by tests ✅

Project coverage is 56.49%. Comparing base (80a3812) to head (257da58).

✅ All tests successful. No failed tests found.

Additional details and impacted files
@@           Coverage Diff           @@
##             main    #6773   +/-   ##
=======================================
  Coverage   56.49%   56.49%           
=======================================
  Files         509      509           
  Lines       32724    32724           
  Branches     3097     3097           
=======================================
  Hits        18487    18487           
  Misses      13379    13379           
  Partials      858      858           

☔ View full report in Codecov by Sentry.
📢 Have feedback on the report? Share it here.

@andife andife added the run release CIs Use this label to trigger release tests in CI label Mar 8, 2025
Signed-off-by: Andreas Fehlner <fehlner@arcor.de>
Copy link
Contributor
@github-actions github-actions bot left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

You can commit the suggested changes from lintrunner.

andife and others added 9 commits March 10, 2025 05:31
Co-authored-by: github-actions[bot] <41898282+github-actions[bot]@users.noreply.github.com>
Signed-off-by: Andreas Fehlner <fehlner@arcor.de>
Co-authored-by: github-actions[bot] <41898282+github-actions[bot]@users.noreply.github.com>
Signed-off-by: Andreas Fehlner <fehlner@arcor.de>
Co-authored-by: github-actions[bot] <41898282+github-actions[bot]@users.noreply.github.com>
Signed-off-by: Andreas Fehlner <fehlner@arcor.de>
Co-authored-by: github-actions[bot] <41898282+github-actions[bot]@users.noreply.github.com>
Signed-off-by: Andreas Fehlner <fehlner@arcor.de>
Co-authored-by: github-actions[bot] <41898282+github-actions[bot]@users.noreply.github.com>
Signed-off-by: Andreas Fehlner <fehlner@arcor.de>
Co-authored-by: github-actions[bot] <41898282+github-actions[bot]@users.noreply.github.com>
Signed-off-by: Andreas Fehlner <fehlner@arcor.de>
Co-authored-by: github-actions[bot] <41898282+github-actions[bot]@users.noreply.github.com>
Signed-off-by: Andreas Fehlner <fehlner@arcor.de>
Co-authored-by: github-actions[bot] <41898282+github-actions[bot]@users.noreply.github.com>
Signed-off-by: Andreas Fehlner <fehlner@arcor.de>
@andife andife added run release CIs Use this label to trigger release tests in CI and removed run release CIs Use this label to trigger release tests in CI labels Mar 10, 2025
@andife andife added run release CIs Use this label to trigger release tests in CI and removed run release CIs Use this label to trigger release tests in CI labels May 1, 2025
@andife andife changed the title WIP: [feat] reproducible build (with source_date_epoch) WIP: [feat] reproducible build (with source_date_epoch) for source distribution May 3, 2025
github-merge-queue bot pushed a commit that referenced this pull request May 9, 2025
…inux) (#6947)

### Description
This pull request introduces the use of the SOURCE_DATE_EPOCH
environment variable to achieve reproducible builds on Linux systems.

The pull request modifies four files to introduce the SOURCE_DATE_EPOCH
environment variable for achieving reproducible builds on Linux. Key
changes include:

- Utilizing SOURCE_DATE_EPOCH in the workflow configuration files
(main.yml, release_linux.yml) to ensure consistent timestamps.
- Adding logic in the manylinux/entrypoint.sh script to handle the new
variable and print its value for transparency.
- Updating CMakeLists.txt to generate a reproducible build date based on
the environment variable. These changes improve build determinism and
align with reproducible build standards, enhancing security and
auditability.


### Motivation and Context
Reproducible builds are a critical aspect of supply chain security as
they:

- Detect tampering or unauthorized modifications during the build
process.
- Enhance transparency and trust by allowing verification that the
distributed binaries match the original source code.
- Mitigate risks of supply chain attacks by ensuring deterministic
builds.
- Simplify auditing and compliance processes for secure software
development practices.

This aligns with the ONNX project's commitment to improving build
integrity and overall security.


More information could be found at: https://reproducible-builds.org/

### Not part of the PR:
- Windows and Mac (planned for a later date)
- sou
7287
rce distribution (WIP: #6773)
- sboms to store the exact configuration of the pipeline, software
usw,...

### Results:


![440111518-c6422236-da2f-4048-8da1-c9ea9ec5899e](https://github.com/user-attachments/assets/c3434025-cade-4ab9-9b5e-52802d6fc20a)


https://github.com/onnx/onnx/actions/runs/14808925839
https://github.com/onnx/onnx/actions/runs/14808354973

are based on the same commits

The artifacts could be downloaded with:

_gh run download 14808354973 --repo onnx/onnx -D sc_14808354973_

#### Windows:


![grafik](https://github.com/user-attachments/assets/fc617b5c-47c7-4261-84bd-2beef5021b41)

![grafik](https://github.com/user-attachments/assets/ae21cb05-6af0-4314-8154-87adcc347f13)

#### Linux
`diffoscope --html 20250503_linux-310_x64.html
sc_v0_14808354973/wheels-linux-x64-3.10/onnx_weekly-1.19.0.dev20250503-cp310-cp310-manylinux_2_17_x86_64.manylinux2014_x86_64.whl
sc_v1_14808925839/wheels-linux-x64-3.10/onnx_weekly-1.19.0.dev20250503-cp310-cp310-manylinux_2_17_x86_64.manylinux2014_x86_64.whl`


![grafik](https://github.com/user-attachments/assets/546523ab-da58-4216-9dfe-549aa092dd15)

---------

Signed-off-by: Andreas Fehlner <fehlner@arcor.de>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
run release CIs Use this label to trigger release tests in CI
Projects
Status: In progress
Development

Successfully merging this pull request may close these issues.

1 participant
0