Skip to content

Commit d2415cc

Browse files
MichaelBroughtonrht
authored andcommitted
Remove bazel from repo (quantumlib#4297)
Fixes quantumlib#4280
1 parent 3371611 commit d2415cc

File tree

7 files changed

+3
-340
lines changed

7 files changed

+3
-340
lines changed

.github/workflows/ci.yml

+1-6
Original file line numberDiff line numberDiff line change
@@ -191,11 +191,6 @@ jobs:
191191
- name: Install requirements
192192
run: |
193193
pip install -r dev_tools/requirements/deps/protos.txt
194-
sudo apt install curl gnupg
195-
curl -fsSL https://bazel.build/bazel-release.pub.gpg | gpg --dearmor > bazel.gpg
196-
sudo mv bazel.gpg /etc/apt/trusted.gpg.d/
197-
echo "deb [arch=amd64] https://storage.googleapis.com/bazel-apt stable jdk1.8" | sudo tee /etc/apt/sources.list.d/bazel.list
198-
sudo apt update && sudo apt install bazel
199194
- name: Build protos
200195
run: check/build-changed-protos
201196
coverage:
@@ -335,4 +330,4 @@ jobs:
335330
- name: Install npm dependencies
336331
run: check/npm ci
337332
- name: Test
338-
run: check/ts-coverage
333+
run: check/ts-coverage

WORKSPACE

-62
This file was deleted.

check/build-changed-protos

+2-23
Original file line numberDiff line numberDiff line change
@@ -71,30 +71,9 @@ if [[ ! -z "$changed" ]]; then
7171
done
7272
fi
7373

74-
# Check if any of the build files have changed.
75-
build_changed=$(git diff --name-only ${rev} -- \
76-
| grep "google/api/.*BUILD$" \
77-
| sed -e "s/BUILD//")
78-
79-
if [[ -z "$build_changed" ]]; then
80-
echo -e "No BUILD files changed."
81-
else
82-
# Build all the targets for the changed BUILD rule.
83-
echo -e "BUILD file changed in directories: '${build_changed[@]}'"
84-
for build_prefix in $build_changed
85-
do
86-
(set -x; bazel build "${build_prefix}...:*")
87-
done
88-
fi
89-
90-
# We potentially will attempt to build a second time, but this is not
91-
# a problem as bazel returns immediately.
74+
# We potentially will attempt to build a second time.
9275
for base in $changed
9376
do
94-
(set -x; bazel build "${base}_proto"; \
95-
bazel build "${base}_py_proto"; \
96-
bazel build "${base}_cc_proto")
97-
9877
python -m grpc_tools.protoc -I=cirq-google --python_out=cirq-google --mypy_out=cirq-google ${base}.proto
9978
done
10079

@@ -109,4 +88,4 @@ if [[ ! -z "$untracked" ]]; then
10988
echo -e "\033[31m ${generated}\033[0m"
11089
done
11190
exit 1
112-
fi
91+
fi

check/build-protos

-30
This file was deleted.

cirq-google/cirq_google/api/v1/BUILD

-62
This file was deleted.

cirq-google/cirq_google/api/v2/BUILD

-153
This file was deleted.

docs/dev/development.md

-4
Original file line numberDiff line numberDiff line change
@@ -151,10 +151,6 @@ Cirq's protobufs live at [cirq/api/google](https://github.com/quantumlib/Cirq/tr
151151
If any protos are updated, their dependents can be rebuilt by calling the script [dev_tools/build-protos.sh](https://github.com/quantumlib/Cirq/tree/master/dev_tools).
152152
This script uses grpcio-tools and protobuf version 3.8.0 to generate the python proto api.
153153
154-
Additionally, for workflows that use bazel (relevant for C/C++ code depending on Cirq), we have made available bazel rulesets for generating both python and C/C++ proto apis.
155-
These rules live in the BUILD files [here](https://github.com/quantumlib/Cirq/tree/master/cirq/api/google/v1) and [here](https://github.com/quantumlib/Cirq/tree/master/cirq/api/google/v2).
156-
Downstream projects should load Cirq as an [external dependency](https://docs.bazel.build/versions/master/external.html), allowing rules from those BUILD files to be used directly.
157-
158154
## Continuous integration and local testing
159155
160156
There are a few options for running continuous integration checks, varying from easy and fast to slow and reliable.

0 commit comments

Comments
 (0)