Skip to content

Commit

Permalink
feat: add hivetests profile (paradigmxyz#4833)
Browse files Browse the repository at this point in the history
  • Loading branch information
Rjected authored Sep 28, 2023
1 parent b85aa94 commit 216effd
Show file tree
Hide file tree
Showing 3 changed files with 12 additions and 1 deletion.
1 change: 1 addition & 0 deletions .github/workflows/hive.yml
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down
6 changes: 6 additions & 0 deletions Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -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"
Expand Down
6 changes: 5 additions & 1 deletion Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -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-* ./
Expand Down

0 comments on commit 216effd

Please sign in to comment.