Skip to content

Commit 5034124

Browse files
committed
attempt #2
1 parent 0737d7b commit 5034124

File tree

4 files changed

+20
-6
lines changed

4 files changed

+20
-6
lines changed

.github/workflows/release.yml

Lines changed: 6 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -43,14 +43,17 @@ jobs:
4343
- target: aarch64-unknown-linux-gnu
4444
os: ubuntu-20.04
4545
profile: maxperf
46+
- target: x86_64-apple-darwin
47+
os: macos-13
48+
profile: maxperf
4649
- target: aarch64-apple-darwin
4750
os: macos-14
4851
profile: maxperf
4952
- target: x86_64-pc-windows-gnu
5053
os: ubuntu-20.04
5154
profile: maxperf
5255
build:
53-
- command: build-node
56+
- command: cross-build
5457
binary: world-chain-builder
5558
features: jemalloc
5659
steps:
@@ -136,8 +139,8 @@ jobs:
136139
- name: Build and push
137140
uses: docker/build-push-action@v5
138141
with:
139-
context: world-chain-builder
140-
file: Dockerfile
142+
context: .
143+
file: world-chain-builder/Dockerfile
141144
push: true
142145
tags: ${{ steps.meta.outputs.tags }}
143146
labels: ${{ steps.meta.outputs.labels }}

Justfile

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -20,7 +20,8 @@ e2e-test:
2020
build:
2121
@just ./devnet/build
2222

23-
build-node *args='':
23+
# Cross compiles the world-chain-builder on a specified target
24+
cross-build *args='':
2425
@just ./world-chain-builder/build $@
2526

2627
# Tests the world-chain-builder

world-chain-builder/Cross.toml

Lines changed: 10 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,10 @@
1+
[build]
2+
pre-build = [
3+
# rust-bindgen dependencies: llvm-dev libclang-dev (>= 5.0) clang (>= 5.0)
4+
"apt-get update && apt-get install --assume-yes --no-install-recommends llvm-dev libclang-6.0-dev clang-6.0"
5+
]
6+
7+
[build.env]
8+
passthrough = [
9+
"JEMALLOC_SYS_WITH_LG_PAGE",
10+
]

world-chain-builder/Justfile

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -4,8 +4,8 @@ set positional-arguments
44
test:
55
cargo nextest run --workspace
66

7-
build *args='':
8-
RUSTFLAGS="-C target-cpu=native" cargo build $@
7+
cross-build *args='':
8+
RUSTFLAGS="-C link-arg=-lgcc -Clink-arg=-static-libgcc" cross-build $@
99

1010
# Formats the world-chain-builder
1111
fmt: fmt-fix fmt-check

0 commit comments

Comments
 (0)