mirror of
https://gitlab.com/pulsechaincom/prysm-pulse.git
synced 2024-12-22 19:40:37 +00:00
93c11e0e53
* Update rules_go * go 1.15 * try with v0.24.2 * Update Mac OS X SDK * gaz * update SDK in toolchain config * -I flag * another -I flag * Update rules_go, gazelle, bazel version * regen, update rules_docker * Revert "another -I flag" This reverts commit 9255133d99bee1e94560a64316a4a7539a363935. * Revert "-I flag" This reverts commit 2954a41d76adc81ccb6281af243f4be1f79152e9. * giving up * Use OS X 10.12 * Use OS X 10.12 * Revert "Use OS X 10.12" This reverts commit 4f60d5cb807b2ccccd484a85a6a7477a5fd13e28. * Revert "Use OS X 10.12" This reverts commit a79177fab7182ad792d1cee7fb61214ef8bd73ab. * osx toolchain tweaks necessary to work with 10.15 mac sdk * Update docker image, regen * gaz * test using custom image * Revert "test using custom image" This reverts commit 95b8666810a254f16061c99e2ea0ae4d020b2f2d. * explicit go version * Clean up docker image rules with new definitions. gazelle * please the linter * Update protobuf compiler to 3.13.0, run gazelle * Update gazelle to fix empty build files. https://github.com/bazelbuild/bazel-gazelle/pull/926 * update skylib * fix herumi fuzz build * remove comment from tools/cross-toolchain/regenerate.sh Co-authored-by: rkapka <rkapka@wp.pl> Co-authored-by: SuburbanDad <gts.mobile@gmail.com> Co-authored-by: prylabs-bulldozer[bot] <58059840+prylabs-bulldozer[bot]@users.noreply.github.com>
379 lines
12 KiB
Python
379 lines
12 KiB
Python
workspace(name = "prysm")
|
|
|
|
load("@bazel_tools//tools/build_defs/repo:http.bzl", "http_archive")
|
|
load("@bazel_tools//tools/build_defs/repo:git.bzl", "git_repository")
|
|
|
|
http_archive(
|
|
name = "bazel_toolchains",
|
|
sha256 = "8e0633dfb59f704594f19ae996a35650747adc621ada5e8b9fb588f808c89cb0",
|
|
strip_prefix = "bazel-toolchains-3.7.0",
|
|
urls = [
|
|
"https://mirror.bazel.build/github.com/bazelbuild/bazel-toolchains/releases/download/3.7.0/bazel-toolchains-3.7.0.tar.gz",
|
|
"https://github.com/bazelbuild/bazel-toolchains/releases/download/3.7.0/bazel-toolchains-3.7.0.tar.gz",
|
|
],
|
|
)
|
|
|
|
http_archive(
|
|
name = "com_grail_bazel_toolchain",
|
|
sha256 = "b924b102adc0c3368d38a19bd971cb4fa75362a27bc363d0084b90ca6877d3f0",
|
|
strip_prefix = "bazel-toolchain-0.5.7",
|
|
urls = ["https://github.com/grailbio/bazel-toolchain/archive/0.5.7.tar.gz"],
|
|
)
|
|
|
|
load("@com_grail_bazel_toolchain//toolchain:deps.bzl", "bazel_toolchain_dependencies")
|
|
|
|
bazel_toolchain_dependencies()
|
|
|
|
load("@com_grail_bazel_toolchain//toolchain:rules.bzl", "llvm_toolchain")
|
|
|
|
llvm_toolchain(
|
|
name = "llvm_toolchain",
|
|
llvm_version = "10.0.0",
|
|
)
|
|
|
|
load("@llvm_toolchain//:toolchains.bzl", "llvm_register_toolchains")
|
|
|
|
llvm_register_toolchains()
|
|
|
|
load("@prysm//tools/cross-toolchain:prysm_toolchains.bzl", "configure_prysm_toolchains")
|
|
|
|
configure_prysm_toolchains()
|
|
|
|
load("@prysm//tools/cross-toolchain:rbe_toolchains_config.bzl", "rbe_toolchains_config")
|
|
|
|
rbe_toolchains_config()
|
|
|
|
load("@bazel_tools//tools/build_defs/repo:http.bzl", "http_archive")
|
|
|
|
http_archive(
|
|
name = "bazel_skylib",
|
|
sha256 = "1c531376ac7e5a180e0237938a2536de0c54d93f5c278634818e0efc952dd56c",
|
|
urls = [
|
|
"https://github.com/bazelbuild/bazel-skylib/releases/download/1.0.3/bazel-skylib-1.0.3.tar.gz",
|
|
"https://mirror.bazel.build/github.com/bazelbuild/bazel-skylib/releases/download/1.0.3/bazel-skylib-1.0.3.tar.gz",
|
|
],
|
|
)
|
|
|
|
load("@bazel_skylib//:workspace.bzl", "bazel_skylib_workspace")
|
|
|
|
bazel_skylib_workspace()
|
|
|
|
http_archive(
|
|
name = "bazel_gazelle",
|
|
sha256 = "209b1a3a4719f3bf613f787fb97389c9aaea195d633d9485c40ed1de18c059f1",
|
|
strip_prefix = "bazel-gazelle-97d00015cfacc708d88e382f08eab8a1a31c3bef",
|
|
urls = [
|
|
"https://github.com/bazelbuild/bazel-gazelle/archive/97d00015cfacc708d88e382f08eab8a1a31c3bef.tar.gz",
|
|
],
|
|
)
|
|
|
|
http_archive(
|
|
name = "com_github_atlassian_bazel_tools",
|
|
sha256 = "60821f298a7399450b51b9020394904bbad477c18718d2ad6c789f231e5b8b45",
|
|
strip_prefix = "bazel-tools-a2138311856f55add11cd7009a5abc8d4fd6f163",
|
|
urls = ["https://github.com/atlassian/bazel-tools/archive/a2138311856f55add11cd7009a5abc8d4fd6f163.tar.gz"],
|
|
)
|
|
|
|
http_archive(
|
|
name = "io_bazel_rules_docker",
|
|
sha256 = "1698624e878b0607052ae6131aa216d45ebb63871ec497f26c67455b34119c80",
|
|
strip_prefix = "rules_docker-0.15.0",
|
|
urls = ["https://github.com/bazelbuild/rules_docker/releases/download/v0.15.0/rules_docker-v0.15.0.tar.gz"],
|
|
)
|
|
|
|
http_archive(
|
|
name = "io_bazel_rules_go",
|
|
patch_args = ["-p1"],
|
|
patches = [
|
|
# Required until https://github.com/bazelbuild/rules_go/pull/2450 merges otherwise nilness
|
|
# nogo check fails for certain third_party dependencies.
|
|
"//third_party:io_bazel_rules_go.patch",
|
|
],
|
|
sha256 = "d1ffd055969c8f8d431e2d439813e42326961d0942bdf734d2c95dc30c369566",
|
|
urls = [
|
|
"https://mirror.bazel.build/github.com/bazelbuild/rules_go/releases/download/v0.24.5/rules_go-v0.24.5.tar.gz",
|
|
"https://github.com/bazelbuild/rules_go/releases/download/v0.24.5/rules_go-v0.24.5.tar.gz",
|
|
],
|
|
)
|
|
|
|
# Override default import in rules_go with special patch until
|
|
# https://github.com/gogo/protobuf/pull/582 is merged.
|
|
git_repository(
|
|
name = "com_github_gogo_protobuf",
|
|
commit = "5628607bb4c51c3157aacc3a50f0ab707582b805",
|
|
patch_args = ["-p1"],
|
|
patches = [
|
|
"@io_bazel_rules_go//third_party:com_github_gogo_protobuf-gazelle.patch",
|
|
"//third_party:com_github_gogo_protobuf-equal.patch",
|
|
],
|
|
remote = "https://github.com/gogo/protobuf",
|
|
shallow_since = "1571033717 +0200",
|
|
# gazelle args: -go_prefix github.com/gogo/protobuf -proto legacy
|
|
)
|
|
|
|
http_archive(
|
|
name = "fuzzit_linux",
|
|
build_file_content = "exports_files([\"fuzzit\"])",
|
|
sha256 = "9ca76ac1c22d9360936006efddf992977ebf8e4788ded8e5f9d511285c9ac774",
|
|
urls = ["https://github.com/fuzzitdev/fuzzit/releases/download/v2.4.76/fuzzit_Linux_x86_64.zip"],
|
|
)
|
|
|
|
git_repository(
|
|
name = "graknlabs_bazel_distribution",
|
|
commit = "962f3a7e56942430c0ec120c24f9e9f2a9c2ce1a",
|
|
remote = "https://github.com/graknlabs/bazel-distribution",
|
|
shallow_since = "1569509514 +0300",
|
|
)
|
|
|
|
load(
|
|
"@io_bazel_rules_docker//repositories:repositories.bzl",
|
|
container_repositories = "repositories",
|
|
)
|
|
|
|
container_repositories()
|
|
|
|
load(
|
|
"@io_bazel_rules_docker//container:container.bzl",
|
|
"container_pull",
|
|
)
|
|
|
|
container_pull(
|
|
name = "alpine_cc_linux_amd64",
|
|
digest = "sha256:3f7f4dfcb6dceac3a902f36609cc232262e49f5656a6dc4bb3da89e35fecc8a5",
|
|
registry = "index.docker.io",
|
|
repository = "fasibio/alpine-libgcc",
|
|
)
|
|
|
|
container_pull(
|
|
name = "fuzzit_base",
|
|
digest = "sha256:24a39a4360b07b8f0121eb55674a2e757ab09f0baff5569332fefd227ee4338f",
|
|
registry = "gcr.io",
|
|
repository = "fuzzit-public/stretch-llvm8",
|
|
)
|
|
|
|
load("@io_bazel_rules_go//go:deps.bzl", "go_register_toolchains", "go_rules_dependencies")
|
|
|
|
go_rules_dependencies()
|
|
|
|
go_register_toolchains(
|
|
go_version = "1.15.3",
|
|
nogo = "@//:nogo",
|
|
)
|
|
|
|
load("@bazel_gazelle//:deps.bzl", "gazelle_dependencies")
|
|
|
|
gazelle_dependencies()
|
|
|
|
load("@io_bazel_rules_go//extras:embed_data_deps.bzl", "go_embed_data_dependencies")
|
|
|
|
go_embed_data_dependencies()
|
|
|
|
load("@com_github_atlassian_bazel_tools//gometalinter:deps.bzl", "gometalinter_dependencies")
|
|
|
|
gometalinter_dependencies()
|
|
|
|
load(
|
|
"@io_bazel_rules_docker//go:image.bzl",
|
|
_go_image_repos = "repositories",
|
|
)
|
|
|
|
# Golang images
|
|
# This is using gcr.io/distroless/base
|
|
_go_image_repos()
|
|
|
|
# CC images
|
|
# This is using gcr.io/distroless/base
|
|
load(
|
|
"@io_bazel_rules_docker//cc:image.bzl",
|
|
_cc_image_repos = "repositories",
|
|
)
|
|
|
|
_cc_image_repos()
|
|
|
|
http_archive(
|
|
name = "prysm_testnet_site",
|
|
build_file_content = """
|
|
proto_library(
|
|
name = "faucet_proto",
|
|
srcs = ["src/proto/faucet.proto"],
|
|
visibility = ["//visibility:public"],
|
|
)""",
|
|
sha256 = "29742136ff9faf47343073c4569a7cf21b8ed138f726929e09e3c38ab83544f7",
|
|
strip_prefix = "prysm-testnet-site-5c711600f0a77fc553b18cf37b880eaffef4afdb",
|
|
url = "https://github.com/prestonvanloon/prysm-testnet-site/archive/5c711600f0a77fc553b18cf37b880eaffef4afdb.tar.gz",
|
|
)
|
|
|
|
http_archive(
|
|
name = "io_kubernetes_build",
|
|
sha256 = "b84fbd1173acee9d02a7d3698ad269fdf4f7aa081e9cecd40e012ad0ad8cfa2a",
|
|
strip_prefix = "repo-infra-6537f2101fb432b679f3d103ee729dd8ac5d30a0",
|
|
url = "https://github.com/kubernetes/repo-infra/archive/6537f2101fb432b679f3d103ee729dd8ac5d30a0.tar.gz",
|
|
)
|
|
|
|
http_archive(
|
|
name = "eth2_spec_tests_general",
|
|
build_file_content = """
|
|
filegroup(
|
|
name = "test_data",
|
|
srcs = glob([
|
|
"**/*.ssz",
|
|
"**/*.yaml",
|
|
]),
|
|
visibility = ["//visibility:public"],
|
|
)
|
|
""",
|
|
sha256 = "6b3498001de98c477aa2c256beffc20a85ce1b12b8e0f8e88502a5c3a18c01de",
|
|
url = "https://github.com/ethereum/eth2.0-spec-tests/releases/download/v1.0.0-rc.0/general.tar.gz",
|
|
)
|
|
|
|
http_archive(
|
|
name = "eth2_spec_tests_minimal",
|
|
build_file_content = """
|
|
filegroup(
|
|
name = "test_data",
|
|
srcs = glob([
|
|
"**/*.ssz",
|
|
"**/*.yaml",
|
|
]),
|
|
visibility = ["//visibility:public"],
|
|
)
|
|
""",
|
|
sha256 = "72c2f561db879ddcdf729fef93d10e0f9162b4cf3a697c513ef8935b93f6165a",
|
|
url = "https://github.com/ethereum/eth2.0-spec-tests/releases/download/v0.12.3/minimal.tar.gz",
|
|
)
|
|
|
|
http_archive(
|
|
name = "eth2_spec_tests_mainnet",
|
|
build_file_content = """
|
|
filegroup(
|
|
name = "test_data",
|
|
srcs = glob([
|
|
"**/*.ssz",
|
|
"**/*.yaml",
|
|
]),
|
|
visibility = ["//visibility:public"],
|
|
)
|
|
""",
|
|
sha256 = "63eca02503692a0b6a2d7b70118e0dd62dff094153a3a542af6dbea721841b0d",
|
|
url = "https://github.com/ethereum/eth2.0-spec-tests/releases/download/v0.12.3/mainnet.tar.gz",
|
|
)
|
|
|
|
http_archive(
|
|
name = "com_github_bazelbuild_buildtools",
|
|
sha256 = "b5d7dbc6832f11b6468328a376de05959a1a9e4e9f5622499d3bab509c26b46a",
|
|
strip_prefix = "buildtools-bf564b4925ab5876a3f64d8b90fab7f769013d42",
|
|
url = "https://github.com/bazelbuild/buildtools/archive/bf564b4925ab5876a3f64d8b90fab7f769013d42.zip",
|
|
)
|
|
|
|
load("@com_github_bazelbuild_buildtools//buildifier:deps.bzl", "buildifier_dependencies")
|
|
|
|
buildifier_dependencies()
|
|
|
|
git_repository(
|
|
name = "com_google_protobuf",
|
|
commit = "fde7cf7358ec7cd69e8db9be4f1fa6a5c431386a", # v3.13.0
|
|
remote = "https://github.com/protocolbuffers/protobuf",
|
|
shallow_since = "1597443653 -0700",
|
|
)
|
|
|
|
load("@com_google_protobuf//:protobuf_deps.bzl", "protobuf_deps")
|
|
|
|
protobuf_deps()
|
|
|
|
# Group the sources of the library so that CMake rule have access to it
|
|
all_content = """filegroup(name = "all", srcs = glob(["**"]), visibility = ["//visibility:public"])"""
|
|
|
|
http_archive(
|
|
name = "rules_foreign_cc",
|
|
sha256 = "b85ce66a3410f7370d1a9a61dfe3a29c7532b7637caeb2877d8d0dfd41d77abb",
|
|
strip_prefix = "rules_foreign_cc-3515b20a2417c4dd51c8a4a8cac1f6ecf3c6d934",
|
|
url = "https://github.com/bazelbuild/rules_foreign_cc/archive/3515b20a2417c4dd51c8a4a8cac1f6ecf3c6d934.zip",
|
|
)
|
|
|
|
load("@rules_foreign_cc//:workspace_definitions.bzl", "rules_foreign_cc_dependencies")
|
|
|
|
rules_foreign_cc_dependencies([
|
|
"@prysm//:built_cmake_toolchain",
|
|
])
|
|
|
|
http_archive(
|
|
name = "librdkafka",
|
|
build_file_content = all_content,
|
|
sha256 = "3b99a36c082a67ef6295eabd4fb3e32ab0bff7c6b0d397d6352697335f4e57eb",
|
|
strip_prefix = "librdkafka-1.4.2",
|
|
urls = ["https://github.com/edenhill/librdkafka/archive/v1.4.2.tar.gz"],
|
|
)
|
|
|
|
http_archive(
|
|
name = "sigp_beacon_fuzz_corpora",
|
|
build_file = "//third_party:beacon-fuzz/corpora.BUILD",
|
|
sha256 = "42993d0901a316afda45b4ba6d53c7c21f30c551dcec290a4ca131c24453d1ef",
|
|
strip_prefix = "beacon-fuzz-corpora-bac24ad78d45cc3664c0172241feac969c1ac29b",
|
|
urls = [
|
|
"https://github.com/sigp/beacon-fuzz-corpora/archive/bac24ad78d45cc3664c0172241feac969c1ac29b.tar.gz",
|
|
],
|
|
)
|
|
|
|
# External dependencies
|
|
|
|
http_archive(
|
|
name = "sszgen", # Hack because we don't want to build this binary with libfuzzer, but need it to build.
|
|
build_file_content = """
|
|
load("@io_bazel_rules_go//go:def.bzl", "go_library", "go_binary")
|
|
|
|
go_library(
|
|
name = "go_default_library",
|
|
srcs = [
|
|
"sszgen/main.go",
|
|
"sszgen/marshal.go",
|
|
"sszgen/size.go",
|
|
"sszgen/unmarshal.go",
|
|
],
|
|
importpath = "github.com/ferranbt/fastssz/sszgen",
|
|
visibility = ["//visibility:private"],
|
|
)
|
|
|
|
go_binary(
|
|
name = "sszgen",
|
|
embed = [":go_default_library"],
|
|
visibility = ["//visibility:public"],
|
|
)
|
|
""",
|
|
strip_prefix = "fastssz-06015a5d84f9e4eefe2c21377ca678fa8f1a1b09",
|
|
urls = ["https://github.com/ferranbt/fastssz/archive/06015a5d84f9e4eefe2c21377ca678fa8f1a1b09.tar.gz"],
|
|
)
|
|
|
|
http_archive(
|
|
name = "prysm_web_ui",
|
|
build_file_content = """
|
|
filegroup(
|
|
name = "site",
|
|
srcs = glob(["**/*"]),
|
|
visibility = ["//visibility:public"],
|
|
)
|
|
""",
|
|
sha256 = "6bb16ff0dc9348090cc31a9ea453643d32b617e66ac6e7bb38985d530070631b",
|
|
urls = [
|
|
"https://github.com/prysmaticlabs/prysm-web-ui/releases/download/0.0.2-alpha/prysm-web-ui.tar.gz",
|
|
],
|
|
)
|
|
|
|
load("//:deps.bzl", "prysm_deps")
|
|
|
|
# gazelle:repository_macro deps.bzl%prysm_deps
|
|
prysm_deps()
|
|
|
|
load("@com_github_prysmaticlabs_go_ssz//:deps.bzl", "go_ssz_dependencies")
|
|
|
|
go_ssz_dependencies()
|
|
|
|
load("@prysm//third_party/herumi:herumi.bzl", "bls_dependencies")
|
|
|
|
bls_dependencies()
|
|
|
|
load("@com_github_ethereum_go_ethereum//:deps.bzl", "geth_dependencies")
|
|
|
|
geth_dependencies()
|
|
|
|
# Do NOT add new go dependencies here! Refer to DEPENDENCIES.md!
|