Skip to content

Commit

Permalink
Add zig-libp2p to interop tester (#167)
Browse files Browse the repository at this point in the history
* Add zig-libp2p to interop tester

* Fix typo
  • Loading branch information
MarcoPolo authored Apr 15, 2023
1 parent 60003a4 commit d61600c
Show file tree
Hide file tree
Showing 4 changed files with 28 additions and 2 deletions.
7 changes: 5 additions & 2 deletions multidim-interop/Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -2,8 +2,9 @@ GO_SUBDIRS := $(wildcard impl/go/*/.)
JS_SUBDIRS := $(wildcard impl/js/*/.)
RUST_SUBDIRS := $(wildcard impl/rust/*/.)
NIM_SUBDIRS := $(wildcard impl/nim/*/.)
ZIG_SUBDIRS := $(wildcard impl/zig/*/.)

all: $(GO_SUBDIRS) $(JS_SUBDIRS) $(RUST_SUBDIRS) $(NIM_SUBDIRS)
all: $(GO_SUBDIRS) $(JS_SUBDIRS) $(RUST_SUBDIRS) $(NIM_SUBDIRS) $(ZIG_SUBDIRS)
$(JS_SUBDIRS):
$(MAKE) -C $@
$(GO_SUBDIRS):
Expand All @@ -12,6 +13,8 @@ $(RUST_SUBDIRS):
$(MAKE) -C $@
$(NIM_SUBDIRS):
$(MAKE) -C $@
$(ZIG_SUBDIRS):
$(MAKE) -C $@


.PHONY: $(GO_SUBDIRS) $(JS_SUBDIRS) $(RUST_SUBDIRS) $(NIM_SUBDIRS) all
.PHONY: $(GO_SUBDIRS) $(JS_SUBDIRS) $(RUST_SUBDIRS) $(NIM_SUBDIRS) $(ZIG_SUBDIRS) all
1 change: 1 addition & 0 deletions multidim-interop/impl/zig/.gitignore
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
zig-libp2p-*
14 changes: 14 additions & 0 deletions multidim-interop/impl/zig/v0.0.1/Makefile
Original file line number Diff line number Diff line change
@@ -0,0 +1,14 @@
image_name := zig-v0.0.1
commitSha := 7435381b698bf282d088a64de1b24f5767bb9a4a

all: image.json

image.json:
wget -O zig-libp2p-${commitSha}.zip "https://github.com/marcopolo/zig-libp2p/archive/${commitSha}.zip"
unzip -o zig-libp2p-${commitSha}.zip
cd zig-libp2p-${commitSha} && docker build -t ${image_name} -f interop/Dockerfile .
docker image inspect ${image_name} -f "{{.Id}}" | \
xargs -I {} echo "{\"imageID\": \"{}\"}" > $@

clean:
rm -rf image.json zig-libp2p-*.zip zig-libp2p-*
8 changes: 8 additions & 0 deletions multidim-interop/versions.ts
Original file line number Diff line number Diff line change
Expand Up @@ -11,6 +11,7 @@ import jsV042 from "./impl/js/v0.42/node-image.json"
import nimv10 from "./impl/nim/v1.0/image.json"
import chromiumJsV041 from "./impl/js/v0.41/chromium-image.json"
import chromiumJsV042 from "./impl/js/v0.42/chromium-image.json"
import zigv001 from "./impl/zig/v0.0.1/image.json"

export type Version = {
id: string,
Expand Down Expand Up @@ -114,4 +115,11 @@ export const versions: Array<Version> = [
secureChannels: ["noise"],
muxers: ["mplex", "yamux"],
},
{
id: "zig-v0.0.1",
containerImageID: zigv001.imageID,
transports: ["quic-v1"],
secureChannels: [],
muxers: [],
},
]

0 comments on commit d61600c

Please sign in to comment.