mirror of
https://github.com/status-im/nimbus-eth1.git
synced 2025-01-12 05:14:14 +00:00
build p2pd and run some client tests
(with `make V=0 test-libp2p-daemon`)
This commit is contained in:
parent
a99b3f2096
commit
12d18a1fd6
4
.gitignore
vendored
4
.gitignore
vendored
@ -6,6 +6,10 @@
|
|||||||
# Nimble packages
|
# Nimble packages
|
||||||
/vendor/.nimble
|
/vendor/.nimble
|
||||||
|
|
||||||
|
# Go packages
|
||||||
|
/vendor/go
|
||||||
|
!/vendor/go/src/github.com/libp2p/go-libp2p-daemon
|
||||||
|
|
||||||
# ntags/ctags output
|
# ntags/ctags output
|
||||||
/tags
|
/tags
|
||||||
|
|
||||||
|
10
.gitmodules
vendored
10
.gitmodules
vendored
@ -123,3 +123,13 @@
|
|||||||
url = https://github.com/OpenSystemsLab/tempfile.nim.git
|
url = https://github.com/OpenSystemsLab/tempfile.nim.git
|
||||||
ignore = dirty
|
ignore = dirty
|
||||||
branch = master
|
branch = master
|
||||||
|
[submodule "vendor/go/src/github.com/libp2p/go-libp2p-daemon"]
|
||||||
|
path = vendor/go/src/github.com/libp2p/go-libp2p-daemon
|
||||||
|
url = https://github.com/libp2p/go-libp2p-daemon.git
|
||||||
|
ignore = dirty
|
||||||
|
branch = master
|
||||||
|
[submodule "vendor/nim-libp2p"]
|
||||||
|
path = vendor/nim-libp2p
|
||||||
|
url = https://github.com/status-im/nim-libp2p.git
|
||||||
|
ignore = dirty
|
||||||
|
branch = master
|
||||||
|
19
Makefile
19
Makefile
@ -137,7 +137,7 @@ test-reproducibility:
|
|||||||
|
|
||||||
# usual cleaning
|
# usual cleaning
|
||||||
clean:
|
clean:
|
||||||
rm -rf build/{nimbus,premix,persist,debug,dumper,hunter,all_tests,beacon_node,validator_keygen,*.exe} \
|
rm -rf build/{nimbus,premix,persist,debug,dumper,hunter,all_tests,beacon_node,validator_keygen,*.exe} vendor/go/bin \
|
||||||
$(NIMBLE_DIR) $(NIM_BINARY) $(NIM_DIR)/nimcache nimcache
|
$(NIMBLE_DIR) $(NIM_BINARY) $(NIM_DIR)/nimcache nimcache
|
||||||
|
|
||||||
# dangerous cleaning, because you may have not-yet-pushed branches and commits in those vendor repos you're about to delete
|
# dangerous cleaning, because you may have not-yet-pushed branches and commits in those vendor repos you're about to delete
|
||||||
@ -172,10 +172,6 @@ status: | $(REPOS)
|
|||||||
$(eval CMD := $(GIT_STATUS))
|
$(eval CMD := $(GIT_STATUS))
|
||||||
$(RUN_CMD_IN_ALL_REPOS)
|
$(RUN_CMD_IN_ALL_REPOS)
|
||||||
|
|
||||||
# https://bitbucket.org/nimcontrib/ntags/ - currently fails with "out of memory"
|
|
||||||
ntags:
|
|
||||||
ntags -R .
|
|
||||||
|
|
||||||
#- actually binaries, but have them as phony targets to force rebuilds
|
#- actually binaries, but have them as phony targets to force rebuilds
|
||||||
beacon_node validator_keygen: | build deps
|
beacon_node validator_keygen: | build deps
|
||||||
$(ENV_SCRIPT) nim c $(NIM_PARAMS) -o:build/$@ $(REPOS_DIR)/nim-beacon-chain/beacon_chain/$@.nim
|
$(ENV_SCRIPT) nim c $(NIM_PARAMS) -o:build/$@ $(REPOS_DIR)/nim-beacon-chain/beacon_chain/$@.nim
|
||||||
@ -186,6 +182,19 @@ clean_eth2_network_simulation_files:
|
|||||||
eth2_network_simulation: | beacon_node validator_keygen clean_eth2_network_simulation_files
|
eth2_network_simulation: | beacon_node validator_keygen clean_eth2_network_simulation_files
|
||||||
SKIP_BUILDS=1 $(ENV_SCRIPT) $(REPOS_DIR)/nim-beacon-chain/tests/simulation/start.sh
|
SKIP_BUILDS=1 $(ENV_SCRIPT) $(REPOS_DIR)/nim-beacon-chain/tests/simulation/start.sh
|
||||||
|
|
||||||
|
vendor/go/bin/p2pd:
|
||||||
|
cd vendor/go/src/github.com/libp2p/go-libp2p-daemon && \
|
||||||
|
$(ENV_SCRIPT) $(MAKE)
|
||||||
|
|
||||||
|
test-libp2p-daemon: | vendor/go/bin/p2pd deps
|
||||||
|
cd vendor/nim-libp2p && \
|
||||||
|
$(ENV_SCRIPT) nim c -r $(NIM_PARAMS) tests/testdaemon.nim && \
|
||||||
|
rm -f tests/testdaemon
|
||||||
|
|
||||||
|
# https://bitbucket.org/nimcontrib/ntags/ - currently fails with "out of memory"
|
||||||
|
ntags:
|
||||||
|
ntags -R .
|
||||||
|
|
||||||
#- a few files need to be excluded because they trigger an infinite loop in https://github.com/universal-ctags/ctags
|
#- a few files need to be excluded because they trigger an infinite loop in https://github.com/universal-ctags/ctags
|
||||||
#- limiting it to Nim files, because there are a lot of C files we don't care about
|
#- limiting it to Nim files, because there are a lot of C files we don't care about
|
||||||
ctags:
|
ctags:
|
||||||
|
5
env.sh
5
env.sh
@ -7,8 +7,11 @@ uname | grep -qi mingw && PWD_CMD="pwd -W"
|
|||||||
rel_path="$(dirname $0)"
|
rel_path="$(dirname $0)"
|
||||||
abs_path="$(cd $rel_path; ${PWD_CMD})"
|
abs_path="$(cd $rel_path; ${PWD_CMD})"
|
||||||
|
|
||||||
|
# used by libp2p/go-libp2p-daemon
|
||||||
|
export GOPATH="${abs_path}/vendor/go"
|
||||||
|
|
||||||
# make it an absolute path, so we can call this script from other dirs
|
# make it an absolute path, so we can call this script from other dirs
|
||||||
export PATH="${abs_path}/vendor/Nim/bin:$PATH"
|
export PATH="${abs_path}/vendor/Nim/bin:${GOPATH}/bin:${PATH}"
|
||||||
|
|
||||||
# Nimble needs this to be an absolute path
|
# Nimble needs this to be an absolute path
|
||||||
export NIMBLE_DIR="${abs_path}/vendor/.nimble"
|
export NIMBLE_DIR="${abs_path}/vendor/.nimble"
|
||||||
|
1
vendor/go/src/github.com/libp2p/go-libp2p-daemon
vendored
Submodule
1
vendor/go/src/github.com/libp2p/go-libp2p-daemon
vendored
Submodule
@ -0,0 +1 @@
|
|||||||
|
Subproject commit de7ca070e6f487655d787d82d819e70ca96ada2d
|
1
vendor/nim-libp2p
vendored
Submodule
1
vendor/nim-libp2p
vendored
Submodule
@ -0,0 +1 @@
|
|||||||
|
Subproject commit cb334cc8ab186496d8b73d5a2fe1b6298598b7f6
|
Loading…
x
Reference in New Issue
Block a user