-
Notifications
You must be signed in to change notification settings - Fork 20
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
base: main
Are you sure you want to change the base?
Conversation
6fae7bb
to
cb9b9c8
Compare
@SozinM manually requesting you to review since Github won't let me request your review on your own PR |
@@ -100,8 +100,12 @@ jobs: | |||
run: | | |||
git config --global --add safe.directory "$(pwd)" | |||
. $HOME/.cargo/env | |||
cargo build --release --features=${{ matrix.features }} --target ${{ matrix.configs.target }} --package op-rbuilder | |||
|
|||
SOURCE_DATE_EPOCH=$(git log -1 --pretty=%ct) \ |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
not sure it will work
@@ -0,0 +1,33 @@ | |||
name: Verify Reproducible Build |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
i think the best idea is to run this on schedule once a week / couple of days for example
This way we will notice if something has broken repro builder, but won't wait for this to pass on every PR, because it will take a LOT of time
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I figured we were just going to run this manually whenever we have a release that we want to put in a new image. Every 3-4 days def wouldn't hurt though. I'll add that.
ARG FEATURES | ||
WORKDIR /app | ||
COPY . . | ||
RUN SOURCE_DATE_EPOCH=$(git log -1 --pretty=%ct) \ |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This will force docker to build this 2 times (and one of them would be slow build), let's do it better
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
What do you mean?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
You are compiling regular build + reproducible build
Doesn't really make sense, because you could separate them or use a flag to build one or the other.
This now inside the check we are running instead of compiling once we would compile both of the, and probably go from 2min -> 10min
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Ahh I see. That RUN command means that the builds are actually happening during docker build, not docker run. I can just add a --target flag to the PR workflow to force it to build only the non-reproducible. Does that solve the problem?
π Summary
From reth
https://github.com/paradigmxyz/reth/blob/f30016019d592e36b31b48feb8adf3292c04b626/Makefile#L83
π‘ Motivation and Context
β I have completed the following steps:
make lint
make test