From 216effd0169092dc69e4c1052430499593efe63b Mon Sep 17 00:00:00 2001 From: Dan Cline <6798349+Rjected@users.noreply.github.com> Date: Thu, 28 Sep 2023 10:44:33 -0400 Subject: [PATCH] feat: add hivetests profile (#4833) --- .github/workflows/hive.yml | 1 + Cargo.toml | 6 ++++++ Dockerfile | 6 +++++- 3 files changed, 12 insertions(+), 1 deletion(-) diff --git a/.github/workflows/hive.yml b/.github/workflows/hive.yml index 332f11be0..1abe4ed46 100644 --- a/.github/workflows/hive.yml +++ b/.github/workflows/hive.yml @@ -27,6 +27,7 @@ jobs: with: context: . tags: paradigmxyz/reth:main + build-args: BUILD_PROFILE=hivetests outputs: type=docker,dest=./artifacts/reth_image.tar cache-from: type=gha cache-to: type=gha,mode=max diff --git a/Cargo.toml b/Cargo.toml index b41f15120..fb42505a9 100644 --- a/Cargo.toml +++ b/Cargo.toml @@ -72,6 +72,12 @@ exclude = [".github/"] inherits = "release" debug = true +# Meant for testing - all optimizations, but with debug assertions and overflow +# checks +[profile.hivetests] +inherits = "test" +opt-level = 3 + [profile.maxperf] inherits = "release" lto = "fat" diff --git a/Dockerfile b/Dockerfile index dd35ce2d4..0a68f2e42 100644 --- a/Dockerfile +++ b/Dockerfile @@ -26,12 +26,16 @@ RUN cargo chef cook --profile $BUILD_PROFILE --recipe-path recipe.json COPY . . RUN cargo build --profile $BUILD_PROFILE --locked --bin reth +# ARG is not resolved in COPY so we have to hack around it by copying the +# binary to a temporary location +RUN cp /app/target/$BUILD_PROFILE/reth /app/reth + # Use Ubuntu as the release image FROM ubuntu AS runtime WORKDIR /app # Copy reth over from the build stage -COPY --from=builder /app/target/release/reth /usr/local/bin +COPY --from=builder /app/reth /usr/local/bin # Copy licenses COPY LICENSE-* ./