forked from grandinetech/grandine
-
Notifications
You must be signed in to change notification settings - Fork 2
Expand file tree
/
Copy pathMakefile
More file actions
324 lines (254 loc) · 17.4 KB
/
Makefile
File metadata and controls
324 lines (254 loc) · 17.4 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
292
293
294
295
296
297
298
299
300
301
302
303
304
305
306
307
308
309
310
311
312
313
314
315
316
317
318
319
320
321
322
323
324
EXCLUDES = --workspace --exclude zkvm_host --exclude zkvm_guest_risc0 --exclude c_grandine --exclude csharp_grandine
FEATURES = --features default-networks
TARGET ?=
# build with metrics collection for core crates (transition_functions, helper_functions)
# e.g. make METRICS=1
ifeq ($(METRICS),1)
FEATURES := $(FEATURES) --features metrics
endif
# build without tracing support for core crates (transition_functions, helper_functions)
# e.g. make DISABLE_TRACING=1
DISABLE_TRACING ?= 0
ifeq ($(DISABLE_TRACING),0)
FEATURES := $(FEATURES) --features tracing
endif
.PHONY: all
all: build
.PHONY: clean
clean: clean-nethermind-plugin
cargo clean
rm -rf build
rm -rf bindings/c/build
.PHONY: check
check:
cargo check ${FEATURES} $(EXCLUDES)
.PHONY: build
build:
cargo build --release --bin grandine $(FEATURES) $(EXCLUDES)
.PHONY: download-spec-tests
download-spec-tests:
./scripts/download_spec_tests.sh
.PHONY: test
test: download-spec-tests
cargo test --release --features default-networks,stub-grandine-version $(EXCLUDES)
.PHONY: minimal
minimal:
cargo build --profile compact --bin grandine --features preset-minimal $(FEATURES) $(EXCLUDES)
.PHONY: release
release:
ifeq ($(TARGET),)
cargo build --profile compact --bin grandine $(FEATURES) $(EXCLUDES)
else
@make $(TARGET)
endif
# ------ GRANDINE LINUX X64 ------
.PHONY: x86_64-unknown-linux-gnu
x86_64-unknown-linux-gnu: ./target/x86_64-unknown-linux-gnu/compact/libgrandine.so ./target/x86_64-unknown-linux-gnu/compact/grandine
./target/x86_64-unknown-linux-gnu/compact/grandine:
cross build --bin grandine --target x86_64-unknown-linux-gnu $(FEATURES) --profile compact $(EXCLUDES)
./target/x86_64-unknown-linux-gnu/compact/libgrandine.so:
cross build -p c_grandine --profile compact --target x86_64-unknown-linux-gnu
# ------ GRANDINE LINUX ARM64 ------
.PHONY: aarch64-unknown-linux-gnu
aarch64-unknown-linux-gnu: ./target/aarch64-unknown-linux-gnu/compact/grandine ./target/aarch64-unknown-linux-gnu/compact/libgrandine.so
./target/aarch64-unknown-linux-gnu/compact/grandine:
cross build --bin grandine --target aarch64-unknown-linux-gnu $(FEATURES) --profile compact $(EXCLUDES)
./target/aarch64-unknown-linux-gnu/compact/libgrandine.so:
cross build -p c_grandine --profile compact --target aarch64-unknown-linux-gnu
# ------ GRANDINE WINDOWS X64 ------
.PHONY: x86_64-pc-windows-msvc
x86_64-pc-windows-msvc: ./target/x86_64-pc-windows-msvc/compact/grandine.exe ./target/x86_64-pc-windows-msvc/compact/grandine.dll
./target/x86_64-pc-windows-msvc/compact/grandine.exe:
cargo build --profile compact --bin grandine --target x86_64-pc-windows-msvc $(FEATURES) $(EXCLUDES)
./target/x86_64-pc-windows-msvc/compact/grandine.dll:
cargo build -p c_grandine --profile compact --target x86_64-pc-windows-msvc
# ------ GRANDINE MACOS X64 ------
.PHONY: x86_64-apple-darwin
x86_64-apple-darwin: ./target/x86_64-apple-darwin/compact/grandine ./target/x86_64-apple-darwin/compact/libgrandine.dylib
./target/x86_64-apple-darwin/compact/grandine:
cargo build --profile compact --bin grandine --target x86_64-apple-darwin $(FEATURES) $(EXCLUDES)
./target/x86_64-apple-darwin/compact/libgrandine.dylib:
cargo build -p c_grandine --profile compact --target x86_64-apple-darwin
# ------ GRANDINE MACOS ARM64 ------
.PHONY: aarch64-apple-darwin
aarch64-apple-darwin: ./target/aarch64-apple-darwin/compact/grandine ./target/aarch64-apple-darwin/compact/libgrandine.dylib
./target/aarch64-apple-darwin/compact/grandine:
cargo build --profile compact --bin grandine --target aarch64-apple-darwin $(FEATURES) $(EXCLUDES)
./target/aarch64-apple-darwin/compact/libgrandine.dylib:
cargo build -p c_grandine --profile compact --target aarch64-apple-darwin
# ------ GRANDINE-NETHERMIND INTEGRATION ------
NETHERMIND_VERSION ?= 1.36.2
# If empty, public authentication will happen. Public auth rate limits by ip address, so may fail unexpectedly.
GITHUB_TOKEN ?=
ifneq ($(GITHUB_TOKEN),)
NETHERMIND_DOWNLOAD_EXTRA_ARGS = --header "Authorization: Bearer $(GITHUB_TOKEN)"
endif
.PHONY: nethermind-plugin
nethermind-plugin: ./bindings/csharp/Grandine.NethermindPlugin/bin/Release/net10.0/Grandine.NethermindPlugin.dll
./bindings/csharp/Grandine.NethermindPlugin/bin/Release/net10.0/Grandine.NethermindPlugin.dll:
cd ./bindings/csharp && \
dotnet add ./Grandine.NethermindPlugin/Grandine.NethermindPlugin.csproj package Nethermind.ReferenceAssemblies --version $(NETHERMIND_VERSION) && \
dotnet publish -c Release \
/p:NethermindReferenceAssembliesVersion=$(NETHERMIND_VERSION) \
/p:NethermindReferenceAssembliesDir="$(CURDIR)/bindings/csharp/.nethermind-ref-assemblies/$(NETHERMIND_VERSION)"
.PHONY: clean-nethermind-plugin
clean-nethermind-plugin:
rm -rf bindings/csharp/Grandine.NethermindPlugin/bin
rm -rf bindings/csharp/Grandine.NethermindPlugin/obj
rm -rf bindings/csharp/generated
.PHONY: download-nethermind
download-nethermind:
@mkdir -p build
curl $(NETHERMIND_DOWNLOAD_EXTRA_ARGS) -s "https://api.github.com/repos/NethermindEth/nethermind/releases/tags/$(NETHERMIND_VERSION)" | \
jq -r --arg rid "$(RID)" '.assets[] | select(.name | endswith($$rid + ".zip")) | .browser_download_url' | \
xargs -r -n1 curl $(NETHERMIND_DOWNLOAD_EXTRA_ARGS) -L -o "build/nethermind-$(NETHERMIND_VERSION)-$(TARGET).zip"
.PHONY: pack-grandine-nethermind
pack-grandine-nethermind: ./build/grandine-$(GRANDINE_VERSION)-nethermind-$(NETHERMIND_VERSION)-linux-x64.zip ./build/grandine-$(GRANDINE_VERSION)-nethermind-$(NETHERMIND_VERSION)-linux-arm64.zip ./build/grandine-$(GRANDINE_VERSION)-nethermind-$(NETHERMIND_VERSION)-windows-x64.zip ./build/grandine-$(GRANDINE_VERSION)-nethermind-$(NETHERMIND_VERSION)-macos-x64.zip ./build/grandine-$(GRANDINE_VERSION)-nethermind-$(NETHERMIND_VERSION)-macos-arm64.zip
# ------ GRANDINE-NETHERMIND LINUX X64 ------
.PHONY: grandine-nethermind-linux-x64
grandine-nethermind-linux-x64: ./build/grandine-$(GRANDINE_VERSION)-nethermind-$(NETHERMIND_VERSION)-linux-x64.zip
./build/grandine-$(GRANDINE_VERSION)-nethermind-$(NETHERMIND_VERSION)-linux-x64: ./build/nethermind-$(NETHERMIND_VERSION)-x86_64-unknown-linux-gnu.zip ./target/x86_64-unknown-linux-gnu/compact/libgrandine.so ./bindings/csharp/Grandine.NethermindPlugin/bin/Release/net10.0/Grandine.NethermindPlugin.dll
unzip ./build/nethermind-$(NETHERMIND_VERSION)-x86_64-unknown-linux-gnu.zip -d ./build/grandine-$(GRANDINE_VERSION)-nethermind-$(NETHERMIND_VERSION)-linux-x64
cp ./target/x86_64-unknown-linux-gnu/compact/libgrandine.so ./build/grandine-$(GRANDINE_VERSION)-nethermind-$(NETHERMIND_VERSION)-linux-x64/plugins
cp ./bindings/csharp/Grandine.NethermindPlugin/bin/Release/net10.0/Grandine.NethermindPlugin.dll ./build/grandine-$(GRANDINE_VERSION)-nethermind-$(NETHERMIND_VERSION)-linux-x64/plugins
./build/grandine-$(GRANDINE_VERSION)-nethermind-$(NETHERMIND_VERSION)-linux-x64.zip: ./build/grandine-$(GRANDINE_VERSION)-nethermind-$(NETHERMIND_VERSION)-linux-x64
zip -r ./build/grandine-$(GRANDINE_VERSION)-nethermind-$(NETHERMIND_VERSION)-linux-x64.zip ./build/grandine-$(GRANDINE_VERSION)-nethermind-$(NETHERMIND_VERSION)-linux-x64/*
./build/nethermind-$(NETHERMIND_VERSION)-x86_64-unknown-linux-gnu.zip:
@make download-nethermind NETHERMIND_VERSION=$(NETHERMIND_VERSION) RID=linux-x64 TARGET=x86_64-unknown-linux-gnu
# ------ GRANDINE-NETHERMIND LINUX ARM64 ------
.PHONY: grandine-nethermind-linux-arm64
grandine-nethermind-linux-arm64: ./build/grandine-$(GRANDINE_VERSION)-nethermind-$(NETHERMIND_VERSION)-linux-arm64.zip
./build/grandine-$(GRANDINE_VERSION)-nethermind-$(NETHERMIND_VERSION)-linux-arm64: ./build/nethermind-$(NETHERMIND_VERSION)-aarch64-unknown-linux-gnu.zip ./target/aarch64-unknown-linux-gnu/compact/libgrandine.so ./bindings/csharp/Grandine.NethermindPlugin/bin/Release/net10.0/Grandine.NethermindPlugin.dll
unzip ./build/nethermind-$(NETHERMIND_VERSION)-aarch64-unknown-linux-gnu.zip -d ./build/grandine-$(GRANDINE_VERSION)-nethermind-$(NETHERMIND_VERSION)-linux-arm64
cp ./target/aarch64-unknown-linux-gnu/compact/libgrandine.so ./build/grandine-$(GRANDINE_VERSION)-nethermind-$(NETHERMIND_VERSION)-linux-arm64/plugins
cp ./bindings/csharp/Grandine.NethermindPlugin/bin/Release/net10.0/Grandine.NethermindPlugin.dll ./build/grandine-$(GRANDINE_VERSION)-nethermind-$(NETHERMIND_VERSION)-linux-arm64/plugins
./build/grandine-$(GRANDINE_VERSION)-nethermind-$(NETHERMIND_VERSION)-linux-arm64.zip: ./build/grandine-$(GRANDINE_VERSION)-nethermind-$(NETHERMIND_VERSION)-linux-arm64
zip -r ./build/grandine-$(GRANDINE_VERSION)-nethermind-$(NETHERMIND_VERSION)-linux-arm64.zip ./build/grandine-$(GRANDINE_VERSION)-nethermind-$(NETHERMIND_VERSION)-linux-arm64/*
./build/nethermind-$(NETHERMIND_VERSION)-aarch64-unknown-linux-gnu.zip:
@make download-nethermind NETHERMIND_VERSION=$(NETHERMIND_VERSION) RID=linux-arm64 TARGET=aarch64-unknown-linux-gnu
# ------ GRANDINE-NETHERMIND WINDOWS X64 ------
.PHONY: grandine-nethermind-windows-x64
grandine-nethermind-windows-x64: ./build/grandine-$(GRANDINE_VERSION)-nethermind-$(NETHERMIND_VERSION)-windows-x64.zip
./build/grandine-$(GRANDINE_VERSION)-nethermind-$(NETHERMIND_VERSION)-windows-x64: ./build/nethermind-$(NETHERMIND_VERSION)-x86_64-pc-windows-msvc.zip ./target/x86_64-pc-windows-msvc/compact/grandine.dll ./bindings/csharp/Grandine.NethermindPlugin/bin/Release/net10.0/Grandine.NethermindPlugin.dll
unzip ./build/nethermind-$(NETHERMIND_VERSION)-x86_64-pc-windows-msvc.zip -d ./build/grandine-$(GRANDINE_VERSION)-nethermind-$(NETHERMIND_VERSION)-windows-x64
cp ./target/x86_64-pc-windows-msvc/compact/grandine.dll ./build/grandine-$(GRANDINE_VERSION)-nethermind-$(NETHERMIND_VERSION)-windows-x64/plugins
cp ./bindings/csharp/Grandine.NethermindPlugin/bin/Release/net10.0/Grandine.NethermindPlugin.dll ./build/grandine-$(GRANDINE_VERSION)-nethermind-$(NETHERMIND_VERSION)-windows-x64/plugins
./build/grandine-$(GRANDINE_VERSION)-nethermind-$(NETHERMIND_VERSION)-windows-x64.zip: ./build/grandine-$(GRANDINE_VERSION)-nethermind-$(NETHERMIND_VERSION)-windows-x64
zip -r ./build/grandine-$(GRANDINE_VERSION)-nethermind-$(NETHERMIND_VERSION)-windows-x64.zip ./build/grandine-$(GRANDINE_VERSION)-nethermind-$(NETHERMIND_VERSION)-windows-x64/*
./build/nethermind-$(NETHERMIND_VERSION)-x86_64-pc-windows-msvc.zip:
@make download-nethermind NETHERMIND_VERSION=$(NETHERMIND_VERSION) RID=windows-x64 TARGET=x86_64-pc-windows-msvc
# ------ GRANDINE-NETHERMIND MACOS X64 ------
.PHONY: grandine-nethermind-macos-x64
grandine-nethermind-macos-x64: ./build/grandine-$(GRANDINE_VERSION)-nethermind-$(NETHERMIND_VERSION)-macos-x64.zip
./build/grandine-$(GRANDINE_VERSION)-nethermind-$(NETHERMIND_VERSION)-macos-x64: ./build/nethermind-$(NETHERMIND_VERSION)-x86_64-apple-darwin.zip ./target/x86_64-apple-darwin/compact/libgrandine.dylib ./bindings/csharp/Grandine.NethermindPlugin/bin/Release/net10.0/Grandine.NethermindPlugin.dll
unzip ./build/nethermind-$(NETHERMIND_VERSION)-x86_64-apple-darwin.zip -d ./build/grandine-$(GRANDINE_VERSION)-nethermind-$(NETHERMIND_VERSION)-macos-x64
cp ./target/x86_64-apple-darwin/compact/libgrandine.dylib ./build/grandine-$(GRANDINE_VERSION)-nethermind-$(NETHERMIND_VERSION)-macos-x64/plugins
cp ./bindings/csharp/Grandine.NethermindPlugin/bin/Release/net10.0/Grandine.NethermindPlugin.dll ./build/grandine-$(GRANDINE_VERSION)-nethermind-$(NETHERMIND_VERSION)-macos-x64/plugins
./build/grandine-$(GRANDINE_VERSION)-nethermind-$(NETHERMIND_VERSION)-macos-x64.zip: ./build/grandine-$(GRANDINE_VERSION)-nethermind-$(NETHERMIND_VERSION)-macos-x64
zip -r ./build/grandine-$(GRANDINE_VERSION)-nethermind-$(NETHERMIND_VERSION)-macos-x64.zip ./build/grandine-$(GRANDINE_VERSION)-nethermind-$(NETHERMIND_VERSION)-macos-x64/*
./build/nethermind-$(NETHERMIND_VERSION)-x86_64-apple-darwin.zip:
@make download-nethermind NETHERMIND_VERSION=$(NETHERMIND_VERSION) RID=macos-x64 TARGET=x86_64-apple-darwin
# ------ GRANDINE-NETHERMIND MACOS ARM64 ------
.PHONY: grandine-nethermind-macos-arm64
grandine-nethermind-macos-arm64: ./build/grandine-$(GRANDINE_VERSION)-nethermind-$(NETHERMIND_VERSION)-macos-arm64.zip
./build/grandine-$(GRANDINE_VERSION)-nethermind-$(NETHERMIND_VERSION)-macos-arm64: ./build/nethermind-$(NETHERMIND_VERSION)-aarch64-apple-darwin.zip ./target/aarch64-apple-darwin/compact/libgrandine.dylib ./bindings/csharp/Grandine.NethermindPlugin/bin/Release/net10.0/Grandine.NethermindPlugin.dll
unzip ./build/nethermind-$(NETHERMIND_VERSION)-aarch64-apple-darwin.zip -d ./build/grandine-$(GRANDINE_VERSION)-nethermind-$(NETHERMIND_VERSION)-macos-arm64
cp ./target/aarch64-apple-darwin/compact/libgrandine.dylib ./build/grandine-$(GRANDINE_VERSION)-nethermind-$(NETHERMIND_VERSION)-macos-arm64/plugins
cp ./bindings/csharp/Grandine.NethermindPlugin/bin/Release/net10.0/Grandine.NethermindPlugin.dll ./build/grandine-$(GRANDINE_VERSION)-nethermind-$(NETHERMIND_VERSION)-macos-arm64/plugins
./build/grandine-$(GRANDINE_VERSION)-nethermind-$(NETHERMIND_VERSION)-macos-arm64.zip: ./build/grandine-$(GRANDINE_VERSION)-nethermind-$(NETHERMIND_VERSION)-macos-arm64
zip -r ./build/grandine-$(GRANDINE_VERSION)-nethermind-$(NETHERMIND_VERSION)-macos-arm64.zip ./build/grandine-$(GRANDINE_VERSION)-nethermind-$(NETHERMIND_VERSION)-macos-arm64/*
./build/nethermind-$(NETHERMIND_VERSION)-aarch64-apple-darwin.zip:
@make download-nethermind NETHERMIND_VERSION=$(NETHERMIND_VERSION) RID=macos-arm64 TARGET=aarch64-apple-darwin
# ----- DOCKER -----
DOCKER_REPO ?= sifrai/grandine
DOCKER_LABEL ?=
DOCKER_SUFFIX ?=
ifneq ($(strip $(DOCKER_SUFFIX)),)
override DOCKER_SUFFIX := -$(DOCKER_SUFFIX)
endif
.PHONY: docker
docker: nethermind-docker grandine-docker
# ----- GRANDINE DOCKER -----
.PHONY: grandine-docker
grandine-docker: grandine-docker-arm64 grandine-docker-amd64
ifeq ($(DOCKER_LABEL),)
@echo "Failed to build docker image - please provide DOCKER_LABEL=, either 'stable' or 'unstable'"
@exit 1
endif
docker buildx imagetools create -t $(DOCKER_REPO):$(DOCKER_LABEL)$(DOCKER_SUFFIX) \
$(DOCKER_REPO):$(DOCKER_LABEL)-amd64$(DOCKER_SUFFIX) \
$(DOCKER_REPO):$(DOCKER_LABEL)-arm64$(DOCKER_SUFFIX)
ifeq ($(DOCKER_LABEL),stable)
docker buildx imagetools create -t $(DOCKER_REPO):$(GRANDINE_VERSION) \
$(DOCKER_REPO):$(DOCKER_LABEL)$(DOCKER_SUFFIX)
docker buildx imagetools create -t $(DOCKER_REPO):latest \
$(DOCKER_REPO):$(DOCKER_LABEL)$(DOCKER_SUFFIX)
endif
.PHONY: grandine-docker-arm64
grandine-docker-arm64: ./target/aarch64-unknown-linux-gnu/compact/grandine
ifeq ($(DOCKER_LABEL),)
@echo "Failed to build docker image - please provide DOCKER_LABEL=, either 'stable' or 'unstable'"
else
docker buildx build \
--file Dockerfile.cross \
--platform linux/arm64 \
--push \
--tag $(DOCKER_REPO):$(DOCKER_LABEL)-arm64$(DOCKER_SUFFIX) \
./target/aarch64-unknown-linux-gnu/compact
endif
.PHONY: grandine-docker-amd64
grandine-docker-amd64: ./target/x86_64-unknown-linux-gnu/compact/grandine
ifeq ($(DOCKER_LABEL),)
@echo "Failed to build docker image - please provide DOCKER_LABEL=, either 'stable' or 'unstable'"
else
docker buildx build \
--file Dockerfile.cross \
--platform linux/amd64 \
--push \
--tag $(DOCKER_REPO):$(DOCKER_LABEL)-amd64$(DOCKER_SUFFIX) \
./target/x86_64-unknown-linux-gnu/compact
endif
# ----- GRANDINE-NETHERMIND DOCKER -----
.PHONY: nethermind-docker
nethermind-docker: nethermind-docker-arm64 nethermind-docker-amd64
ifeq ($(DOCKER_LABEL),)
@echo "Failed to build docker image - please provide DOCKER_LABEL=, either 'stable' or 'unstable'"
@exit 1
endif
docker buildx imagetools create -t $(DOCKER_REPO):$(DOCKER_LABEL)$(DOCKER_SUFFIX)-nethermind-$(NETHERMIND_VERSION) \
$(DOCKER_REPO):$(DOCKER_LABEL)-amd64$(DOCKER_SUFFIX)-nethermind-$(NETHERMIND_VERSION) \
$(DOCKER_REPO):$(DOCKER_LABEL)-arm64$(DOCKER_SUFFIX)-nethermind-$(NETHERMIND_VERSION)
docker buildx imagetools create -t $(DOCKER_REPO):$(DOCKER_LABEL)$(DOCKER_SUFFIX)-nethermind \
$(DOCKER_REPO):$(DOCKER_LABEL)$(DOCKER_SUFFIX)-nethermind-$(NETHERMIND_VERSION)
ifeq ($(DOCKER_LABEL),stable)
docker buildx imagetools create -t $(DOCKER_REPO):$(GRANDINE_VERSION)-nethermind-$(NETHERMIND_VERSION) \
$(DOCKER_REPO):$(DOCKER_LABEL)$(DOCKER_SUFFIX)-nethermind-$(NETHERMIND_VERSION)
endif
.PHONY: nethermind-docker-arm64
nethermind-docker-arm64: ./target/aarch64-unknown-linux-gnu/compact/libgrandine.so ./bindings/csharp/Grandine.NethermindPlugin/bin/Release/net10.0/Grandine.NethermindPlugin.dll
ifeq ($(DOCKER_LABEL),)
@echo "Failed to build docker image - please provide DOCKER_LABEL=, either 'stable' or 'unstable'"
else
@cp ./bindings/csharp/Grandine.NethermindPlugin/bin/Release/net10.0/Grandine.NethermindPlugin.dll ./target/aarch64-unknown-linux-gnu/compact/
docker buildx build \
--file ./bindings/csharp/Grandine.NethermindPlugin/Dockerfile \
--platform linux/arm64 \
--build-arg NETHERMIND_VERSION=$(NETHERMIND_VERSION) \
--push \
--tag $(DOCKER_REPO):$(DOCKER_LABEL)-arm64$(DOCKER_SUFFIX)-nethermind-$(NETHERMIND_VERSION) \
./target/aarch64-unknown-linux-gnu/compact
endif
.PHONY: nethermind-docker-amd64
nethermind-docker-amd64: ./target/x86_64-unknown-linux-gnu/compact/libgrandine.so ./bindings/csharp/Grandine.NethermindPlugin/bin/Release/net10.0/Grandine.NethermindPlugin.dll
ifeq ($(DOCKER_LABEL),)
@echo "Failed to build docker image - please provide DOCKER_LABEL=, either 'stable' or 'unstable'"
else
@cp ./bindings/csharp/Grandine.NethermindPlugin/bin/Release/net10.0/Grandine.NethermindPlugin.dll ./target/x86_64-unknown-linux-gnu/compact/
docker buildx build \
--file ./bindings/csharp/Grandine.NethermindPlugin/Dockerfile \
--platform linux/amd64 \
--build-arg NETHERMIND_VERSION=$(NETHERMIND_VERSION) \
--push \
--tag $(DOCKER_REPO):$(DOCKER_LABEL)-amd64$(DOCKER_SUFFIX)-nethermind-$(NETHERMIND_VERSION) \
./target/x86_64-unknown-linux-gnu/compact
endif