Commit Graph

85 Commits

Author SHA1 Message Date
Hannah Shi 96d27634a4
run ios CronetTest from bazel (#30439) 2022-09-27 14:49:38 -07:00
Richard Belleville b8ee9ac7e5
Make Compatible with Bazel 5.0 (#28683)
* See what happens when we remove NDK

* Try to debug Kokoro in a super hacky way

* And echo the external IP too

* Attempt to fix NDK installation

* And actually run the portion of the code I need to test out

* Clean up

* Actually test against bazel 5

* Put export in proper file

* Make android an optional dependency

* Escape paths for Windows

* Revert switch to Bazel 5.0
2022-02-11 15:18:18 -08:00
Chi Wang d326b95d79
Remove redundent toolchain registrations in WORKSPACE (#27674) 2021-10-13 17:24:09 +02:00
Richard Belleville 7aa43b7a55
Create Bazel gevent test harness (#27507)
* WIP

* Add gevent test suite run under Bazel.

* Fix things up

* Yapf

* Fix up Bazel files

* Make py_grpc_test fancier

* Attempt to fix Windows RBE

* Attempt to kick GitHub

* Fix Python 2 runs

* Yet more fixes

* And the patch file too

* I am an idiot

* Mark gevent tests flaky

* Try to make rules_python more tolerant

* Typo

* Exclude reconnect test from gevent

* Remove unnecessary parts of patch

* Buildifier

* You saw nothing

* isort

* Move py_grpc_test to an internal-only file

* Review comments

* More reviewer comments

* Review
2021-10-07 14:04:34 -07:00
Jan Tattermusch 0042c2b86f
Upgrade bazel to 4.2.1 (LTS), upgrade bazel toolchain to 4.1.0 (#27410)
* update bazel to 4.2.1

* add bazel 4.2.1 to update_mirror.sh

* regenerate dockerfiles

* upgrade bazel toolchains to 4.1.0

* use create_rbe_exec_properties_dict instead of the deprecated create_exec_properties_dict

* RBE ubsan doesnt require the crosstool_top hack anymore

* update rules_apple and build_bazel_apple_support
2021-09-23 16:20:25 +02:00
Ming-Chuan f0489c8f5f
Add Java helper code for establishing binder transport connection (#26862)
These Java code will be invoked by binder transport C++ implementation
through JNI to establish the connection between client and server.

The code is locally tested with other pending changes to make sure it
works correctly.

For now we only make sure it builds in CI. We will port proper tests
from internal repository later.

A new local repository is created for the Android-only Java code because
1. The analysis of its BUILD will fail without Android SDK configured
2. We want to prevent clang-tidy (and maybe other scripts)'s automatic
expansion of '...' to include it as they typically don't have Android
SDK installed
2021-08-13 09:12:31 +08:00
Ming-Chuan 746eaf6c48
Add BinderTransport example app (#26747)
This commit adds an app that will be served as BinderTransport example
later.

Currently the app simply calls C++ function when button is pressed. In
the future the C++ function will run BinderTransport gRPC example
instead.

Tests not included in this commit, later we will add a build test to
CI to make sure this apk is always build-able. (This app will also be
used to make sure our BinderTransport implementation is compile-able
with Android toolchain, on GitHub) For now we exclude this target in
bazel build test.

Changes are made to WORKSPACE file in order to support android builds.

Build instructions are documented at
examples/android/binder/java/io/grpc/binder/cpp/example/README.md
2021-07-27 11:18:59 +08:00
Jan Tattermusch e816aa34af buildifier format 2020-10-09 04:21:18 -04:00
Jan Tattermusch 7533b4bfb4 RBE: rely on labels to select the right worker pool 2020-10-08 11:06:48 -04:00
Jan Tattermusch cdb3d823fd migrate windows RBE to win2019 pool 2020-05-13 14:39:59 +02:00
Richard Belleville 3d876a656f Buildifier 2019-11-06 13:24:59 -08:00
Richard Belleville 959945705a Merge branch 'master' of https://github.com/grpc/grpc into blaze_modifications 2019-11-06 11:00:47 -08:00
Lidi Zheng c34bef4ca4 Format all Bazel files with buildifier 2019-11-05 14:03:52 -08:00
Richard Belleville 4b49a95801 Fix internal lint warnings 2019-10-29 17:33:44 -07:00
Eytan Kidron c97ce9057b Simplify the platform and constraints settings for remote execution
* Remove the toolchains //third_party/toolchains:local and //third_party/toolchains:local_large.
* Remove the platforms :rbe_ubuntu1604, :rbe_ubuntu1604_large, :local and :local_large.
* No longer inherit from @rbe_default//config:platform but instead use it directly. It is now the only non-windows platform.
* When creating @rbe_default//config:platform directly with rbe_autoconfig, set dockerAddCapabilities and dockerPrivileged directly in the exec_properties field. No need to set dockerNetwork to "off" and dockerSiblingContainers to false since these are the defaults.
* Also set gceMachineType = "n1-highmem-2" on the default platform. This value can be overridden by specific targets that want to use LARGE_MACHINE.
* Use create_exec_properties_dict where appropriate.
* Use custom_exec_properties to define LARGE_MACHINE.

I wasn't able to test thoroughly that this PR does not break any existing targets. I was not able to run anything on windows/mac and I also don't have access to gRPC's RBE setup.
2019-10-29 15:40:28 -04:00
Jan Tattermusch e5e3f70a1a Revert "Revert "Upgrade to bazel 1.0.0"" 2019-10-29 06:31:38 -04:00
Danjie Wenren c22c215ea5 Move extra dependencies out of WORKSPACE to its own macro.
This could be useful for projects that use gRPC as an external
repository. This could not be done within the same grpc_deps.bzl due to
the problem discussed in
- https://github.com/bazelbuild/bazel/issues/1550
- https://github.com/bazelbuild/bazel/issues/1943
2019-10-12 22:10:57 -07:00
Rafi Kamal fac04ffe6e
Add protobuf_deps to WORKSPACE
See https://github.com/grpc/grpc/pull/20224#issuecomment-531355209
2019-09-13 12:32:54 -07:00
Richard Belleville 3638167e40 Call grpc_python_deps() from grpc_deps(). 2019-08-05 12:57:50 -07:00
Richard Belleville e1980a7a5a Merge remote-tracking branch 'origin/master' into py_proto_library 2019-08-02 15:02:31 -07:00
Richard Belleville 9ac75a6d16 Merge remote-tracking branch 'origin/master' into py_proto_library 2019-08-01 15:25:16 -07:00
Richard Belleville 7b2c8c27b0 Separate py_grpc_library and py_proto_library.
By popular demand, we'll now be offering separate py_grpc_library and
py_proto_library targets sharing the same interface as within google3.
This change necessitated some modifications to how we pull in our own
Python-level dependencies and how we make those available to those
pulling in our project via Bazel.

There is now a grpc_python_deps() Bazel workspace rule that pulls in the
appropriate dependencies, which should be called from the client
project's WORKSPACE file. A test has been added to the bazel/test/
directory to verify that this behavior works as intended.

It's worth noting that the protobuf repository's usage of Starlark
bind() caused a great deal of trouble in ensuring that we could also
pull in six.

This change also required a change in the way generated proto code is
imported in the channelz and health-check modules, as well as in their
associated tests. We were importing them two different ways, each
relative. This resulted in two different module objects being imported
into the process, which were incompatible. I am not sure exactly what
caused this behavior to begin, as this should have been possible before
this PR. As a workaround, I am simply trying two different absolute
imports and using the one that works. This should function both inside
and outside of Bazel environments.
2019-08-01 15:16:22 -07:00
Tony Lu 44868ae12a Starting a new branch with same changes from https://github.com/grpc/grpc/pull/19621 2019-07-30 16:30:51 -07:00
Nicolas "Pixel" Noble 5495a7f7b1 Merge branch 'master' of https://github.com/grpc/grpc into moiz-upb 2019-07-16 19:07:24 +02:00
Nicolas "Pixel" Noble 3de02bc8cd Merge branch 'master' of https://github.com/grpc/grpc into moiz-upb 2019-07-03 19:54:22 +02:00
Marcel Hlopko 49f0fb9035 Migrate from dep.proto to dep[ProtoInfo] 2019-06-20 18:55:56 +02:00
Nicolas "Pixel" Noble 8de64087a3 Clean bazel 0.26 upgrade. 2019-06-14 00:20:29 +02:00
Moiz Haidry 49e7f4b2e4 Added more rules to resolve deps 2019-05-24 16:04:43 -07:00
Moiz Haidry 4995670257 Add support to import envoy protos 2019-05-24 14:31:52 -07:00
Moiz Haidry 6c3e3aeb77 Removed git repo from WORKSPACE as that was the incorrect location. Added the code to grpc_deps.bzl instead 2019-05-22 16:35:29 -07:00
Moiz Haidry e8a18969bb Added upb repo to grpc workspace 2019-05-22 15:30:21 -07:00
Richard Belleville 930cec4e27 Revert "Merge pull request #18912 from grpc/revert-bazel-changes"
This reverts commit c9a259aa3a, reversing
changes made to 9c882bc725.
2019-04-30 11:17:11 -07:00
Richard Belleville 50b5240d0a Revert "Merge pull request #18859 from grpc/internal_py_proto_library"
This reverts commit 5b720f19c1, reversing
changes made to a64ae3c0d5.
2019-04-29 17:47:56 -07:00
Richard Belleville afdc59712d Merge branch 'master' into internal_py_proto_library 2019-04-25 10:01:41 -07:00
Richard Belleville 05f37c8143 Remove dependency on pubref/rules_proto.
This commit resolves #18331.
This commit resolves #18256.
This commit resolves... another TODO that apparently didn't have an
associated github issue.

We swap out pubref's implementation of py_proto_library with our own,
which more closely mirrors the interface of the internal
py_proto_library, taking the descriptor file output of a proto_library
rule as input.

One minor change in behavior was introduced for simplicity. When a
py_proto_library depends on a proto_library with a source proto file in
a subdirectory of the bazel package, the import module of the resultant
python library will reflect the package, *not* the full directory of the
proto file, including both the bazel package and the subdirectories, as
pubref did previously. This behavior also more closely mirrors google
internal behavior.

This commit also introduces a slightly more stringent bazel format
script. Buildifier on its own will not take care of long lines, but by
running yapf first, we end up with a more legible file. At the moment,
there is no sanity check associated with this formatter.
2019-04-24 17:36:08 -07:00
Nicolas Lopez a32b1eb765
Merge branch 'master' into master 2019-04-11 15:00:34 -04:00
Bill Feng 5158c3db27 naming update, documentation fix 2019-04-08 14:39:09 -07:00
Bill Feng df89d8e157 bazel RBE Windows build 2019-04-05 11:40:11 -07:00
Richard Belleville 615c95ed5c Mitigate #18256 2019-04-03 18:13:52 -07:00
Nicolas Lopez bdbe0483b0 update docs 2019-03-28 09:56:50 -04:00
Nicolas Lopez a9ffc03d1b remove ubsan rbe_autoconfig target 2019-03-28 09:56:50 -04:00
Nicolas Lopez ad4926d5c6 avoid local runs from accessing remote platforms
This should fix Bazel Basic Tests for Python (Local) and other
local CI runs that are now failing.
I also have a plan to fix Bazel RBE Opt C/C++.
Bazel RBE UBSAN C/C++ might need to wait for gRPC to upgrade to
using 0.23.0
2019-03-28 09:56:50 -04:00
Nicolas Lopez d6dbaeee74 doc fixes 2019-03-28 09:56:50 -04:00
Nicolas Lopez d1640057f2 use rbe_autoconfig 2019-03-28 09:56:50 -04:00
Lidi Zheng 8bed44b2c4 Make WORKSPACE compatible with Bazel 0.20.0 for Python 2018-12-04 19:43:04 -08:00
Nicolas Noble dc930c7868
Workarounding bazelbuild/bazel#6831
This will take care of the bazel crash until we have a proper fix upstream.
2018-12-03 19:16:21 -08:00
Nicolas "Pixel" Noble dc4b538c4d Merge branch 'master' of https://github.com/grpc/grpc into fix-bazel-0.20 2018-11-30 23:27:24 +01:00
Nicolas "Pixel" Noble f0fbee5932 Bazel 0.20.0 workspace fixes. 2018-11-30 23:24:59 +01:00
Bill Feng 1e53e3c17f added back platform registration to WORKSPACE 2018-11-26 10:26:07 -08:00
Bill Feng 70f9992d77 modified execution platform registration, added host platform 2018-11-26 10:10:53 -08:00