Skip to content

Commit

Permalink
fix(perf): nim-libp2p - remove the docker's user option
Browse files Browse the repository at this point in the history
  • Loading branch information
lchenut committed Sep 29, 2023
1 parent 2758f09 commit 5cfd56d
Show file tree
Hide file tree
Showing 2 changed files with 9 additions and 3 deletions.
2 changes: 1 addition & 1 deletion perf/impl/Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@ HTTPS_SUBDIRS := $(wildcard https/*/.)
QUIC_GO_SUBDIRS := $(wildcard quic-go/*/.)
NIM_SUBDIRS := $(wildcard nim-libp2p/*/.)

all: $(RUST_SUBDIRS) $(GO_SUBDIRS) $(HTTPS_SUBDIRS) $(QUIC_GO_SUBDIRS)
all: $(RUST_SUBDIRS) $(GO_SUBDIRS) $(HTTPS_SUBDIRS) $(QUIC_GO_SUBDIRS) $(NIM_SUBDIRS)
$(RUST_SUBDIRS):
$(MAKE) -C $@
$(GO_SUBDIRS):
Expand Down
10 changes: 8 additions & 2 deletions perf/impl/nim-libp2p/v1.0/Makefile
Original file line number Diff line number Diff line change
@@ -1,9 +1,15 @@
commitSha := e03547ea3e2f0372c540c586e993803299d3c4b6
commitSha := 61929aed6c49b4753dbb8414b9c3ed572b4a2abc

all: perf

perf: perf.nim nim-libp2p
docker run --rm --user "$(shell id -u):$(shell id -g)" -v "$(shell pwd)":/usr/src/myapp -w /usr/src/myapp nimlang/nim:1.6.10 sh -c "cd nim-libp2p && nimble install_pinned && cd - && nim c --NimblePath:nim-libp2p/nimbledeps/pkgs -p:nim-libp2p -d:chronicles_log_level=WARN --threads:off -d:release perf.nim"
docker run --rm \
-v "$(shell pwd)":/usr/src/myapp -w /usr/src/myapp nimlang/nim:1.6.14 \
sh -c ' \
cd nim-libp2p && \
nimble install_pinned && cd ../ && \
nim c --NimblePath:nim-libp2p/nimbledeps/pkgs -p:nim-libp2p -d:chronicles_log_level=WARN --threads:off -d:release perf.nim && \
chown -R $(shell id -u):$(shell id -g) .'

nim-libp2p: nim-libp2p-${commitSha}
rm -rf nim-libp2p
Expand Down

0 comments on commit 5cfd56d

Please sign in to comment.