-
Notifications
You must be signed in to change notification settings - Fork 24
Add reproducible builds #233
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
SozinM
wants to merge
9
commits into
main
Choose a base branch
from
msozin/make-release-reproducible
base: main
Could not load branches
Branch not found: {{ refName }}
Loading
Could not load tags
Nothing to show
Loading
Are you sure you want to change the base?
Some commits from the old base branch may be removed from the timeline,
and old review comments may become outdated.
+113
β3
Open
Changes from all commits
Commits
Show all changes
9 commits
Select commit
Hold shift + click to select a range
cb9b9c8
Add makefile command to create reproducible build
SozinM 6243492
Remove unnecessary "unknown" target vendor
alexhulbert 882e2ea
Docker + CI for reproducible builds
alexhulbert 8b4e153
Only build non-reproducible target on new PRs
alexhulbert 1ef7950
Merge branch 'main' of https://github.com/flashbots/op-rbuilder into β¦
alexhulbert 61c2af2
Unknown target is needed
alexhulbert 46e356b
Fetch git history for correct source date epoch
alexhulbert abf71d4
Force __TIME__ and __DATE_
alexhulbert f58cb33
Run reproducibility verification every three days
alexhulbert File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,37 @@ | ||
name: Verify Reproducible Build | ||
|
||
on: | ||
workflow_dispatch: | ||
schedule: | ||
- cron: "0 2 */3 * *" | ||
|
||
jobs: | ||
verify: | ||
name: Verify reproducible builds | ||
runs-on: ubuntu-latest | ||
steps: | ||
- uses: actions/checkout@v4 | ||
- uses: dtolnay/rust-toolchain@stable | ||
- name: Build twice and compare | ||
run: | | ||
export REPRO_FLAGS="--C target-feature=+crt-static -C link-arg=-static-libgcc -C link-arg=-Wl,--build-id=none -C metadata='' --remap-path-prefix=$(pwd)=." | ||
export SOURCE_DATE_EPOCH=$(git log -1 --pretty=%ct) | ||
|
||
RUSTFLAGS="$REPRO_FLAGS" CARGO_INCREMENTAL=0 LC_ALL=C TZ=UTC \ | ||
CFLAGS="-D__TIME__=\"\" -D__DATE__=\"\"" CXXFLAGS="-D__TIME__=\"\" -D__DATE__=\"\"" \ | ||
cargo build --release --locked -p op-rbuilder --target x86_64-unknown-linux-gnu | ||
mv target/x86_64-unknown-linux-gnu/release/op-rbuilder build1 | ||
|
||
cargo clean | ||
|
||
RUSTFLAGS="$REPRO_FLAGS" CARGO_INCREMENTAL=0 LC_ALL=C TZ=UTC \ | ||
CFLAGS="-D__TIME__=\"\" -D__DATE__=\"\"" CXXFLAGS="-D__TIME__=\"\" -D__DATE__=\"\"" \ | ||
cargo build --release --locked -p op-rbuilder --target x86_64-unknown-linux-gnu | ||
mv target/x86_64-unknown-linux-gnu/release/op-rbuilder build2 | ||
|
||
if cmp -s build1 build2; then | ||
echo "β Builds are reproducible" | ||
else | ||
echo "β Builds differ" | ||
exit 1 | ||
fi |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Uh oh!
There was an error while loading. Please reload this page.