-
Notifications
You must be signed in to change notification settings - Fork 43
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
multidim: Reproducible js-libp2p #286
Changes from all commits
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -3,9 +3,10 @@ | |
FROM node:18 | ||
WORKDIR /app | ||
COPY . . | ||
RUN npm i && npm run build | ||
RUN apt-get update && apt-get install -y cmake | ||
RUN npm ci && npm run build | ||
|
||
WORKDIR /app/interop | ||
RUN npm i && npm run build | ||
RUN npm ci && npm run build | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Skipping the
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. The failing apt install step above is trying to install
Looks like apt-get fails because there's a GPG signature failure? The internet seems to think this can happen when a mirror is out of date or not completely synced? There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more.
@marten-seemann Could you try adjusting your Docker dedicated resources as suggested to see if this addresses the GPG signature failure? Ultimately you need |
||
|
||
ENTRYPOINT [ "npm", "run", "test:interop:multidim", "--", "--build", "false", "--types", "false", "-t", "node" ] |
Original file line number | Diff line number | Diff line change | ||||
---|---|---|---|---|---|---|
|
@@ -2,7 +2,9 @@ image_name := js-v0.46 | |||||
commitSha := b7e608998cc88860d9ec8a3ed7c03fdfb3eccb3b | ||||||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. I would suggest updating this to the latest js-libp2p
Suggested change
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Let’s do in a follow up pr. This one should just be a fix. I don’t want to debug adding a new version. Feel free to create a new pr off this one though |
||||||
|
||||||
# TODO Enable webkit once https://github.com/libp2p/js-libp2p/pull/1627 is in | ||||||
all: image.json chromium-image.json firefox-image.json | ||||||
# 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. | ||||||
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 | ||||||
|
@@ -18,17 +20,25 @@ firefox-image.json: load-image-json BrowserDockerfile | |||||
docker image inspect firefox-${image_name} -f "{{.Id}}" | \ | ||||||
xargs -I {} echo "{\"imageID\": \"{}\"}" > $@ | ||||||
|
||||||
image.json: js-libp2p-${commitSha} | ||||||
image.json: js-libp2p-${commitSha} js-libp2p-${commitSha}/package-lock.json | ||||||
cd js-libp2p-${commitSha} && docker build -t ${image_name} -f ../Dockerfile . | ||||||
docker image inspect ${image_name} -f "{{.Id}}" | \ | ||||||
xargs -I {} echo "{\"imageID\": \"{}\"}" > $@ | ||||||
|
||||||
# Include the package-lock.json file so this build is reproducible | ||||||
js-libp2p-${commitSha}/package-lock.json: js-libp2p-${commitSha} | ||||||
cp ./package-lock.json js-libp2p-${commitSha}/package-lock.json | ||||||
|
||||||
js-libp2p-${commitSha}: | ||||||
wget -O js-libp2p-${commitSha}.zip "https://github.com/libp2p/js-libp2p/archive/${commitSha}.zip" | ||||||
unzip -o js-libp2p-${commitSha}.zip | ||||||
curl -L -o js-libp2p-${commitSha}.zip "https://github.com/libp2p/js-libp2p/archive/${commitSha}.zip" | ||||||
unzip -o js-libp2p-${commitSha}.zip | ||||||
|
||||||
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 | ||||||
|
||||||
clean: | ||||||
rm -rf image.json js-libp2p-*.zip js-libp2p-* *-image.json | ||||||
-rm -rf image.json js-libp2p-*.zip js-libp2p-* *-image.json | ||||||
|
||||||
.PHONY: all clean browser-images load-image-json | ||||||
.PHONY: all clean browser-images load-image-json update-lock-file |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
On arm64, there are no prebuilt binaries for some dependency, so the system needs cmake to build that dependency.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
apt seems unhappy: