diff --git a/multidim-interop/Makefile b/multidim-interop/Makefile index ed98ff716..69b299682 100644 --- a/multidim-interop/Makefile +++ b/multidim-interop/Makefile @@ -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): @@ -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 diff --git a/multidim-interop/docker-compose.yaml b/multidim-interop/docker-compose.yaml new file mode 100644 index 000000000..04ed3fcf9 --- /dev/null +++ b/multidim-interop/docker-compose.yaml @@ -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 diff --git a/multidim-interop/impl/kotlin/.gitignore b/multidim-interop/impl/kotlin/.gitignore new file mode 100644 index 000000000..df6943784 --- /dev/null +++ b/multidim-interop/impl/kotlin/.gitignore @@ -0,0 +1,4 @@ +kotlin-libp2p-*.zip +kotlin-libp2p-* +kotlin-libp2p-*/* +image.json diff --git a/multidim-interop/impl/kotlin/v0.2/Makefile b/multidim-interop/impl/kotlin/v0.2/Makefile new file mode 100644 index 000000000..1896ea55f --- /dev/null +++ b/multidim-interop/impl/kotlin/v0.2/Makefile @@ -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-* diff --git a/multidim-interop/impl/kotlin/v0.2/version.lock b/multidim-interop/impl/kotlin/v0.2/version.lock new file mode 100644 index 000000000..d33a061ab --- /dev/null +++ b/multidim-interop/impl/kotlin/v0.2/version.lock @@ -0,0 +1 @@ +0fed0d579bbc427c6b42555f4a133eae9292224ea01e6b38d34cb13b2f3143e0 kotlin-libp2p-0.2.2.zip diff --git a/multidim-interop/versions.ts b/multidim-interop/versions.ts index e60f54950..9b3f99ed3 100644 --- a/multidim-interop/versions.ts +++ b/multidim-interop/versions.ts @@ -125,4 +125,10 @@ export const versions: Array = [ 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))