-
Notifications
You must be signed in to change notification settings - Fork 39
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
build: drive binary build script #2031
base: feat/reproducibleBuilds
Are you sure you want to change the base?
Conversation
# Use the official Rust image based on Debian Bullseye 1.76-bullseye | ||
FROM rust@sha256:607b5e64b8d51f78ac5a37984e64f6493e9a7f90b605fa068be86ff035f48141 | ||
|
||
# Install necessary packages | ||
RUN apt-get update && apt-get install -y \ | ||
clang \ | ||
cmake \ | ||
git \ | ||
wget \ | ||
bash \ | ||
unzip \ | ||
&& if [[ "$TARGETARCH" == "arm64" ]] ; then apt-get install -y gcc-aarch64-linux-gnu; fi \ | ||
&& rm -rf /var/lib/apt/lists/* | ||
|
||
# Add Rust target | ||
RUN if [[ "$TARGETARCH" == "arm64" ]] ; then RUST_TARGET=aarch64-unknown-linux-gnu; else RUST_TARGET=x86_64-unknown-linux-gnu; fi; \ | ||
rustup target add ${RUST_TARGET} | ||
|
||
# Install protoc - protobuf compiler | ||
ARG PROTOC_VERSION="25.2" | ||
RUN if [[ "$TARGETARCH" == "arm64" ]] ; then export PROTOC_ARCH=aarch_64; else export PROTOC_ARCH=x86_64; fi; \ | ||
curl -Ls https://github.com/protocolbuffers/protobuf/releases/download/v${PROTOC_VERSION}/protoc-${PROTOC_VERSION}-linux-${PROTOC_ARCH}.zip \ | ||
-o /tmp/protoc.zip && \ | ||
unzip -qd /opt/protoc /tmp/protoc.zip && \ | ||
rm /tmp/protoc.zip && \ | ||
ln -s /opt/protoc/bin/protoc /usr/bin/ | ||
|
||
# Set the working directory inside the container | ||
WORKDIR /app |
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 is duplicative of this file no? https://github.com/dashpay/platform/blob/392934b6d881fb94f2ca8233f131fa3e12c31afb/packages/rs-drive-abci/Dockerfile.repro
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.
yeah, this is replacement
# TODO: I don't think it's a good idea | ||
overflow-checks = false | ||
lto = true | ||
# TODO: I don't think it's a good idea |
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.
justify?
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.
We are recovering panics in Drive ABCI
https://doc.rust-lang.org/book/ch09-01-unrecoverable-errors-with-panic.html
Issue being fixed or feature implemented
What was done?
How Has This Been Tested?
Breaking Changes
Checklist:
For repository code-owners and collaborators only