forked from dfinity/ic
-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathBUILD.bazel
More file actions
145 lines (129 loc) · 4.95 KB
/
BUILD.bazel
File metadata and controls
145 lines (129 loc) · 4.95 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
load("//bazel:defs.bzl", "gzip_compress")
load("//bazel:canisters.bzl", "optimized_canister")
load("//bazel:transitions.bzl", "malicious_binary", "opt_debug_binary")
load("//gitlab-ci/src/artifacts:collect.bzl", "collect_artifacts")
load("//gitlab-ci/src/artifacts:upload.bzl", "upload_artifacts")
package(default_visibility = ["//visibility:public"])
exports_files([
".rclone.conf",
"clippy.toml",
"rustfmt.toml",
"WORKSPACE.bazel",
])
alias(
name = "buildifier",
actual = "//bazel:buildifier",
)
test_suite(
name = "precommit",
tests = ["//bazel:buildifier_test"],
)
alias(
name = "bazelifier",
actual = "//rs/bazelifier",
)
alias(
name = "rustfmt",
actual = "@rules_rust//:rustfmt",
)
BINARIES = {
"boundary-node-control-plane": "//rs/boundary_node/control_plane:boundary-node-control-plane",
"boundary-node-prober": "//rs/boundary_node/prober:boundary-node-prober",
"canister_sandbox": "//rs/canister_sandbox",
"denylist-updater": "//rs/boundary_node/denylist_updater:denylist-updater",
"e2e-test-driver": "//rs/scenario_tests:e2e-test-driver",
"ic-admin": "//rs/registry/admin:ic-admin",
"ic-balance-exporter": "//rs/boundary_node/ic_balance_exporter:ic-balance-exporter",
"ic-btc-adapter": "//rs/bitcoin/adapter:ic-btc-adapter",
"ic-canister-http-adapter": "//rs/canister_http/adapter:ic-canister-http-adapter",
"ic-consensus-pool-util": "//rs/artifact_pool:ic-consensus-pool-util",
"ic-crypto-csp": "//rs/crypto:ic-crypto-csp",
"ic-nns-init": "//rs/nns/init:ic-nns-init",
"ic-p8s-sd": "//rs/ic_p8s_service_discovery:ic-p8s-sd",
"ic-p8s-service-discovery": "//rs/ic_p8s_service_discovery:ic-p8s-service-discovery",
"ic-prep": "//rs/prep:ic-prep",
"ic-recovery": "//rs/recovery:ic-recovery",
"ic-regedit": "//rs/registry/regedit:ic-regedit",
"ic-registry-replicator": "//rs/orchestrator/registry_replicator:ic-registry-replicator",
"ic-replay": "//rs/replay:ic-replay",
"ic-rosetta-api": "//rs/rosetta-api:ic-rosetta-api",
"ic-workload-generator": "//rs/workload_generator:ic-workload-generator",
"icx-proxy": "//rs/boundary_node/icx_proxy:icx-proxy",
"orchestrator": "//rs/orchestrator",
"prod-test-driver": "//rs/tests:prod-test-driver",
"replica": "//rs/replica",
"sandbox_launcher": "//rs/canister_sandbox/sandbox_launcher",
"sns": "//rs/sns/cli:sns",
"state-tool": "//rs/state_tool:state-tool",
"system-tests": "//rs/tests:system-tests",
"vsock_agent": "//rs/guestos_vsock_agent:vsock_agent",
}
malicious_binary(
name = "malicious_replica",
binary = "//rs/replica",
)
[opt_debug_binary(
name = name,
binary = BINARIES[name],
) for name in BINARIES]
filegroup(
name = "binaries",
srcs = [name for name in BINARIES],
)
optimized_canister(
name = "ledger_archive_canister",
wasm = "//rs/rosetta-api/ledger_canister:ledger-archive-node-canister-wasm",
)
CANISTERS = {
"cycles-minting-canister": "//rs/nns/cmc:cycles-minting-canister",
"genesis-token-canister": "//rs/nns/gtc:genesis-token-canister",
"governance-canister": "//rs/nns/governance:governance-canister",
"icrc1-archive-canister": "//rs/rosetta-api/icrc1/archive:archive_canister",
"icrc1-index-canister": "//rs/rosetta-api/icrc1/index:index_canister",
"icrc1-ledger-canister": "//rs/rosetta-api/icrc1/ledger:ledger_canister",
"ledger-canister": "//rs/rosetta-api/ledger_canister:ledger_canister",
"ledger-canister__notify-method": "//rs/rosetta-api/ledger_canister:ledger-canister-wasm-notify-method",
"nns-ui-canister": "//rs/nns/nns-ui:nns-ui-canister",
"registry-canister": "//rs/registry/canister:registry-canister",
"root-canister": "//rs/nns/handlers/root:root-canister",
"sns-governance-canister": "//rs/sns/governance:sns-governance-canister",
"sns-root-canister": "//rs/sns/root:sns-root-canister",
"sns-swap-canister": "//rs/sns/swap:sns-swap-canister",
"xnet-test-canister": "//rs/rust_canisters/xnet_test:xnet-test-canister",
}
[
gzip_compress(
name = name + ".wasm.gz",
srcs = [target],
)
for (name, target) in CANISTERS.items()
]
filegroup(
name = "sdk",
srcs = [
"//rs/bitcoin/adapter:ic-btc-adapter",
"//rs/canister_http/adapter:ic-canister-http-adapter",
"//rs/canister_sandbox",
"//rs/canister_sandbox/sandbox_launcher",
"//rs/replica",
"//rs/starter:ic-starter",
],
)
collect_artifacts(
name = "collect_sdk",
srcs = [":sdk"],
)
upload_artifacts(
name = "upload_sdk",
inputs = [":collect_sdk"],
# The actual list is on https://github.com/bazelbuild/platforms
remote_subdir = "sdk-release-bazel/" + select({
"@platforms//cpu:x86_64": "x86_64",
"@platforms//cpu:arm64": "arm64",
"//conditions:default": "unknown",
}) + "-" + select({
"@platforms//os:osx": "macos",
"@platforms//os:linux": "linux",
"//conditions:default": "unknown",
}),
)