@@ -103,33 +103,39 @@ jobs:
103103 protobuf-install-dir : /protobuf-3.21.12
104104 config-brpc-options : --cc=gcc --cxx=g++ --werror
105105
106- gcc-compile-with-bazel :
106+ gcc-compile-and-test- with-bazel :
107107 runs-on : ubuntu-22.04
108108 steps :
109109 - uses : actions/checkout@v2
110- - run : bazel build --verbose_failures -- //... -//example/...
110+ - run : bazel build -- //:brpc
111+ - run : bazel test //test/...
111112
112113 gcc-compile-with-boringssl :
113114 runs-on : ubuntu-22.04
114115 steps :
115116 - uses : actions/checkout@v2
116- - run : bazel build --verbose_failures --define with_mesalink=false --define with_glog=true --define with_thrift=true --define BRPC_WITH_BORINGSSL=true -- //... -//example/...
117+ - run : |
118+ bazel build --define with_mesalink=false \
119+ --define with_glog=true \
120+ --define with_thrift=true \
121+ --define BRPC_WITH_BORINGSSL=true \
122+ -- //:brpc
117123
118124 gcc-compile-with-bazel-all-options :
119125 runs-on : ubuntu-22.04
120126 steps :
121127 - uses : actions/checkout@v2
122128 - run : |
123- bazel build --verbose_failures \
124- --define with_mesalink=false \
129+ bazel build --define with_mesalink=false \
125130 --define with_glog=true \
126131 --define with_thrift=true \
127132 --define with_debug_bthread_sche_safety=true \
128133 --define with_debug_lock=true \
129134 --define with_asan=true \
130135 --define with_bthread_tracer=true \
131136 --define BRPC_WITH_NO_PTHREAD_MUTEX_HOOK=true \
132- -- //... -//example/...
137+ --define with_babylon_counter=true \
138+ -- //:brpc
133139
134140 clang-compile-with-make-protobuf :
135141 runs-on : ubuntu-22.04
@@ -161,25 +167,34 @@ jobs:
161167 protobuf-install-dir : /protobuf-3.21.12
162168 config-brpc-options : --cc=clang --cxx=clang++ --werror
163169
164- clang-compile-with-bazel :
170+ clang-compile-and-test- with-bazel :
165171 runs-on : ubuntu-22.04
166172 steps :
167173 - uses : actions/checkout@v2
168- - run : bazel build --verbose_failures --action_env=CC=clang -- //... -//example/...
174+ - run : bazel build --action_env=CC=clang -- //:brpc
175+ - run : |
176+ bazel test --test_output=streamed \
177+ --action_env=CC=clang \
178+ //test/...
169179
170180 clang-compile-with-boringssl :
171181 runs-on : ubuntu-22.04
172182 steps :
173183 - uses : actions/checkout@v2
174- - run : bazel build --verbose_failures --action_env=CC=clang --define with_mesalink=false --define with_glog=true --define with_thrift=true --define BRPC_WITH_BORINGSSL=true -- //... -//example/...
184+ - run : |
185+ bazel build --action_env=CC=clang \
186+ --define with_mesalink=false \
187+ --define with_glog=true \
188+ --define with_thrift=true \
189+ --define BRPC_WITH_BORINGSSL=true \
190+ -- //:brpc
175191
176192 clang-compile-with-bazel-all-options :
177193 runs-on : ubuntu-22.04
178194 steps :
179195 - uses : actions/checkout@v2
180196 - run : |
181- bazel build --verbose_failures \
182- --action_env=CC=clang \
197+ bazel build --action_env=CC=clang \
183198 --define with_mesalink=false \
184199 --define with_glog=true \
185200 --define with_thrift=true \
@@ -188,7 +203,8 @@ jobs:
188203 --define with_asan=true \
189204 --define with_bthread_tracer=true \
190205 --define BRPC_WITH_NO_PTHREAD_MUTEX_HOOK=true \
191- -- //... -//example/...
206+ --define with_babylon_counter=true \
207+ -- //:brpc
192208
193209 clang-unittest :
194210 runs-on : ubuntu-22.04
@@ -226,11 +242,31 @@ jobs:
226242 cd test
227243 sh ./run_tests.sh
228244
229- bazel-bvar-unittest :
245+
246+ clang-bazel-unittest-bvar-babylon :
230247 runs-on : ubuntu-22.04
231248 steps :
232249 - uses : actions/checkout@v2
233- - run : bazel test --verbose_failures //test:bvar_test
234- - run : bazel test --verbose_failures --define with_babylon_counter=true //test:bvar_test
235- - run : bazel test --verbose_failures --action_env=CC=clang //test:bvar_test
236- - run : bazel test --verbose_failures --action_env=CC=clang --define with_babylon_counter=true //test:bvar_test
250+ - run : |
251+ bazel test --action_env=CC=clang \
252+ --define with_babylon_counter=true \
253+ //test:bvar_unittests
254+
255+ clang-bazel-unittest-new-pb :
256+ runs-on : ubuntu-22.04
257+ env :
258+ TEST_PROTOBUF_VERSION : " 34.1"
259+ # protobuf >= 34.x uses new ProtoInfo fields (option_deps,
260+ # extension_declarations) introduced in Bazel 8.x. The repo's
261+ # .bazelversion (7.2.1) is too old. bazelisk honors USE_BAZEL_VERSION.
262+ USE_BAZEL_VERSION : " 8.3.1"
263+ steps :
264+ - uses : actions/checkout@v2
265+ - name : Override protobuf version for testing
266+ run : |
267+ sed -i -E "s/(bazel_dep\(name = ['\"]protobuf['\"], version = ['\"])[^'\"]+/\1${TEST_PROTOBUF_VERSION}/" MODULE.bazel
268+ echo "After override:"
269+ grep -E "bazel_dep\(name = ['\"]protobuf['\"]" MODULE.bazel
270+ grep -qE "bazel_dep\(name = ['\"]protobuf['\"], version = ['\"]${TEST_PROTOBUF_VERSION}['\"]" MODULE.bazel \
271+ || { echo "ERROR: failed to override protobuf version in MODULE.bazel to ${TEST_PROTOBUF_VERSION}"; exit 1; }
272+ - run : bazel test --action_env=CC=clang //test:brpc_unittests
0 commit comments