mirror of
https://gitlab.com/pulsechaincom/prysm-pulse.git
synced 2024-12-22 03:30:35 +00:00
49a0d3caf0
* Fix a few deps to work with go.mod, check in generated files * Update Gossipsub to 1.1 (#5998) * update libs * add new validators * add new deps * new set of deps * tls * further fix gossip update * get everything to build * clean up * gaz * fix build * fix all tests * add deps to images * imports Co-authored-by: rauljordan <raul@prysmaticlabs.com> * Beacon chain builds with go build * fix bazel * fix dep * lint * Add github action for testing go * on PR for any branch * fix libp2p test failure * Fix TestProcessBlock_PassesProcessingConditions by updating the proposer index in test * Revert "Fix TestProcessBlock_PassesProcessingConditions by updating the proposer index in test" This reverts commit 43676894ab01f03fe90a9b8ee3ecfbc2ec1ec4e4. * Compute and set proposer index instead of hard code * Add back go mod/sum, fix deps * go build ./... * Temporarily skip two tests * Fix kafka confluent patch * Fix kafka confluent patch * fix kafka build * fix kafka * Add info in DEPENDENCIES. Added a stub link for Why Bazel? until https://github.com/prysmaticlabs/documentation/issues/138 * Update fuzz ssz files as well * Update fuzz ssz files as well * getting closer * rollback rules_go and gazelle * fix gogo protobuf * install librdkafka-dev as part of github actions * Update kafka to a recent version where librkafkfa is not required for go modules * clarify comment * fix kafka build * disable go tests * comment * Fix geth dependencies for end to end * rename word * lint * fix docker Co-authored-by: Nishant Das <nishdas93@gmail.com> Co-authored-by: rauljordan <raul@prysmaticlabs.com> Co-authored-by: terence tsao <terence@prysmaticlabs.com>
230 lines
9.3 KiB
Plaintext
230 lines
9.3 KiB
Plaintext
# Print warnings for tests with inappropriate test size or timeout.
|
|
test --test_verbose_timeout_warnings
|
|
|
|
# Only build test targets when running bazel test //...
|
|
test --build_tests_only
|
|
test --test_output=errors
|
|
|
|
# Fix for rules_docker. See: https://github.com/bazelbuild/rules_docker/issues/842
|
|
build --host_force_python=PY2
|
|
test --host_force_python=PY2
|
|
run --host_force_python=PY2
|
|
|
|
# Networking is blocked for tests by default, add "requires-network" tag to your test if networking
|
|
# is required within the sandbox. This flag is no longer experimental after 0.29.0.
|
|
# Network sandboxing only works on linux.
|
|
--experimental_sandbox_default_allow_network=false
|
|
|
|
# Use mainnet protobufs at runtime
|
|
run --define ssz=mainnet
|
|
test --define ssz=mainnet
|
|
build --define ssz=mainnet
|
|
|
|
# Prevent PATH changes from rebuilding when switching from IDE to command line.
|
|
build --incompatible_strict_action_env
|
|
test --incompatible_strict_action_env
|
|
run --incompatible_strict_action_env
|
|
|
|
# Disable kafka by default, it takes a long time to build...
|
|
build --define kafka_enabled=false
|
|
test --define kafka_enabled=false
|
|
run --define kafka_enabled=false
|
|
|
|
build:kafka_enabled --define kafka_enabled=true
|
|
build:kafka_enabled --define gotags=kafka_enabled
|
|
|
|
# Release flags
|
|
build:release --workspace_status_command=./scripts/workspace_status.sh
|
|
build:release --stamp
|
|
build:release --compilation_mode=opt
|
|
build:release --config=llvm
|
|
|
|
# LLVM compiler for building C/C++ dependencies.
|
|
build:llvm --crosstool_top=@llvm_toolchain//:toolchain
|
|
build:llvm --define compiler=llvm
|
|
build:llvm --copt -fno-sanitize=vptr,function
|
|
build:llvm --linkopt -fno-sanitize=vptr,function
|
|
|
|
build:asan --copt -fsanitize=address,undefined
|
|
build:asan --copt -fno-omit-frame-pointer
|
|
build:asan --linkopt -fsanitize=address,undefined
|
|
build:asan --copt -fno-sanitize=vptr,function
|
|
build:asan --linkopt -fno-sanitize=vptr,function
|
|
build:asan --copt -DADDRESS_SANITIZER=1
|
|
build:asan --copt -D__SANITIZE_ADDRESS__
|
|
build:asan --linkopt -ldl
|
|
|
|
build:llvm-asan --config=llvm
|
|
build:llvm-asan --config=asan
|
|
build:llvm-asan --linkopt -fuse-ld=ld.lld
|
|
|
|
build:fuzz --define=gotags=libfuzzer
|
|
build:fuzz --config=llvm-asan
|
|
build:fuzz --copt=-fsanitize=fuzzer-no-link
|
|
build:fuzz --linkopt=-fsanitize=fuzzer
|
|
build:fuzz --copt=-fno-omit-frame-pointer
|
|
build:fuzz --define=FUZZING_ENGINE=libfuzzer
|
|
build:fuzz --copt=-DFUZZING_BUILD_MODE_UNSAFE_FOR_PRODUCTION
|
|
build:fuzz --linkopt -Wl,--no-as-needed
|
|
build:fuzz --define=gc_goopts=-d=libfuzzer
|
|
build:fuzz --run_under=//tools:fuzz_wrapper
|
|
build:fuzz --compilation_mode=opt
|
|
|
|
test:fuzz --local_test_jobs="HOST_CPUS*.5"
|
|
|
|
test:fuzzit --config=fuzz
|
|
test:fuzzit --test_env=FUZZIT_API_KEY
|
|
test:fuzzit --test_env=PRYSM_BUILD_IMAGE=gcr.io/prysmaticlabs/prysm-fuzzit:v0.11.0
|
|
test:fuzzit --test_timeout=1200
|
|
test:fuzzit --run_under=//tools:fuzzit_wrapper
|
|
|
|
# Build binary with cgo symbolizer for debugging / profiling.
|
|
build:cgo_symbolizer --config=llvm
|
|
build:cgo_symbolizer --copt=-g
|
|
build:cgo_symbolizer --define=USE_CGO_SYMBOLIZER=true
|
|
build:cgo_symbolizer -c dbg
|
|
|
|
# multi-arch cross-compiling toolchain configs:
|
|
-----------------------------------------------
|
|
build:cross --crosstool_top=@prysm_toolchains//:multiarch_toolchain
|
|
build:cross --host_platform=@io_bazel_rules_go//go/toolchain:linux_amd64
|
|
build:cross --host_crosstool_top=@prysm_toolchains//:hostonly_toolchain
|
|
|
|
# linux_amd64 config for cross compiler toolchain, not strictly necessary since host/exec env is amd64
|
|
build:linux_amd64 --platforms=@io_bazel_rules_go//go/toolchain:linux_amd64_cgo
|
|
|
|
# osx_amd64 config for cross compiler toolchain
|
|
build:osx_amd64 --config=cross
|
|
build:osx_amd64 --platforms=@io_bazel_rules_go//go/toolchain:darwin_amd64_cgo
|
|
build:osx_amd64 --compiler=osxcross
|
|
|
|
# windows
|
|
build:windows_amd64 --config=cross
|
|
build:windows_amd64 --platforms=@io_bazel_rules_go//go/toolchain:windows_amd64_cgo
|
|
build:windows_amd64 --compiler=mingw-w64
|
|
|
|
# linux_arm64 conifg for cross compiler toolchain
|
|
build:linux_arm64 --config=cross
|
|
build:linux_arm64 --platforms=@io_bazel_rules_go//go/toolchain:linux_arm64_cgo
|
|
build:linux_arm64 --copt=-funsafe-math-optimizations
|
|
build:linux_arm64 --copt=-ftree-vectorize
|
|
build:linux_arm64 --copt=-fomit-frame-pointer
|
|
build:linux_arm64 --cpu=aarch64
|
|
build:linux_arm64 --compiler=clang
|
|
build:linux_arm64 --copt=-march=armv8-a
|
|
|
|
|
|
# toolchain build debug configs
|
|
#------------------------------
|
|
build:debug --sandbox_debug
|
|
build:debug --toolchain_resolution_debug
|
|
build:debug --verbose_failures
|
|
build:debug -s
|
|
|
|
# windows debug
|
|
build:windows_amd64_debug --config=windows_amd64
|
|
build:windows_amd64_debug --config=debug
|
|
|
|
# osx_amd64 debug config
|
|
build:osx_amd64_debug --config=debug
|
|
build:osx_amd64_debug --config=osx_amd64
|
|
|
|
# linux_arm64_debug
|
|
build:linux_arm64_debug --config=linux_arm64
|
|
build:linux_arm64_debug --config=debug
|
|
|
|
# linux_amd64_debug
|
|
build:linux_amd64_debug --config=linux_amd64
|
|
build:linux_amd64_debug --config=debug
|
|
|
|
|
|
# Docker Sandbox Configs
|
|
#-----------------------
|
|
# Note all docker sandbox configs must run from a linux x86_64 host
|
|
# build:docker-sandbox --experimental_docker_image=gcr.io/prysmaticlabs/rbe-worker:latest
|
|
build:docker-sandbox --spawn_strategy=docker --strategy=Javac=docker --genrule_strategy=docker
|
|
build:docker-sandbox --define=EXECUTOR=remote
|
|
build:docker-sandbox --experimental_docker_verbose
|
|
build:docker-sandbox --experimental_enable_docker_sandbox
|
|
build:docker-sandbox --crosstool_top=@rbe_ubuntu_clang//cc:toolchain
|
|
build:docker-sandbox --host_javabase=@rbe_ubuntu_clang//java:jdk
|
|
build:docker-sandbox --javabase=@rbe_ubuntu_clang//java:jdk
|
|
build:docker-sandbox --host_java_toolchain=@bazel_tools//tools/jdk:toolchain_hostjdk8
|
|
build:docker-sandbox --java_toolchain=@bazel_tools//tools/jdk:toolchain_hostjdk8
|
|
build:docker-sandbox --extra_execution_platforms=@rbe_ubuntu_clang//config:platform
|
|
build:docker-sandbox --host_platform=@rbe_ubuntu_clang//config:platform
|
|
build:docker-sandbox --platforms=@rbe_ubuntu_clang//config:platform
|
|
build:docker-sandbox --extra_toolchains=@prysm_toolchains//:cc-toolchain-multiarch
|
|
|
|
# windows_amd64 docker sandbox build config
|
|
build:windows_amd64_docker --config=docker-sandbox --config=windows_amd64
|
|
build:windows_amd64_docker_debug --config=windows_amd64_docker --config=debug
|
|
|
|
# osx_amd64 docker sandbox build config
|
|
build:osx_amd64_docker --config=docker-sandbox --config=osx_amd64
|
|
build:osx_amd64_docker_debug --config=osx_amd64_docker --config=debug
|
|
|
|
# linux_arm64 docker sandbox build config
|
|
build:linux_arm64_docker --config=docker-sandbox --config=linux_arm64
|
|
build:linux_arm64_docker_debug --config=linux_arm64_docker --config=debug
|
|
|
|
# linux_amd64 docker sandbox build config
|
|
build:linux_amd64_docker --config=docker-sandbox --config=linux_amd64
|
|
build:linux_amd64_docker_debug --config=linux_amd64_docker --config=debug
|
|
|
|
|
|
# Remote Build Execution
|
|
#-----------------------
|
|
# Originally from https://github.com/bazelbuild/bazel-toolchains/blob/master/bazelrc/bazel-2.0.0.bazelrc
|
|
#
|
|
# Depending on how many machines are in the remote execution instance, setting
|
|
# this higher can make builds faster by allowing more jobs to run in parallel.
|
|
# Setting it too high can result in jobs that timeout, however, while waiting
|
|
# for a remote machine to execute them.
|
|
build:remote --jobs=50
|
|
|
|
# Set several flags related to specifying the platform, toolchain and java
|
|
# properties.
|
|
# These flags should only be used as is for the rbe-ubuntu16-04 container
|
|
# and need to be adapted to work with other toolchain containers.
|
|
build:remote --host_javabase=@rbe_ubuntu_clang//java:jdk
|
|
build:remote --javabase=@rbe_ubuntu_clang//java:jdk
|
|
build:remote --host_java_toolchain=@bazel_tools//tools/jdk:toolchain_hostjdk8
|
|
build:remote --java_toolchain=@bazel_tools//tools/jdk:toolchain_hostjdk8
|
|
build:remote --crosstool_top=@rbe_ubuntu_clang//cc:toolchain
|
|
build:remote --action_env=BAZEL_DO_NOT_DETECT_CPP_TOOLCHAIN=1
|
|
# Platform flags:
|
|
# The toolchain container used for execution is defined in the target indicated
|
|
# by "extra_execution_platforms", "host_platform" and "platforms".
|
|
# More about platforms: https://docs.bazel.build/versions/master/platforms.html
|
|
build:remote --extra_toolchains=@rbe_ubuntu_clang//config:cc-toolchain
|
|
build:remote --extra_execution_platforms=@rbe_ubuntu_clang//config:platform
|
|
build:remote --host_platform=@rbe_ubuntu_clang//config:platform
|
|
build:remote --platforms=@rbe_ubuntu_clang//config:platform
|
|
|
|
# Starting with Bazel 0.27.0 strategies do not need to be explicitly
|
|
# defined. See https://github.com/bazelbuild/bazel/issues/7480
|
|
build:remote --define=EXECUTOR=remote
|
|
|
|
# Enable remote execution so actions are performed on the remote systems.
|
|
# build:remote --remote_executor=grpcs://remotebuildexecution.googleapis.com
|
|
|
|
# Enforce stricter environment rules, which eliminates some non-hermetic
|
|
# behavior and therefore improves both the remote cache hit rate and the
|
|
# correctness and repeatability of the build.
|
|
build:remote --incompatible_strict_action_env=true
|
|
|
|
# Set a higher timeout value, just in case.
|
|
build:remote --remote_timeout=3600
|
|
|
|
# Enable authentication. This will pick up application default credentials by
|
|
# default. You can use --google_credentials=some_file.json to use a service
|
|
# account credential instead.
|
|
# build:remote --google_default_credentials=true
|
|
|
|
# Enable build without the bytes
|
|
# See: https://github.com/bazelbuild/bazel/issues/6862
|
|
build:remote --experimental_remote_download_outputs=toplevel --experimental_inmemory_jdeps_files --experimental_inmemory_dotd_files
|
|
|
|
build:remote --remote_local_fallback
|