Remove p2pd from the build recipes

This commit is contained in:
Zahary Karadjov 2020-03-23 01:34:20 +02:00 committed by zah
parent 4623aa81ec
commit d7c36a677e
6 changed files with 14 additions and 33 deletions

View File

@ -9,7 +9,6 @@ init: # Scripts called at the very beginning
cache:
- NimBinaries
- p2pdCache
- jsonTestsCache
matrix:
@ -36,8 +35,8 @@ build_script:
test_script:
# the "go-checks" target fails in AppVeyor, for some reason; easier to disable than to debug
- mingw32-make -j2 ARCH_OVERRIDE=%PLATFORM% DISABLE_GO_CHECKS=1 P2PD_CACHE=p2pdCache LOG_LEVEL=TRACE
- mingw32-make -j2 ARCH_OVERRIDE=%PLATFORM% DISABLE_GO_CHECKS=1 P2PD_CACHE=p2pdCache LOG_LEVEL=TRACE NIMFLAGS="-d:testnet_servers_image"
- mingw32-make -j2 ARCH_OVERRIDE=%PLATFORM% DISABLE_GO_CHECKS=1 LOG_LEVEL=TRACE
- mingw32-make -j2 ARCH_OVERRIDE=%PLATFORM% DISABLE_GO_CHECKS=1 LOG_LEVEL=TRACE NIMFLAGS="-d:testnet_servers_image"
- mingw32-make -j2 ARCH_OVERRIDE=%PLATFORM% DISABLE_TEST_FIXTURES_SCRIPT=1 DISABLE_GO_CHECKS=1 test
deploy: off

View File

@ -37,7 +37,6 @@ TOOLS_CSV := $(subst $(SPACE),$(COMMA),$(TOOLS))
build-system-checks \
deps \
update \
p2pd \
test \
$(TOOLS) \
clean_eth2_network_simulation_files \
@ -80,7 +79,7 @@ build-system-checks:
}; \
exit 0
deps: | deps-common beacon_chain.nims p2pd
deps: | deps-common beacon_chain.nims
ifneq ($(USE_LIBBACKTRACE), 0)
deps: | libbacktrace
endif
@ -98,12 +97,6 @@ beacon_chain.nims:
libbacktrace:
+ $(MAKE) -C vendor/nim-libbacktrace BUILD_CXX_LIB=0
P2PD_CACHE :=
p2pd: | go-checks
BUILD_MSG="$(BUILD_MSG) $@" \
V=$(V) \
$(ENV_SCRIPT) $(BUILD_SYSTEM_DIR)/scripts/build_p2pd.sh "$(P2PD_CACHE)"
# Windows 10 with WSL enabled, but no distro installed, fails if "../../nimble.sh" is executed directly
# in a Makefile recipe but works when prefixing it with `bash`. No idea how the PATH is overridden.
DISABLE_TEST_FIXTURES_SCRIPT := 0
@ -121,7 +114,7 @@ $(TOOLS): | build deps
clean_eth2_network_simulation_files:
rm -rf tests/simulation/{data,validators}
eth2_network_simulation: | build deps p2pd clean_eth2_network_simulation_files process_dashboard
eth2_network_simulation: | build deps clean_eth2_network_simulation_files process_dashboard
+ GIT_ROOT="$$PWD" NIMFLAGS="$(NIMFLAGS)" LOG_LEVEL="$(LOG_LEVEL)" tests/simulation/start.sh
clean-testnet0:

View File

@ -17,12 +17,6 @@ jobs:
key: NimBinaries | $(Agent.OS) | $(PLATFORM) | "$(Build.SourceBranchName)" | "v2"
path: NimBinaries
- task: CacheBeta@1
displayName: 'cache p2pd binaries'
inputs:
key: p2pdCache | $(Agent.OS) | $(PLATFORM) | "$(Build.SourceBranchName)"
path: p2pdCache
- task: CacheBeta@1
displayName: 'cache official test fixtures'
inputs:
@ -71,8 +65,8 @@ jobs:
scripts/setup_official_tests.sh jsonTestsCache
mingw32-make -j2 ARCH_OVERRIDE=${PLATFORM} CI_CACHE=NimBinaries update
mingw32-make -j2 ARCH_OVERRIDE=${PLATFORM} fetch-dlls
mingw32-make -j2 ARCH_OVERRIDE=${PLATFORM} P2PD_CACHE=p2pdCache LOG_LEVEL=TRACE
mingw32-make -j2 ARCH_OVERRIDE=${PLATFORM} P2PD_CACHE=p2pdCache LOG_LEVEL=TRACE NIMFLAGS="-d:testnet_servers_image"
mingw32-make -j2 ARCH_OVERRIDE=${PLATFORM} LOG_LEVEL=TRACE
mingw32-make -j2 ARCH_OVERRIDE=${PLATFORM} LOG_LEVEL=TRACE NIMFLAGS="-d:testnet_servers_image"
file build/beacon_node
mingw32-make -j2 ARCH_OVERRIDE=${PLATFORM} DISABLE_TEST_FIXTURES_SCRIPT=1 test
displayName: 'build and test'

View File

@ -15,11 +15,11 @@ RUN cd /root \
&& make -j$(nproc) update \
&& make deps
# Please note that the commands above have the goal of caching the compilation
# of Nim and p2pd, but don't depend on the current git revision. This means
# that the cache can become outdated over time and you'll start seeing Nim
# being compiled on every run. If this happens, just prune your docker cache
# to get a fresh up-to-date version of Nim and p2pd.
# Please note that the commands above have the goal of caching the
# compilation of Nim, but don't depend on the current git revision.
# This means that the cache can become outdated over time and you'll
# start seeing Nim being compiled on every run. If this happens, just
# prune your docker cache to get a fresh up-to-date version of Nim.
ARG GIT_REVISION
ARG NETWORK_NIM_FLAGS
ARG MARCH_NIM_FLAGS
@ -43,7 +43,7 @@ RUN apt-get -qq update \
&& rm -rf /var/lib/apt/lists/* /tmp/* /var/tmp/*
# "COPY" creates new image layers, so we cram all we can into one command
COPY --from=build /root/nim-beacon-chain/docker/run_in_docker.sh /root/nim-beacon-chain/build/beacon_node /root/nim-beacon-chain/vendor/go/bin/p2pd /usr/bin/
COPY --from=build /root/nim-beacon-chain/docker/run_in_docker.sh /root/nim-beacon-chain/build/beacon_node /usr/bin/
MAINTAINER Zahary Karadjov <zahary@status.im>
LABEL description="Nimbus installation that can act as an ETH2 network bootstrap node."

View File

@ -6,7 +6,6 @@
# Deal with previous execution of the deamon leaving behind
# socket files that prevent the deamon from launching again
# inside the container:
killall p2pd
rm -rf /tmp/*
beacon_node "$@"

View File

@ -141,10 +141,9 @@ BOOTSTRAP_IP="127.0.0.1"
--genesis-offset=5 # Delay in seconds
cleanup() {
killall beacon_node p2pd &>/dev/null || true
killall beacon_node &>/dev/null || true
sleep 2
killall -9 beacon_node p2pd &>/dev/null || true
rm -f /tmp/nim-p2pd-*.sock || true
killall -9 beacon_node &>/dev/null || true
}
cleanup
@ -152,9 +151,6 @@ PIDS=""
NODES_WITH_VALIDATORS=${NODES_WITH_VALIDATORS:-4}
VALIDATORS_PER_NODE=$(( $RANDOM_VALIDATORS / $NODES_WITH_VALIDATORS ))
# for the p2pd path
source env.sh
for NUM_NODE in $(seq 0 $(( ${NUM_NODES} - 1 ))); do
if [[ ${NUM_NODE} == 0 ]]; then
BOOTSTRAP_ARG=""