Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Added kotlin-libp2p to test-plans #264

Open
wants to merge 12 commits into
base: master
Choose a base branch
from
7 changes: 5 additions & 2 deletions multidim-interop/Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -4,8 +4,9 @@ RUST_SUBDIRS := $(wildcard impl/rust/*/.)
NIM_SUBDIRS := $(wildcard impl/nim/*/.)
ZIG_SUBDIRS := $(wildcard impl/zig/*/.)
JAVA_SUBDIRS := $(wildcard impl/java/*/.)
KOTLIN_SUBDIRS := $(wildcard impl/kotlin/*/.)

all: $(GO_SUBDIRS) $(JS_SUBDIRS) $(RUST_SUBDIRS) $(NIM_SUBDIRS) $(ZIG_SUBDIRS) $(JAVA_SUBDIRS)
all: $(GO_SUBDIRS) $(JS_SUBDIRS) $(RUST_SUBDIRS) $(NIM_SUBDIRS) $(ZIG_SUBDIRS) $(JAVA_SUBDIRS) $(KOTLIN_SUBDIRS)
$(JS_SUBDIRS):
$(MAKE) -C $@
$(GO_SUBDIRS):
Expand All @@ -18,5 +19,7 @@ $(ZIG_SUBDIRS):
$(MAKE) -C $@
$(JAVA_SUBDIRS):
$(MAKE) -C $@
$(KOTLIN_SUBDIRS):
$(MAKE) -C $@

.PHONY: $(GO_SUBDIRS) $(JS_SUBDIRS) $(RUST_SUBDIRS) $(NIM_SUBDIRS) $(ZIG_SUBDIRS) $(JAVA_SUBDIRS) all
.PHONY: $(GO_SUBDIRS) $(JS_SUBDIRS) $(RUST_SUBDIRS) $(NIM_SUBDIRS) $(ZIG_SUBDIRS) $(JAVA_SUBDIRS) ${KOTLIN_SUBDIRS} all
31 changes: 31 additions & 0 deletions multidim-interop/docker-compose.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,31 @@
# Convenience file to locally check a ping between dialer and listener
# Usage:
# - Paste the sha256 from the 'image.json' (build in their respective directories) below for the dialer and listener.
# - Update the other environment variables below accordingly
# - `docker-compose up` to test, ctrl-c to stop.
version: "3.7"
services:
dialer:
image: "sha256:7ff0dc7840ae4936b832c95340a3e6f00ff71de0741a58109679c5a686971d36"
environment:
redis_addr: "redis:6379"
is_dialer: true
transport: "tcp"
ip: "0.0.0.0"
security: "noise"
muxer: "mplex"
depends_on:
- redis
listener:
image: "sha256:9b4ef453bd9eb957391a74dab6999e7c677b231e75131cd4de510854f4561f47"
environment:
redis_addr: "redis:6379"
is_dialer: false
transport: "tcp"
ip: "0.0.0.0"
security: "noise"
muxer: "mplex"
depends_on:
- redis
redis:
image: redis/redis-stack
4 changes: 4 additions & 0 deletions multidim-interop/impl/kotlin/.gitignore
Original file line number Diff line number Diff line change
@@ -0,0 +1,4 @@
kotlin-libp2p-*.zip
kotlin-libp2p-*
kotlin-libp2p-*/*
image.json
31 changes: 31 additions & 0 deletions multidim-interop/impl/kotlin/v0.2/Makefile
Original file line number Diff line number Diff line change
@@ -0,0 +1,31 @@
image_name := kotlin-v0.2
version := 0.2.2

all: image.json

image.json: verify-checksum kotlin-libp2p-${version}
cd kotlin-libp2p-${version} && IMAGE_NAME=${image_name} ../../../../dockerBuildWrapper.sh -f test-plans/Dockerfile .
docker image inspect ${image_name} -f "{{.Id}}" | \
xargs -I {} echo "{\"imageID\": \"{}\"}" > $@

kotlin-libp2p-${version}: kotlin-libp2p-${version}.zip
unzip -o kotlin-libp2p-${version}.zip

kotlin-libp2p-${version}.zip:
wget -O $@ "https://github.com/erwin-kok/kotlin-libp2p/archive/v${version}.zip"

# Run `make version.lock` to generate this lock file. This file should be committed.
# This locks the exact contents of the specified version. This lets us use the
# human readable name while still making sure the contents don't change.
version.lock: kotlin-libp2p-${version}.zip
shasum -a 256 kotlin-libp2p-${version}.zip > $@

verify-checksum: kotlin-libp2p-${version}.zip
shasum -a 256 -c version.lock

.PHONY: clean all verify-checksum

clean:
-rm image.json
-rm kotlin-libp2p-*.zip
-rm -rf kotlin-libp2p-*
1 change: 1 addition & 0 deletions multidim-interop/impl/kotlin/v0.2/version.lock
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
0fed0d579bbc427c6b42555f4a133eae9292224ea01e6b38d34cb13b2f3143e0 kotlin-libp2p-0.2.2.zip
erwin-kok marked this conversation as resolved.
Show resolved Hide resolved
6 changes: 6 additions & 0 deletions multidim-interop/versions.ts
Original file line number Diff line number Diff line change
Expand Up @@ -125,4 +125,10 @@ export const versions: Array<Version> = [
secureChannels: ["tls", "noise"],
muxers: ["mplex", "yamux"],
},
{
id: "kotlin-v0.2",
transports: ["tcp"],
secureChannels: ["noise"],
muxers: ["mplex"],
},
].map((v: Version) => (typeof v.containerImageID === "undefined" ? ({ ...v, containerImageID: canonicalImageIDLookup }) : v))