chore: add js-libp2p@v1.3.0 to transport-interop (#359)
* chore: add js-libp2p@v1.3.0 to transport-interop * chore: add js-libp2p@v1.4.0 to transport-interop * chore: add js-libp2p@v1.5.0 to transport-interop * chore: add js-libp2p@v1.6.0 to transport-interop * Update js-libp2p versions * Buster has openssl 1.1 still * Filter only js v1.6 for debugging * Try emitting only * Print docker version * Attempt to patch tests * Undo changes in .github * Buster not needed apparently --------- Co-authored-by: galargh <galargh@users.noreply.github.com> Co-authored-by: Marco Munizaga <git@marcopolo.io> Co-authored-by: Marco Munizaga <marco@marcopolo.io>
This commit is contained in:
parent
a63d3dc0a6
commit
f25059fc3e
|
@ -0,0 +1,21 @@
|
|||
# syntax=docker/dockerfile:1
|
||||
|
||||
# Copied since we won't have the repo to use if expanding from cache.
|
||||
|
||||
# Workaround: https://github.com/docker/cli/issues/996
|
||||
ARG BASE_IMAGE=node-js-libp2p-head
|
||||
FROM ${BASE_IMAGE} as js-libp2p-base
|
||||
|
||||
FROM mcr.microsoft.com/playwright
|
||||
|
||||
|
||||
COPY --from=js-libp2p-base /app/ /app/
|
||||
WORKDIR /app/node_modules/@libp2p/multidim-interop
|
||||
# We install browsers here instead of the cached version so that we use the latest browsers at run time.
|
||||
# Ideally this would also be pinned, but playwright controls this, so there isn't much we can do about it.
|
||||
# By installing here, we avoid installing it at test time.
|
||||
RUN npx playwright install
|
||||
ARG BROWSER=chromium # Options: chromium, firefox, webkit
|
||||
ENV BROWSER=$BROWSER
|
||||
|
||||
ENTRYPOINT npm run test:interop:multidim -- --build false --types false -t browser -- --browser $BROWSER
|
|
@ -0,0 +1,11 @@
|
|||
# Here because we want to fetch the node_modules within docker so that it's
|
||||
# installed on the same platform the test is run. Otherwise tools like `esbuild` will fail to run
|
||||
FROM node:20.13.1
|
||||
WORKDIR /app
|
||||
RUN apt-get update && apt-get install -y cmake
|
||||
COPY package*.json ./
|
||||
RUN npm ci
|
||||
|
||||
WORKDIR /app/node_modules/@libp2p/multidim-interop
|
||||
|
||||
ENTRYPOINT [ "npm", "run", "test:interop:multidim", "--", "--build", "false", "--types", "false", "-t", "node" ]
|
|
@ -0,0 +1,36 @@
|
|||
image_name := js-v1.3.0
|
||||
|
||||
# TODO Enable webkit once https://github.com/libp2p/js-libp2p/pull/1627 is in
|
||||
all: image.json chromium-image.json firefox-image.json update-lock-file
|
||||
|
||||
# Necessary because multistage builds require a docker image name rather than a digest to be used
|
||||
load-image-json: image.json
|
||||
docker image tag $$(jq -r .imageID image.json) ${image_name}
|
||||
|
||||
chromium-image.json: load-image-json BrowserDockerfile
|
||||
docker build -f BrowserDockerfile --build-arg=BASE_IMAGE=${image_name} --build-arg=BROWSER=chromium -t chromium-${image_name} .
|
||||
docker image inspect chromium-${image_name} -f "{{.Id}}" | \
|
||||
xargs -I {} echo "{\"imageID\": \"{}\"}" > $@
|
||||
|
||||
firefox-image.json: load-image-json BrowserDockerfile
|
||||
docker build -f BrowserDockerfile --build-arg=BASE_IMAGE=${image_name} --build-arg=BROWSER=firefox -t firefox-${image_name} .
|
||||
docker image inspect firefox-${image_name} -f "{{.Id}}" | \
|
||||
xargs -I {} echo "{\"imageID\": \"{}\"}" > $@
|
||||
|
||||
# We update the lock file here so that we make sure we are always using the correct lock file.
|
||||
# If this changes, CI will fail since there are unstaged changes.
|
||||
update-lock-file: image.json
|
||||
CONTAINER_ID=$$(docker create $$(jq -r .imageID image.json)); \
|
||||
docker cp $$CONTAINER_ID:/app/package-lock.json ./package-lock.json; \
|
||||
docker rm $$CONTAINER_ID
|
||||
|
||||
image.json:
|
||||
docker build -t ${image_name} -f ./Dockerfile .
|
||||
docker image inspect ${image_name} -f "{{.Id}}" | \
|
||||
xargs -I {} echo "{\"imageID\": \"{}\"}" > $@
|
||||
|
||||
|
||||
clean:
|
||||
rm -rf image.json *-image.json
|
||||
|
||||
.PHONY: all clean browser-images load-image-json
|
File diff suppressed because it is too large
Load Diff
|
@ -0,0 +1,17 @@
|
|||
{
|
||||
"dependencies": {
|
||||
"@chainsafe/libp2p-noise": "^13.0.3",
|
||||
"@chainsafe/libp2p-yamux": "^5.0.2",
|
||||
"@libp2p/mplex": "^9.0.12",
|
||||
"@libp2p/multidim-interop": "^1.0.14",
|
||||
"@libp2p/tcp": "^8.0.13",
|
||||
"@libp2p/webrtc": "^3.2.11",
|
||||
"@libp2p/websockets": "^7.0.13",
|
||||
"@libp2p/webtransport": "^3.1.10",
|
||||
"@multiformats/mafmt": "^12.1.6",
|
||||
"@multiformats/multiaddr": "^12.1.10",
|
||||
"aegir": "^41.1.9",
|
||||
"libp2p": "^1.3.0",
|
||||
"redis": "^4.6.10"
|
||||
}
|
||||
}
|
|
@ -0,0 +1,21 @@
|
|||
# syntax=docker/dockerfile:1
|
||||
|
||||
# Copied since we won't have the repo to use if expanding from cache.
|
||||
|
||||
# Workaround: https://github.com/docker/cli/issues/996
|
||||
ARG BASE_IMAGE=node-js-libp2p-head
|
||||
FROM ${BASE_IMAGE} as js-libp2p-base
|
||||
|
||||
FROM mcr.microsoft.com/playwright
|
||||
|
||||
|
||||
COPY --from=js-libp2p-base /app/ /app/
|
||||
WORKDIR /app/node_modules/@libp2p/multidim-interop
|
||||
# We install browsers here instead of the cached version so that we use the latest browsers at run time.
|
||||
# Ideally this would also be pinned, but playwright controls this, so there isn't much we can do about it.
|
||||
# By installing here, we avoid installing it at test time.
|
||||
RUN npx playwright install
|
||||
ARG BROWSER=chromium # Options: chromium, firefox, webkit
|
||||
ENV BROWSER=$BROWSER
|
||||
|
||||
ENTRYPOINT npm run test:interop:multidim -- --build false --types false -t browser -- --browser $BROWSER
|
|
@ -0,0 +1,11 @@
|
|||
# Here because we want to fetch the node_modules within docker so that it's
|
||||
# installed on the same platform the test is run. Otherwise tools like `esbuild` will fail to run
|
||||
FROM node:20.13.1
|
||||
WORKDIR /app
|
||||
RUN apt-get update && apt-get install -y cmake
|
||||
COPY package*.json ./
|
||||
RUN npm ci
|
||||
|
||||
WORKDIR /app/node_modules/@libp2p/multidim-interop
|
||||
|
||||
ENTRYPOINT [ "npm", "run", "test:interop:multidim", "--", "--build", "false", "--types", "false", "-t", "node" ]
|
|
@ -0,0 +1,36 @@
|
|||
image_name := js-v1.4.0
|
||||
|
||||
# TODO Enable webkit once https://github.com/libp2p/js-libp2p/pull/1627 is in
|
||||
all: image.json chromium-image.json firefox-image.json update-lock-file
|
||||
|
||||
# Necessary because multistage builds require a docker image name rather than a digest to be used
|
||||
load-image-json: image.json
|
||||
docker image tag $$(jq -r .imageID image.json) ${image_name}
|
||||
|
||||
chromium-image.json: load-image-json BrowserDockerfile
|
||||
docker build -f BrowserDockerfile --build-arg=BASE_IMAGE=${image_name} --build-arg=BROWSER=chromium -t chromium-${image_name} .
|
||||
docker image inspect chromium-${image_name} -f "{{.Id}}" | \
|
||||
xargs -I {} echo "{\"imageID\": \"{}\"}" > $@
|
||||
|
||||
firefox-image.json: load-image-json BrowserDockerfile
|
||||
docker build -f BrowserDockerfile --build-arg=BASE_IMAGE=${image_name} --build-arg=BROWSER=firefox -t firefox-${image_name} .
|
||||
docker image inspect firefox-${image_name} -f "{{.Id}}" | \
|
||||
xargs -I {} echo "{\"imageID\": \"{}\"}" > $@
|
||||
|
||||
# We update the lock file here so that we make sure we are always using the correct lock file.
|
||||
# If this changes, CI will fail since there are unstaged changes.
|
||||
update-lock-file: image.json
|
||||
CONTAINER_ID=$$(docker create $$(jq -r .imageID image.json)); \
|
||||
docker cp $$CONTAINER_ID:/app/package-lock.json ./package-lock.json; \
|
||||
docker rm $$CONTAINER_ID
|
||||
|
||||
image.json:
|
||||
docker build -t ${image_name} -f ./Dockerfile .
|
||||
docker image inspect ${image_name} -f "{{.Id}}" | \
|
||||
xargs -I {} echo "{\"imageID\": \"{}\"}" > $@
|
||||
|
||||
|
||||
clean:
|
||||
rm -rf image.json *-image.json
|
||||
|
||||
.PHONY: all clean browser-images load-image-json
|
File diff suppressed because it is too large
Load Diff
|
@ -0,0 +1,17 @@
|
|||
{
|
||||
"dependencies": {
|
||||
"@chainsafe/libp2p-noise": "^13.0.3",
|
||||
"@chainsafe/libp2p-yamux": "^5.0.2",
|
||||
"@libp2p/mplex": "^9.0.12",
|
||||
"@libp2p/multidim-interop": "^1.0.14",
|
||||
"@libp2p/tcp": "^8.0.13",
|
||||
"@libp2p/webrtc": "^3.2.11",
|
||||
"@libp2p/websockets": "^7.0.13",
|
||||
"@libp2p/webtransport": "^3.1.10",
|
||||
"@multiformats/mafmt": "^12.1.6",
|
||||
"@multiformats/multiaddr": "^12.1.10",
|
||||
"aegir": "^41.1.9",
|
||||
"libp2p": "^1.4.0",
|
||||
"redis": "^4.6.10"
|
||||
}
|
||||
}
|
|
@ -0,0 +1,21 @@
|
|||
# syntax=docker/dockerfile:1
|
||||
|
||||
# Copied since we won't have the repo to use if expanding from cache.
|
||||
|
||||
# Workaround: https://github.com/docker/cli/issues/996
|
||||
ARG BASE_IMAGE=node-js-libp2p-head
|
||||
FROM ${BASE_IMAGE} as js-libp2p-base
|
||||
|
||||
FROM mcr.microsoft.com/playwright
|
||||
|
||||
|
||||
COPY --from=js-libp2p-base /app/ /app/
|
||||
WORKDIR /app/node_modules/@libp2p/multidim-interop
|
||||
# We install browsers here instead of the cached version so that we use the latest browsers at run time.
|
||||
# Ideally this would also be pinned, but playwright controls this, so there isn't much we can do about it.
|
||||
# By installing here, we avoid installing it at test time.
|
||||
RUN npx playwright install
|
||||
ARG BROWSER=chromium # Options: chromium, firefox, webkit
|
||||
ENV BROWSER=$BROWSER
|
||||
|
||||
ENTRYPOINT npm run test:interop:multidim -- --build false --types false -t browser -- --browser $BROWSER
|
|
@ -0,0 +1,13 @@
|
|||
# Here because we want to fetch the node_modules within docker so that it's
|
||||
# installed on the same platform the test is run. Otherwise tools like `esbuild` will fail to run
|
||||
FROM node:20.13.1
|
||||
WORKDIR /app
|
||||
RUN apt-get update && apt-get install -y cmake
|
||||
COPY package*.json ./
|
||||
RUN npm ci
|
||||
|
||||
WORKDIR /app/node_modules/@libp2p/multidim-interop
|
||||
# Patch the test to use IPv4 loopback address explicitly. Sometimes localhost resolves to the IPv6 address
|
||||
RUN sed -i 's/localhost/127.0.0.1/g' .aegir.js test/ping.spec.ts dist/test/ping.spec.js
|
||||
|
||||
ENTRYPOINT [ "npm", "run", "test:interop:multidim", "--", "--build", "false", "--types", "false", "-t", "node" ]
|
|
@ -0,0 +1,36 @@
|
|||
image_name := js-v1.5.0
|
||||
|
||||
# TODO Enable webkit once https://github.com/libp2p/js-libp2p/pull/1627 is in
|
||||
all: image.json chromium-image.json firefox-image.json update-lock-file
|
||||
|
||||
# Necessary because multistage builds require a docker image name rather than a digest to be used
|
||||
load-image-json: image.json
|
||||
docker image tag $$(jq -r .imageID image.json) ${image_name}
|
||||
|
||||
chromium-image.json: load-image-json BrowserDockerfile
|
||||
docker build -f BrowserDockerfile --build-arg=BASE_IMAGE=${image_name} --build-arg=BROWSER=chromium -t chromium-${image_name} .
|
||||
docker image inspect chromium-${image_name} -f "{{.Id}}" | \
|
||||
xargs -I {} echo "{\"imageID\": \"{}\"}" > $@
|
||||
|
||||
firefox-image.json: load-image-json BrowserDockerfile
|
||||
docker build -f BrowserDockerfile --build-arg=BASE_IMAGE=${image_name} --build-arg=BROWSER=firefox -t firefox-${image_name} .
|
||||
docker image inspect firefox-${image_name} -f "{{.Id}}" | \
|
||||
xargs -I {} echo "{\"imageID\": \"{}\"}" > $@
|
||||
|
||||
# We update the lock file here so that we make sure we are always using the correct lock file.
|
||||
# If this changes, CI will fail since there are unstaged changes.
|
||||
update-lock-file: image.json
|
||||
CONTAINER_ID=$$(docker create $$(jq -r .imageID image.json)); \
|
||||
docker cp $$CONTAINER_ID:/app/package-lock.json ./package-lock.json; \
|
||||
docker rm $$CONTAINER_ID
|
||||
|
||||
image.json:
|
||||
docker build -t ${image_name} -f ./Dockerfile .
|
||||
docker image inspect ${image_name} -f "{{.Id}}" | \
|
||||
xargs -I {} echo "{\"imageID\": \"{}\"}" > $@
|
||||
|
||||
|
||||
clean:
|
||||
rm -rf image.json *-image.json
|
||||
|
||||
.PHONY: all clean browser-images load-image-json
|
File diff suppressed because it is too large
Load Diff
|
@ -0,0 +1,17 @@
|
|||
{
|
||||
"dependencies": {
|
||||
"@chainsafe/libp2p-noise": "^13.0.3",
|
||||
"@chainsafe/libp2p-yamux": "^5.0.2",
|
||||
"@libp2p/mplex": "^9.0.12",
|
||||
"@libp2p/multidim-interop": "^1.0.14",
|
||||
"@libp2p/tcp": "^8.0.13",
|
||||
"@libp2p/webrtc": "^3.2.11",
|
||||
"@libp2p/websockets": "^7.0.13",
|
||||
"@libp2p/webtransport": "^3.1.10",
|
||||
"@multiformats/mafmt": "^12.1.6",
|
||||
"@multiformats/multiaddr": "^12.1.10",
|
||||
"aegir": "^41.1.9",
|
||||
"libp2p": "^1.5.0",
|
||||
"redis": "^4.6.10"
|
||||
}
|
||||
}
|
|
@ -0,0 +1,21 @@
|
|||
# syntax=docker/dockerfile:1
|
||||
|
||||
# Copied since we won't have the repo to use if expanding from cache.
|
||||
|
||||
# Workaround: https://github.com/docker/cli/issues/996
|
||||
ARG BASE_IMAGE=node-js-libp2p-head
|
||||
FROM ${BASE_IMAGE} as js-libp2p-base
|
||||
|
||||
FROM mcr.microsoft.com/playwright
|
||||
|
||||
|
||||
COPY --from=js-libp2p-base /app/ /app/
|
||||
WORKDIR /app/node_modules/@libp2p/multidim-interop
|
||||
# We install browsers here instead of the cached version so that we use the latest browsers at run time.
|
||||
# Ideally this would also be pinned, but playwright controls this, so there isn't much we can do about it.
|
||||
# By installing here, we avoid installing it at test time.
|
||||
RUN npx playwright install
|
||||
ARG BROWSER=chromium # Options: chromium, firefox, webkit
|
||||
ENV BROWSER=$BROWSER
|
||||
|
||||
ENTRYPOINT npm run test:interop:multidim -- --build false --types false -t browser -- --browser $BROWSER
|
|
@ -0,0 +1,13 @@
|
|||
# Here because we want to fetch the node_modules within docker so that it's
|
||||
# installed on the same platform the test is run. Otherwise tools like `esbuild` will fail to run
|
||||
FROM node:20.13.1
|
||||
WORKDIR /app
|
||||
RUN apt-get update && apt-get install -y cmake
|
||||
COPY package*.json ./
|
||||
RUN npm ci
|
||||
|
||||
WORKDIR /app/node_modules/@libp2p/multidim-interop
|
||||
# Patch the test to use IPv4 loopback address explicitly. Sometimes localhost resolves to the IPv6 address
|
||||
RUN sed -i 's/localhost/127.0.0.1/g' .aegir.js test/ping.spec.ts dist/test/ping.spec.js
|
||||
|
||||
ENTRYPOINT [ "npm", "run", "test:interop:multidim", "--", "--build", "false", "--types", "false", "-t", "node" ]
|
|
@ -0,0 +1,36 @@
|
|||
image_name := js-v1.6.0
|
||||
|
||||
# TODO Enable webkit once https://github.com/libp2p/js-libp2p/pull/1627 is in
|
||||
all: image.json chromium-image.json firefox-image.json update-lock-file
|
||||
|
||||
# Necessary because multistage builds require a docker image name rather than a digest to be used
|
||||
load-image-json: image.json
|
||||
docker image tag $$(jq -r .imageID image.json) ${image_name}
|
||||
|
||||
chromium-image.json: load-image-json BrowserDockerfile
|
||||
docker build -f BrowserDockerfile --build-arg=BASE_IMAGE=${image_name} --build-arg=BROWSER=chromium -t chromium-${image_name} .
|
||||
docker image inspect chromium-${image_name} -f "{{.Id}}" | \
|
||||
xargs -I {} echo "{\"imageID\": \"{}\"}" > $@
|
||||
|
||||
firefox-image.json: load-image-json BrowserDockerfile
|
||||
docker build -f BrowserDockerfile --build-arg=BASE_IMAGE=${image_name} --build-arg=BROWSER=firefox -t firefox-${image_name} .
|
||||
docker image inspect firefox-${image_name} -f "{{.Id}}" | \
|
||||
xargs -I {} echo "{\"imageID\": \"{}\"}" > $@
|
||||
|
||||
# We update the lock file here so that we make sure we are always using the correct lock file.
|
||||
# If this changes, CI will fail since there are unstaged changes.
|
||||
update-lock-file: image.json
|
||||
CONTAINER_ID=$$(docker create $$(jq -r .imageID image.json)); \
|
||||
docker cp $$CONTAINER_ID:/app/package-lock.json ./package-lock.json; \
|
||||
docker rm $$CONTAINER_ID
|
||||
|
||||
image.json: Dockerfile
|
||||
docker build -t ${image_name} -f ./Dockerfile .
|
||||
docker image inspect ${image_name} -f "{{.Id}}" | \
|
||||
xargs -I {} echo "{\"imageID\": \"{}\"}" > $@
|
||||
|
||||
|
||||
clean:
|
||||
rm -rf image.json *-image.json
|
||||
|
||||
.PHONY: all clean browser-images load-image-json
|
File diff suppressed because it is too large
Load Diff
|
@ -0,0 +1,17 @@
|
|||
{
|
||||
"dependencies": {
|
||||
"@chainsafe/libp2p-noise": "^13.0.3",
|
||||
"@chainsafe/libp2p-yamux": "^5.0.2",
|
||||
"@libp2p/mplex": "^9.0.12",
|
||||
"@libp2p/multidim-interop": "^1.0.14",
|
||||
"@libp2p/tcp": "^8.0.13",
|
||||
"@libp2p/webrtc": "^3.2.11",
|
||||
"@libp2p/websockets": "^7.0.13",
|
||||
"@libp2p/webtransport": "^3.1.10",
|
||||
"@multiformats/mafmt": "^12.1.6",
|
||||
"@multiformats/multiaddr": "^12.1.10",
|
||||
"aegir": "^41.1.9",
|
||||
"libp2p": "^1.6.0",
|
||||
"redis": "^4.6.10"
|
||||
}
|
||||
}
|
|
@ -75,43 +75,7 @@
|
|||
]
|
||||
},
|
||||
{
|
||||
"id": "js-v0.45",
|
||||
"transports": [
|
||||
"tcp",
|
||||
"ws",
|
||||
{
|
||||
"name": "wss",
|
||||
"onlyDial": true
|
||||
}
|
||||
],
|
||||
"secureChannels": [
|
||||
"noise"
|
||||
],
|
||||
"muxers": [
|
||||
"mplex",
|
||||
"yamux"
|
||||
]
|
||||
},
|
||||
{
|
||||
"id": "js-v0.46",
|
||||
"transports": [
|
||||
"tcp",
|
||||
"ws",
|
||||
{
|
||||
"name": "wss",
|
||||
"onlyDial": true
|
||||
}
|
||||
],
|
||||
"secureChannels": [
|
||||
"noise"
|
||||
],
|
||||
"muxers": [
|
||||
"mplex",
|
||||
"yamux"
|
||||
]
|
||||
},
|
||||
{
|
||||
"id": "chromium-js-v0.46",
|
||||
"id": "chromium-js-v1.6",
|
||||
"containerImageID": "browser",
|
||||
"transports": [
|
||||
{
|
||||
|
@ -137,7 +101,7 @@
|
|||
]
|
||||
},
|
||||
{
|
||||
"id": "firefox-js-v0.46",
|
||||
"id": "firefox-js-v1.6",
|
||||
"containerImageID": "browser",
|
||||
"transports": [
|
||||
{
|
||||
|
@ -286,5 +250,41 @@
|
|||
"mplex",
|
||||
"yamux"
|
||||
]
|
||||
},
|
||||
{
|
||||
"id": "js-v1.5",
|
||||
"transports": [
|
||||
"tcp",
|
||||
"ws",
|
||||
{
|
||||
"name": "wss",
|
||||
"onlyDial": true
|
||||
}
|
||||
],
|
||||
"secureChannels": [
|
||||
"noise"
|
||||
],
|
||||
"muxers": [
|
||||
"mplex",
|
||||
"yamux"
|
||||
]
|
||||
},
|
||||
{
|
||||
"id": "js-v1.6",
|
||||
"transports": [
|
||||
"tcp",
|
||||
"ws",
|
||||
{
|
||||
"name": "wss",
|
||||
"onlyDial": true
|
||||
}
|
||||
],
|
||||
"secureChannels": [
|
||||
"noise"
|
||||
],
|
||||
"muxers": [
|
||||
"mplex",
|
||||
"yamux"
|
||||
]
|
||||
}
|
||||
]
|
||||
|
|
Loading…
Reference in New Issue