-
-
Notifications
You must be signed in to change notification settings - Fork 8.2k
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Configure remote builds to use EngFlow (#11887)
This allows us to use EngFlow's remote build grid to execute our builds. Once we hook this up into our CI actions, this will lead to significantly faster CI runs.
- Loading branch information
Showing
21 changed files
with
1,892 additions
and
25 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -128,3 +128,7 @@ bazel-testlogs | |
/.vscode/ | ||
/.scannerwork/ | ||
/.bazelrc.local | ||
|
||
# Engflow | ||
*.crt | ||
*.key |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,49 @@ | ||
# Copyright 2020 The Bazel Authors. All rights reserved. | ||
# | ||
# Licensed under the Apache License, Version 2.0 (the "License"); | ||
# you may not use this file except in compliance with the License. | ||
# You may obtain a copy of the License at | ||
# | ||
# http://www.apache.org/licenses/LICENSE-2.0 | ||
# | ||
# Unless required by applicable law or agreed to in writing, software | ||
# distributed under the License is distributed on an "AS IS" BASIS, | ||
# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. | ||
# See the License for the specific language governing permissions and | ||
# limitations under the License. | ||
|
||
# This file is auto-generated by github.com/bazelbuild/bazel-toolchains/pkg/rbeconfigsgen | ||
# and should not be modified directly. | ||
|
||
package(default_visibility = ["//visibility:public"]) | ||
|
||
toolchain( | ||
name = "cc-toolchain", | ||
exec_compatible_with = [ | ||
"@platforms//os:linux", | ||
"@platforms//cpu:x86_64", | ||
], | ||
target_compatible_with = [ | ||
"@platforms//os:linux", | ||
"@platforms//cpu:x86_64", | ||
], | ||
toolchain = "//common/remote-build/cc:cc-compiler-k8", | ||
toolchain_type = "@bazel_tools//tools/cpp:toolchain_type", | ||
) | ||
|
||
platform( | ||
name = "platform", | ||
constraint_values = [ | ||
"@platforms//os:linux", | ||
"@platforms//cpu:x86_64", | ||
], | ||
exec_properties = { | ||
"container-image": "docker://docker.io/shs96c/selenium-remote-build@sha256:314b60a3c2b82f512c0f3fdba0aed8983f2b9bfdf2901a4f41511abdfd6dd74a", | ||
"OSFamily": "Linux", | ||
"dockerReuse": "True", | ||
"dockerRunAsRoot": "False", | ||
"dockerUseEntrypoint": "True", | ||
"sandboxAllowed": "False", | ||
}, | ||
parents = ["@local_config_platform//:host"], | ||
) |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,149 @@ | ||
# Copyright 2016 The Bazel Authors. All rights reserved. | ||
# | ||
# Licensed under the Apache License, Version 2.0 (the "License"); | ||
# you may not use this file except in compliance with the License. | ||
# You may obtain a copy of the License at | ||
# | ||
# http://www.apache.org/licenses/LICENSE-2.0 | ||
# | ||
# Unless required by applicable law or agreed to in writing, software | ||
# distributed under the License is distributed on an "AS IS" BASIS, | ||
# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. | ||
# See the License for the specific language governing permissions and | ||
# limitations under the License. | ||
|
||
# This becomes the BUILD file for @local_config_cc// under non-BSD unixes. | ||
|
||
load(":cc_toolchain_config.bzl", "cc_toolchain_config") | ||
load(":armeabi_cc_toolchain_config.bzl", "armeabi_cc_toolchain_config") | ||
load("@rules_cc//cc:defs.bzl", "cc_toolchain", "cc_toolchain_suite") | ||
|
||
package(default_visibility = ["//visibility:public"]) | ||
|
||
licenses(["notice"]) # Apache 2.0 | ||
|
||
cc_library( | ||
name = "malloc", | ||
) | ||
|
||
filegroup( | ||
name = "empty", | ||
srcs = [], | ||
) | ||
|
||
filegroup( | ||
name = "cc_wrapper", | ||
srcs = ["cc_wrapper.sh"], | ||
) | ||
|
||
filegroup( | ||
name = "compiler_deps", | ||
srcs = glob(["extra_tools/**"], allow_empty = True) + [":builtin_include_directory_paths"], | ||
) | ||
|
||
# This is the entry point for --crosstool_top. Toolchains are found | ||
# by lopping off the name of --crosstool_top and searching for | ||
# the "${CPU}" entry in the toolchains attribute. | ||
cc_toolchain_suite( | ||
name = "toolchain", | ||
toolchains = { | ||
"k8|gcc": ":cc-compiler-k8", | ||
"k8": ":cc-compiler-k8", | ||
"armeabi-v7a|compiler": ":cc-compiler-armeabi-v7a", | ||
"armeabi-v7a": ":cc-compiler-armeabi-v7a", | ||
}, | ||
) | ||
|
||
cc_toolchain( | ||
name = "cc-compiler-k8", | ||
toolchain_identifier = "local", | ||
toolchain_config = ":local", | ||
all_files = ":compiler_deps", | ||
ar_files = ":compiler_deps", | ||
as_files = ":compiler_deps", | ||
compiler_files = ":compiler_deps", | ||
dwp_files = ":empty", | ||
linker_files = ":compiler_deps", | ||
objcopy_files = ":empty", | ||
strip_files = ":empty", | ||
supports_param_files = 1, | ||
module_map = None, | ||
) | ||
|
||
cc_toolchain_config( | ||
name = "local", | ||
cpu = "k8", | ||
compiler = "gcc", | ||
toolchain_identifier = "local", | ||
host_system_name = "local", | ||
target_system_name = "local", | ||
target_libc = "local", | ||
abi_version = "local", | ||
abi_libc_version = "local", | ||
cxx_builtin_include_directories = ["/usr/lib/gcc/x86_64-linux-gnu/9/include", | ||
"/usr/local/include", | ||
"/usr/include/x86_64-linux-gnu", | ||
"/usr/include", | ||
"/usr/include/c++/9", | ||
"/usr/include/x86_64-linux-gnu/c++/9", | ||
"/usr/include/c++/9/backward"], | ||
tool_paths = {"ar": "/usr/bin/ar", | ||
"ld": "/usr/bin/ld", | ||
"llvm-cov": "None", | ||
"llvm-profdata": "None", | ||
"cpp": "/usr/bin/cpp", | ||
"gcc": "/usr/bin/gcc", | ||
"dwp": "/usr/bin/dwp", | ||
"gcov": "/usr/bin/gcov", | ||
"nm": "/usr/bin/nm", | ||
"objcopy": "/usr/bin/objcopy", | ||
"objdump": "/usr/bin/objdump", | ||
"strip": "/usr/bin/strip"}, | ||
compile_flags = ["-fstack-protector", | ||
"-Wall", | ||
"-Wunused-but-set-parameter", | ||
"-Wno-free-nonheap-object", | ||
"-fno-omit-frame-pointer"], | ||
opt_compile_flags = ["-g0", | ||
"-O2", | ||
"-D_FORTIFY_SOURCE=1", | ||
"-DNDEBUG", | ||
"-ffunction-sections", | ||
"-fdata-sections"], | ||
dbg_compile_flags = ["-g"], | ||
cxx_flags = ["-std=c++0x"], | ||
link_flags = ["-fuse-ld=gold", | ||
"-Wl,-no-as-needed", | ||
"-Wl,-z,relro,-z,now", | ||
"-B/usr/bin", | ||
"-pass-exit-codes"], | ||
link_libs = ["-lstdc++", | ||
"-lm"], | ||
opt_link_flags = ["-Wl,--gc-sections"], | ||
unfiltered_compile_flags = ["-fno-canonical-system-headers", | ||
"-Wno-builtin-macro-redefined", | ||
"-D__DATE__=\"redacted\"", | ||
"-D__TIMESTAMP__=\"redacted\"", | ||
"-D__TIME__=\"redacted\""], | ||
coverage_compile_flags = ["--coverage"], | ||
coverage_link_flags = ["--coverage"], | ||
supports_start_end_lib = True, | ||
) | ||
|
||
# Android tooling requires a default toolchain for the armeabi-v7a cpu. | ||
cc_toolchain( | ||
name = "cc-compiler-armeabi-v7a", | ||
toolchain_identifier = "stub_armeabi-v7a", | ||
toolchain_config = ":stub_armeabi-v7a", | ||
all_files = ":empty", | ||
ar_files = ":empty", | ||
as_files = ":empty", | ||
compiler_files = ":empty", | ||
dwp_files = ":empty", | ||
linker_files = ":empty", | ||
objcopy_files = ":empty", | ||
strip_files = ":empty", | ||
supports_param_files = 1, | ||
) | ||
|
||
armeabi_cc_toolchain_config(name = "stub_armeabi-v7a") |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,2 @@ | ||
# DO NOT EDIT: automatically generated WORKSPACE file for cc_autoconf rule | ||
workspace(name = "local_config_cc") |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,82 @@ | ||
# Copyright 2019 The Bazel Authors. All rights reserved. | ||
# | ||
# Licensed under the Apache License, Version 2.0 (the "License"); | ||
# you may not use this file except in compliance with the License. | ||
# You may obtain a copy of the License at | ||
# | ||
# http://www.apache.org/licenses/LICENSE-2.0 | ||
# | ||
# Unless required by applicable law or agreed to in writing, software | ||
# distributed under the License is distributed on an "AS IS" BASIS, | ||
# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. | ||
# See the License for the specific language governing permissions and | ||
# limitations under the License. | ||
|
||
"""A Starlark cc_toolchain configuration rule""" | ||
|
||
load( | ||
"@bazel_tools//tools/cpp:cc_toolchain_config_lib.bzl", | ||
"feature", | ||
"tool_path", | ||
) | ||
|
||
def _impl(ctx): | ||
toolchain_identifier = "stub_armeabi-v7a" | ||
host_system_name = "armeabi-v7a" | ||
target_system_name = "armeabi-v7a" | ||
target_cpu = "armeabi-v7a" | ||
target_libc = "armeabi-v7a" | ||
compiler = "compiler" | ||
abi_version = "armeabi-v7a" | ||
abi_libc_version = "armeabi-v7a" | ||
cc_target_os = None | ||
builtin_sysroot = None | ||
action_configs = [] | ||
|
||
supports_pic_feature = feature(name = "supports_pic", enabled = True) | ||
supports_dynamic_linker_feature = feature(name = "supports_dynamic_linker", enabled = True) | ||
features = [supports_dynamic_linker_feature, supports_pic_feature] | ||
|
||
cxx_builtin_include_directories = [] | ||
artifact_name_patterns = [] | ||
make_variables = [] | ||
|
||
tool_paths = [ | ||
tool_path(name = "ar", path = "/bin/false"), | ||
tool_path(name = "cpp", path = "/bin/false"), | ||
tool_path(name = "dwp", path = "/bin/false"), | ||
tool_path(name = "gcc", path = "/bin/false"), | ||
tool_path(name = "gcov", path = "/bin/false"), | ||
tool_path(name = "ld", path = "/bin/false"), | ||
tool_path(name = "llvm-profdata", path = "/bin/false"), | ||
tool_path(name = "nm", path = "/bin/false"), | ||
tool_path(name = "objcopy", path = "/bin/false"), | ||
tool_path(name = "objdump", path = "/bin/false"), | ||
tool_path(name = "strip", path = "/bin/false"), | ||
] | ||
|
||
return cc_common.create_cc_toolchain_config_info( | ||
ctx = ctx, | ||
features = features, | ||
action_configs = action_configs, | ||
artifact_name_patterns = artifact_name_patterns, | ||
cxx_builtin_include_directories = cxx_builtin_include_directories, | ||
toolchain_identifier = toolchain_identifier, | ||
host_system_name = host_system_name, | ||
target_system_name = target_system_name, | ||
target_cpu = target_cpu, | ||
target_libc = target_libc, | ||
compiler = compiler, | ||
abi_version = abi_version, | ||
abi_libc_version = abi_libc_version, | ||
tool_paths = tool_paths, | ||
make_variables = make_variables, | ||
builtin_sysroot = builtin_sysroot, | ||
cc_target_os = cc_target_os, | ||
) | ||
|
||
armeabi_cc_toolchain_config = rule( | ||
implementation = _impl, | ||
attrs = {}, | ||
provides = [CcToolchainConfigInfo], | ||
) |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,13 @@ | ||
This file is generated by cc_configure and contains builtin include directories | ||
that /usr/bin/gcc reported. This file is a dependency of every compilation action and | ||
changes to it will be reflected in the action cache key. When some of these | ||
paths change, Bazel will make sure to rerun the action, even though none of | ||
declared action inputs or the action commandline changes. | ||
|
||
/usr/lib/gcc/x86_64-linux-gnu/9/include | ||
/usr/local/include | ||
/usr/include/x86_64-linux-gnu | ||
/usr/include | ||
/usr/include/c++/9 | ||
/usr/include/x86_64-linux-gnu/c++/9 | ||
/usr/include/c++/9/backward |
Oops, something went wrong.