mirror of
https://github.com/paradigmxyz/reth.git
synced 2026-02-19 03:04:27 -05:00
perf: build for target-cpu=x86-64-v3 in docker by default (#21761)
This commit is contained in:
6
.github/workflows/docker.yml
vendored
6
.github/workflows/docker.yml
vendored
@@ -100,5 +100,7 @@ jobs:
|
||||
targets: ${{ steps.params.outputs.targets }}
|
||||
push: ${{ !(github.event_name == 'workflow_dispatch' && inputs.dry_run) }}
|
||||
set: |
|
||||
ethereum.tags=${{ steps.params.outputs.ethereum_tags }}
|
||||
optimism.tags=${{ steps.params.outputs.optimism_tags }}
|
||||
ethereum-amd64.tags=${{ steps.params.outputs.ethereum_tags }}
|
||||
ethereum-arm64.tags=${{ steps.params.outputs.ethereum_tags }}
|
||||
optimism-amd64.tags=${{ steps.params.outputs.optimism_tags }}
|
||||
optimism-arm64.tags=${{ steps.params.outputs.optimism_tags }}
|
||||
|
||||
@@ -1,8 +1,4 @@
|
||||
// Docker Bake configuration for reth and op-reth images
|
||||
// Usage:
|
||||
// docker buildx bake ethereum # Build reth
|
||||
// docker buildx bake optimism # Build op-reth
|
||||
// docker buildx bake # Build all
|
||||
// Docker Bake configuration for reth images
|
||||
|
||||
variable "REGISTRY" {
|
||||
default = "ghcr.io/paradigmxyz"
|
||||
@@ -35,23 +31,35 @@ variable "VERGEN_GIT_DIRTY" {
|
||||
|
||||
// Common settings for all targets
|
||||
group "default" {
|
||||
targets = ["ethereum", "optimism"]
|
||||
targets = [
|
||||
"ethereum-amd64",
|
||||
"ethereum-arm64",
|
||||
"optimism-amd64",
|
||||
"optimism-arm64"
|
||||
]
|
||||
}
|
||||
|
||||
group "nightly" {
|
||||
targets = ["ethereum", "ethereum-profiling", "ethereum-edge-profiling", "optimism", "optimism-profiling"]
|
||||
targets = [
|
||||
"ethereum-amd64",
|
||||
"ethereum-arm64",
|
||||
"ethereum-profiling",
|
||||
"ethereum-edge-profiling",
|
||||
"optimism-amd64",
|
||||
"optimism-arm64",
|
||||
"optimism-profiling"
|
||||
]
|
||||
}
|
||||
|
||||
// Base target with shared configuration
|
||||
target "_base" {
|
||||
dockerfile = "Dockerfile.depot"
|
||||
platforms = ["linux/amd64", "linux/arm64"]
|
||||
args = {
|
||||
BUILD_PROFILE = "${BUILD_PROFILE}"
|
||||
FEATURES = "${FEATURES}"
|
||||
VERGEN_GIT_SHA = "${VERGEN_GIT_SHA}"
|
||||
BUILD_PROFILE = "${BUILD_PROFILE}"
|
||||
FEATURES = "${FEATURES}"
|
||||
VERGEN_GIT_SHA = "${VERGEN_GIT_SHA}"
|
||||
VERGEN_GIT_DESCRIBE = "${VERGEN_GIT_DESCRIBE}"
|
||||
VERGEN_GIT_DIRTY = "${VERGEN_GIT_DIRTY}"
|
||||
VERGEN_GIT_DIRTY = "${VERGEN_GIT_DIRTY}"
|
||||
}
|
||||
secret = [
|
||||
{
|
||||
@@ -60,14 +68,42 @@ target "_base" {
|
||||
}
|
||||
]
|
||||
}
|
||||
|
||||
// amd64 base with x86-64-v3 optimizations
|
||||
target "_base_amd64" {
|
||||
inherits = ["_base"]
|
||||
platforms = ["linux/amd64"]
|
||||
args = {
|
||||
# `x86-64-v3` features match the 2013 Intel Haswell architecture, excluding Intel-specific instructions;
|
||||
# see: https://en.wikipedia.org/wiki/X86-64
|
||||
#
|
||||
# `pclmulqdq` is required for rocksdb: https://github.com/rust-rocksdb/rust-rocksdb/issues/1069
|
||||
RUSTFLAGS = "-C target-cpu=x86-64-v3 -C target-feature=+pclmulqdq"
|
||||
}
|
||||
}
|
||||
|
||||
// arm64 base
|
||||
target "_base_arm64" {
|
||||
inherits = ["_base"]
|
||||
platforms = ["linux/arm64"]
|
||||
}
|
||||
|
||||
target "_base_profiling" {
|
||||
inherits = ["_base"]
|
||||
platforms = ["linux/amd64"]
|
||||
inherits = ["_base_amd64"]
|
||||
}
|
||||
|
||||
// Ethereum (reth)
|
||||
target "ethereum" {
|
||||
inherits = ["_base"]
|
||||
target "ethereum-amd64" {
|
||||
inherits = ["_base_amd64"]
|
||||
args = {
|
||||
BINARY = "reth"
|
||||
MANIFEST_PATH = "bin/reth"
|
||||
}
|
||||
tags = ["${REGISTRY}/reth:${TAG}"]
|
||||
}
|
||||
|
||||
target "ethereum-arm64" {
|
||||
inherits = ["_base_arm64"]
|
||||
args = {
|
||||
BINARY = "reth"
|
||||
MANIFEST_PATH = "bin/reth"
|
||||
@@ -98,8 +134,17 @@ target "ethereum-edge-profiling" {
|
||||
}
|
||||
|
||||
// Optimism (op-reth)
|
||||
target "optimism" {
|
||||
inherits = ["_base"]
|
||||
target "optimism-amd64" {
|
||||
inherits = ["_base_amd64"]
|
||||
args = {
|
||||
BINARY = "op-reth"
|
||||
MANIFEST_PATH = "crates/optimism/bin"
|
||||
}
|
||||
tags = ["${REGISTRY}/op-reth:${TAG}"]
|
||||
}
|
||||
|
||||
target "optimism-arm64" {
|
||||
inherits = ["_base_arm64"]
|
||||
args = {
|
||||
BINARY = "op-reth"
|
||||
MANIFEST_PATH = "crates/optimism/bin"
|
||||
|
||||
Reference in New Issue
Block a user