feat: add hivetests profile (#4833)

This commit is contained in:
Dan Cline
2023-09-28 10:44:33 -04:00
committed by GitHub
parent b85aa94033
commit 216effd016
3 changed files with 12 additions and 1 deletions

View File

@ -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

View File

@ -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"

View File

@ -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-* ./