Skip to content

Commit

Permalink
Merge branch 'master' into feat/action-perf-benchmarks
Browse files Browse the repository at this point in the history
  • Loading branch information
maschad committed Sep 15, 2023
2 parents 8f3c79f + fbe8eb6 commit 77ab89e
Show file tree
Hide file tree
Showing 22 changed files with 24,178 additions and 1,426 deletions.
2 changes: 1 addition & 1 deletion README.md
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
# Interoperability/end to end test-plans & performance benchmarking for libp2p

[![Interop Dashboard](https://github.com/libp2p/test-plans/workflows/libp2p%20multidimensional%20interop%20test/badge.svg?branch=master)](https://github.com/libp2p/test-plans/actions/runs/6037351379/attempts/2#summary-16388072768)
[![Interop Dashboard](https://github.com/libp2p/test-plans/workflows/libp2p%20multidimensional%20interop%20test/badge.svg?branch=master)](https://github.com/libp2p/test-plans/actions/runs/6190795509/attempts/1#summary-16807793452)

[![Made by Protocol Labs](https://img.shields.io/badge/made%20by-Protocol%20Labs-blue.svg?style=flat-square)](http://protocol.ai)

Expand Down
31 changes: 0 additions & 31 deletions multidim-interop/impl/go/v0.27/Makefile

This file was deleted.

1 change: 0 additions & 1 deletion multidim-interop/impl/go/v0.27/version.lock

This file was deleted.

1 change: 0 additions & 1 deletion multidim-interop/impl/go/v0.28/version.lock

This file was deleted.

Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
image_name := go-v0.28
version := 0.28.3
image_name := go-v0.31
version := 0.31.0

all: image.json

Expand Down
1 change: 1 addition & 0 deletions multidim-interop/impl/go/v0.31/version.lock
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
fab332959e47bc8c7c5ed870f1f138d782c169f75ecf35eb274b46fefa83e29b go-libp2p-0.31.0.zip
2 changes: 1 addition & 1 deletion multidim-interop/impl/js/v0.46/BrowserDockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@ FROM mcr.microsoft.com/playwright


COPY --from=js-libp2p-base /app/ /app/
WORKDIR /app/interop
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.
Expand Down
10 changes: 5 additions & 5 deletions multidim-interop/impl/js/v0.46/Dockerfile
Original file line number Diff line number Diff line change
@@ -1,11 +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:18
FROM node:18.17.1
WORKDIR /app
COPY . .
RUN npm i && npm run build
RUN apt-get update && apt-get install -y cmake
COPY package*.json ./
RUN npm ci

WORKDIR /app/interop
RUN npm i && npm run build
WORKDIR /app/node_modules/@libp2p/multidim-interop

ENTRYPOINT [ "npm", "run", "test:interop:multidim", "--", "--build", "false", "--types", "false", "-t", "node" ]
22 changes: 12 additions & 10 deletions multidim-interop/impl/js/v0.46/Makefile
Original file line number Diff line number Diff line change
@@ -1,8 +1,7 @@
image_name := js-v0.46
commitSha := b7e608998cc88860d9ec8a3ed7c03fdfb3eccb3b
image_name := js-v0.46.9

# TODO Enable webkit once https://github.com/libp2p/js-libp2p/pull/1627 is in
all: image.json chromium-image.json firefox-image.json
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
Expand All @@ -18,17 +17,20 @@ firefox-image.json: load-image-json BrowserDockerfile
docker image inspect firefox-${image_name} -f "{{.Id}}" | \
xargs -I {} echo "{\"imageID\": \"{}\"}" > $@

image.json: js-libp2p-${commitSha}
cd js-libp2p-${commitSha} && docker build -t ${image_name} -f ../Dockerfile .
# 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\": \"{}\"}" > $@

js-libp2p-${commitSha}:
wget -O js-libp2p-${commitSha}.zip "https://github.com/libp2p/js-libp2p/archive/${commitSha}.zip"
unzip -o js-libp2p-${commitSha}.zip
unzip -o js-libp2p-${commitSha}.zip

clean:
rm -rf image.json js-libp2p-*.zip js-libp2p-* *-image.json
rm -rf image.json *-image.json

.PHONY: all clean browser-images load-image-json
Loading

0 comments on commit 77ab89e

Please sign in to comment.