1# Copyright 2025 The Pigweed Authors 2# 3# Licensed under the Apache License, Version 2.0 (the "License"); you may not 4# use this file except in compliance with the License. You may obtain a copy of 5# the License at 6# 7# https://www.apache.org/licenses/LICENSE-2.0 8# 9# Unless required by applicable law or agreed to in writing, software 10# distributed under the License is distributed on an "AS IS" BASIS, WITHOUT 11# WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the 12# License for the specific language governing permissions and limitations under 13# the License. 14 15# This package contains flags which may be set by the LUCI 16# (https://github.com/luci) CI system when building Pigweed. 17# 18# NOTE: Be mindful when adding dependencies on these flags. Pigweed developers 19# share a remote cache that's populated by CI. Build actions that depend on the 20# value of these flags will generally not be remotely cached for developers' 21# local use, since in CI (which populates the cache) these flags' values will be 22# different than on local developers' machines. 23 24load("@bazel_skylib//rules:common_settings.bzl", "bool_flag") 25 26package(default_visibility = ["//visibility:public"]) 27 28# This flag is set to True when bazel is invoked in CI (but not in CQ). 29bool_flag( 30 name = "is_ci", 31 build_setting_default = False, 32) 33 34config_setting( 35 name = "is_ci_enabled", 36 flag_values = { 37 ":is_ci": "true", 38 }, 39) 40 41# This flag is set to True when bazel is invoked in CQ (but not in CI). 42bool_flag( 43 name = "is_try", 44 build_setting_default = False, 45) 46 47config_setting( 48 name = "is_try_enabled", 49 flag_values = { 50 ":is_try": "true", 51 }, 52) 53 54# This flag is set to True when bazel is invoked by a builder in a shadow 55# bucket. 56bool_flag( 57 name = "is_shadow", 58 build_setting_default = False, 59) 60 61config_setting( 62 name = "is_shadow_enabled", 63 flag_values = { 64 ":is_ci": "true", 65 }, 66) 67