Skip to content

Commit

Permalink
Contrib builds actually excluding skipped targets (envoyproxy#31910)
Browse files Browse the repository at this point in the history
Signed-off-by: Raven Black <[email protected]>
  • Loading branch information
ravenblackx authored Jan 20, 2024
1 parent 5630626 commit 92bc836
Show file tree
Hide file tree
Showing 2 changed files with 14 additions and 6 deletions.
4 changes: 4 additions & 0 deletions contrib/all_contrib_extensions.bzl
Original file line number Diff line number Diff line change
Expand Up @@ -28,5 +28,9 @@ PPC_SKIP_CONTRIB_TARGETS = [
"envoy.compression.qatzip.compressor",
]

FIPS_SKIP_CONTRIB_TARGETS = [
"envoy.compression.qatzip.compressor",
]

def envoy_all_contrib_extensions(denylist = []):
return [v + "_envoy_extension" for k, v in CONTRIB_EXTENSIONS.items() if not k in denylist]
16 changes: 10 additions & 6 deletions contrib/exe/BUILD
Original file line number Diff line number Diff line change
Expand Up @@ -7,6 +7,7 @@ load(
load(
"//contrib:all_contrib_extensions.bzl",
"ARM64_SKIP_CONTRIB_TARGETS",
"FIPS_SKIP_CONTRIB_TARGETS",
"PPC_SKIP_CONTRIB_TARGETS",
"envoy_all_contrib_extensions",
)
Expand All @@ -20,11 +21,18 @@ alias(
actual = ":envoy-static",
)

SELECTED_CONTRIB_EXTENSIONS = select({
"//bazel:linux_aarch64": envoy_all_contrib_extensions(ARM64_SKIP_CONTRIB_TARGETS),
"//bazel:linux_ppc": envoy_all_contrib_extensions(PPC_SKIP_CONTRIB_TARGETS),
"//bazel:boringssl_fips": envoy_all_contrib_extensions(FIPS_SKIP_CONTRIB_TARGETS),
"//conditions:default": envoy_all_contrib_extensions(),
})

envoy_cc_binary(
name = "envoy-static",
stamped = True,
visibility = ["//visibility:public"],
deps = ["//source/exe:envoy_main_entry_lib"] + envoy_all_contrib_extensions(),
deps = ["//source/exe:envoy_main_entry_lib"] + SELECTED_CONTRIB_EXTENSIONS,
)

envoy_cc_test(
Expand All @@ -41,9 +49,5 @@ envoy_cc_test(
},
deps = [
"//test/config_test:example_configs_test_lib",
] + select({
"//bazel:linux_aarch64": envoy_all_contrib_extensions(ARM64_SKIP_CONTRIB_TARGETS),
"//bazel:linux_ppc": envoy_all_contrib_extensions(PPC_SKIP_CONTRIB_TARGETS),
"//conditions:default": envoy_all_contrib_extensions(),
}),
] + SELECTED_CONTRIB_EXTENSIONS,
)

0 comments on commit 92bc836

Please sign in to comment.