Category "bazel"

How to use shell script that generates output files prior to subsequent Bazel build targets

I have a few protobuf files that I'm building with a shell script like so: proto.sh #!/usr/bin/env bash rm -rf ./proto-out mkdir -p proto-out protoc -Iproto --

in-tree include directory with bazel custom toolchain

Is it possible to configure a Bazel custom toolchain to include directories in the repository? Assume that I have following in the root of my repository: sysroo

Bazel pass flaky test if 1 out of 3 retries pass

I have a Java based test suite running Bazel 4.2.2, and my goal is to collect code coverage regardless of test flakiness. I tried to add these options: bazel co

Bazel: How can I exclude the build warnings from the external included header files

I have a situation where I include the header file of the library which I want to use in my main program. The main program is warning free and it has a feature

Using Rules Foreign CC to Build AWS C++ SDK with Bazel

Is there a way to do this? I'm trying to build parts of the AWS SDK (s3 and rds) to use in my Bazel project. I've heard that rules_foreign_cc can be used to int

Cannot install bazel on Ubuntu 20.04 - invalid EXPKEYSIG

I was following the instructions on https://docs.bazel.build/versions/master/install-ubuntu.html#install-with-installer-ubuntu and trying to install bazel on U

How to use Conan in Bazel

I am new in bazel and conan. I try run conan in bazel use it https://docs.conan.io/en/1.44/integrations/build_system/bazel.html In WORSPACE file: load("//third-

How do we run a single test using Google bazel

For running all the tests under a target I use the command line command bazel test //src/code_path:target_name What should be additional parameters to run a

how to pass include directories from package imported in WORKSPACE to cxx_builtin_include_directories for a selfdefined cc_toolchain_config

I import cross toolchain in WORKSPACE file, how to pass include directories from gcc_arm_aarch64 to cxx_builtin_include_directories, I tried pass it by defined

How to select a platform from the command line in Bazel

I'm messing around with Bazel example files. This one in particular on github, seems to select a tool by checking which platform is detected (specified?). If I

Bazel and py_test in sandbox - any way to define outputs?

I'm running multiple py_test() configurations on number of projects. Since there's a plenty of them, the default sandboxing mechanism seems convenient - tests d

Does `bazel run` use sandboxing? If not, why not?

From my tests, it doesn't appear that bazel run runs in a sandbox. For example, I ran bazel run //:some_target --spawn_strategy=darwin-sandbox --sandbox_debug,

Loading built-in Python Wrappers in TensorFlow

I'm trying to understand the complete process of exposing the built-in low-level C++ implementations to the Python API in TensorFlow. I've been looking at the s

How to use Bazel in Azure Pipelines?

I tried to set up an Azure Build Pipeline that uses Bazel (0.26.0) My pipeline YAML definition file looks like this: trigger: - master pool: vmImage: 'wind

How to use select to properly detect whether I am building C++ code in Windows or Linux?

I am writing a sample C++ project that uses Bazel to serve as an example idiom for other collaborators to follow. Here is the repository: https://github.com/th

Bazel repository rule- Can I access something like Java's "os.arch"?

I need to write a Bazel repository rule which downloads mysql binaries according to the required version, to the operating system and the architecture. I'l

Bazel test rule for the Python BDD tool "behave"

Question: Hello, dear bazel heroes! For our system tests, I am trying to get the behavior-driven development tool behave to run with bazel as bazel test syst

How to specify -std=c++11 option in bazel BUILD file?

How to add this option into a target description section? Thanks.

How to query sibling rules from a Bazel rule

I would like to be able to do the following in a Bazel BUILD file: alpha( name = "hello world", color = "blue" ) beta( name = "hello again" ) Where alph

Bazel build on cycle in dependency graph error

I am doing a bazel build for my project,i created a java_library rule and used at different places. but I am having this cycle in dependency graph: ERROR: