From 2f2d05d5b27a284a81626301d5999754b25eef45 Mon Sep 17 00:00:00 2001 From: Water-Melon Date: Fri, 6 Sep 2024 18:01:46 +0000 Subject: [PATCH] chore(ci): skip ada compilation in amazon-linux-2 --- .github/matrix-full.yml | 4 ++-- BUILD.bazel | 14 ++++++++++++++ build/BUILD.bazel | 13 ++++++++----- 3 files changed, 24 insertions(+), 7 deletions(-) diff --git a/.github/matrix-full.yml b/.github/matrix-full.yml index e8379aa5160c..5786c2a23e2b 100644 --- a/.github/matrix-full.yml +++ b/.github/matrix-full.yml @@ -53,8 +53,8 @@ build-packages: package: rpm package-type: aws2 check-manifest-suite: amazonlinux-2-amd64 - # simdjson doesn't compile on gcc7.3.1 (needs 7.4) - bazel-args: --platforms=//:aws2-crossbuild-x86_64 --//:simdjson=False + # ada and simdjson don't compile on gcc7.3.1 (needs 7.4) + bazel-args: --platforms=//:aws2-crossbuild-x86_64 --//:simdjson=False --//:additional_deps=False - label: amazonlinux-2023 image: amazonlinux:2023 package: rpm diff --git a/BUILD.bazel b/BUILD.bazel index 20c265c370ea..5effc4a7ed8c 100644 --- a/BUILD.bazel +++ b/BUILD.bazel @@ -141,6 +141,20 @@ config_setting( visibility = ["//visibility:public"], ) +# --//:addition_deps=true +bool_flag( + name = "additional_deps", + build_setting_default = True, +) + +config_setting( + name = "additional_deps_flag", + flag_values = { + ":additional_deps": "true", + }, + visibility = ["//visibility:public"], +) + # --//:licensing=false bool_flag( name = "licensing", diff --git a/build/BUILD.bazel b/build/BUILD.bazel index 05ea9aa880e0..522f09d2571e 100644 --- a/build/BUILD.bazel +++ b/build/BUILD.bazel @@ -13,6 +13,9 @@ clib_deps = [ "@openssl", "@libexpat", "@snappy", +] + +additional_deps = [ "@ada", ] @@ -23,15 +26,15 @@ clib_deps = [ prefix = "kong/lib" if k in ("@passwdqc", "@snappy", "@ada") else "kong", strip_path = "snappy" if k == "@snappy" else "ada" if k == "@ada" else "", ) - for k in clib_deps + for k in clib_deps + additional_deps ] kong_rules_group( name = "install-clibs", - propagates = [ - ":install-%s" % get_workspace_name(k) - for k in clib_deps - ], + propagates = select({ + "@kong//:additional_deps_flag": [":install-%s" % get_workspace_name(k) for k in clib_deps + additional_deps], + "//conditions:default": [":install-%s" % get_workspace_name(k) for k in clib_deps], + }), visibility = ["//visibility:public"], )