XueSongTap commented on code in PR #2985:
URL: https://github.com/apache/brpc/pull/2985#discussion_r2312033752


##########
.github/workflows/ci-linux.yml:
##########
@@ -169,6 +169,21 @@ jobs:
     - uses: actions/checkout@v2
     - run: bazel build --verbose_failures --action_env=CC=clang --define 
with_mesalink=false --define with_glog=true --define with_thrift=true --define 
with_debug_bthread_sche_safety=true --define with_debug_lock=true --define 
with_asan=true -- //... -//example/...
 
+  gcc-bazel-unittest:
+    runs-on: ubuntu-22.04
+    steps:
+    - uses: actions/checkout@v2
+    - name: run bazel tests
+      run: bazel test --test_output=errors --verbose_failures -- //test/... 
+
+  clang-bazel-unittest:
+    runs-on: ubuntu-22.04  
+    steps:
+    - uses: actions/checkout@v2
+    - uses: bazelbuild/setup-bazelisk@v2
+    - name: run bazel tests
+      run: bazel test --test_output=errors --verbose_failures 
--action_env=CC=clang -- //test/... //...

Review Comment:
   according to 
   ```
     clang-unittest-asan:
       runs-on: ubuntu-22.04
       steps:
       - uses: actions/checkout@v2
       - uses: ./.github/actions/install-essential-dependencies
       - uses: ./.github/actions/init-ut-make-config
         with:
           options: --cc=clang-12 --cxx=clang++-12 --with-bthread-tracer 
--with-asan
       - name: compile tests
         run: |
           cat config.mk
           cd test
           make NEED_GPERFTOOLS=0 -j ${{env.proc_num}}
       - name: run tests
         run: |
           cd test
           sh ./run_tests.sh 
   ```
   
   it seems that - symbol come  each step only needs a single leading -.
   So the correct form is either:
   
   - name: run bazel tests
     run: bazel test ...
   
   
   or simply:
   
   - run: bazel test ...
   
   
   In other words, name and run belong to the same step, not two separate ones.
   
   
   To double-check, I also ran the workflow locally with `act`, and it seems to 
trigger and run fine, so the step formatting seems correct
   
   ```
   yxc@yxc-MS-7B89:~/code/2505/brpc_dev$ ./act -W 
.github/workflows/ci-linux.yml -j gcc-bazel-unittest 
   INFO[0000] Using docker host 'unix:///var/run/docker.sock', and daemon 
socket 'unix:///var/run/docker.sock'
   [Build and Test on Linux/gcc-bazel-unittest] ⭐ Run Set up job
   [Build and Test on Linux/gcc-bazel-unittest] 🚀  Start 
image=catthehacker/ubuntu:full-22.04
   [Build and Test on Linux/gcc-bazel-unittest]   🐳  docker pull 
image=catthehacker/ubuntu:full-22.04 platform= username= forcePull=true
   ^C[Build and Test on Linux/gcc-bazel-unittest] failed to remove container: 
Delete 
"http://%2Fvar%2Frun%2Fdocker.sock/v1.47/containers/d30f8fae358ea0167384c75a702f9748a308cb7b9708540c279290923c06b209?force=1&v=1":
 context canceled
   [Build and Test on Linux/gcc-bazel-unittest] context canceled
   [Build and Test on Linux/gcc-bazel-unittest]   ❌  Failure - Set up job
   [Build and Test on Linux/gcc-bazel-unittest] 🏁  Job failed
   Error: context canceled
   yxc@yxc-MS-7B89:~/code/2505/brpc_dev$ ./act -W 
.github/workflows/ci-linux.yml -j gcc-bazel-unittest -s 
GITHUB_TOKEN=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
   INFO[0000] Using docker host 'unix:///var/run/docker.sock', and daemon 
socket 'unix:///var/run/docker.sock'
   [Build and Test on Linux/gcc-bazel-unittest] ⭐ Run Set up job
   [Build and Test on Linux/gcc-bazel-unittest] 🚀  Start 
image=catthehacker/ubuntu:full-22.04
   [Build and Test on Linux/gcc-bazel-unittest]   🐳  docker pull 
image=catthehacker/ubuntu:full-22.04 platform= username= forcePull=true
   [Build and Test on Linux/gcc-bazel-unittest]   🐳  docker create 
image=catthehacker/ubuntu:full-22.04 platform= entrypoint=["tail" "-f" 
"/dev/null"] cmd=[] network="host"
   [Build and Test on Linux/gcc-bazel-unittest]   🐳  docker run 
image=catthehacker/ubuntu:full-22.04 platform= entrypoint=["tail" "-f" 
"/dev/null"] cmd=[] network="host"
   [Build and Test on Linux/gcc-bazel-unittest]   🐳  docker exec cmd=[chown -R 
1001:128 /home/yxc/code/2505/brpc_dev] user=0 workdir=
   [Build and Test on Linux/gcc-bazel-unittest]   🐳  docker exec cmd=[node 
--no-warnings -e console.log(process.execPath)] user= workdir=
   [Build and Test on Linux/gcc-bazel-unittest]   ✅  Success - Set up job
   [Build and Test on Linux/gcc-bazel-unittest] ⭐ Run Main actions/checkout@v2
   [Build and Test on Linux/gcc-bazel-unittest]   🐳  docker cp 
src=/home/yxc/code/2505/brpc_dev/. dst=/home/yxc/code/2505/brpc_dev
   [Build and Test on Linux/gcc-bazel-unittest]   🐳  docker exec cmd=[chown -R 
1001:128 /home/yxc/code/2505/brpc_dev] user=0 workdir=
   [Build and Test on Linux/gcc-bazel-unittest]   ✅  Success - Main 
actions/checkout@v2 [884.508192ms]
   [Build and Test on Linux/gcc-bazel-unittest] ⭐ Run Main run bazel tests
   [Build and Test on Linux/gcc-bazel-unittest]   🐳  docker exec cmd=[bash -e 
/var/run/act/workflow/1] user= workdir=
   | 2025/08/30 17:24:44 Downloading 
https://releases.bazel.build/7.2.1/release/bazel-7.2.1-linux-x86_64...
   Downloading: 68 MB out of 68 MB (100%)
   | Extracting Bazel installation...
   | Starting local Bazel server and connecting to it...
   WARNING: For repository 'com_google_absl', the root module requires module 
version [email protected], but got [email protected] in the 
resolved dependency graph.
   WARNING: For repository 'bazel_skylib', the root module requires module 
version [email protected], but got [email protected] in the resolved 
dependency graph.
   WARNING: For repository 'platforms', the root module requires module version 
[email protected], but got [email protected] in the resolved dependency graph.
   WARNING: For repository 'rules_cc', the root module requires module version 
[email protected], but got [email protected] in the resolved dependency graph.
   WARNING: For repository 'rules_proto', the root module requires module 
version [email protected], but got [email protected] in the resolved 
dependency graph.
   WARNING: /home/yxc/code/2505/brpc_dev/test/BUILD.bazel:178:17: target 
'//test:cc_test_proto' is deprecated: Use cc_proto_library from 
com_google_protobuf
   INFO: From Compiling src/google/protobuf/compiler/rust/relative_path.cc [for 
tool]:
   | external/protobuf~/src/google/protobuf/compiler/rust/relative_path.cc: In 
member function 'std::string 
google::protobuf::compiler::rust::RelativePath::Relative(const 
google::protobuf::compiler::rust::RelativePath&) const':
   | 
external/protobuf~/src/google/protobuf/compiler/rust/relative_path.cc:66:21: 
warning: comparison of integer expressions of different signedness: 'int' and 
'std::vector<std::basic_string_view<char> >::size_type' {aka 'long unsigned 
int'} [-Wsign-compare]
   |    66 |   for (int i = 0; i < current_segments.size(); ++i) {
   |       |                   ~~^~~~~~~~~~~~~~~~~~~~~~~~~
   INFO: From Compiling src/google/protobuf/wire_format_lite.cc [for tool]:
   | external/protobuf~/src/google/protobuf/wire_format_lite.cc:669: warning: 
ignoring '#pragma clang loop' [-Wunknown-pragmas]
   |   669 | #pragma clang loop vectorize(disable) unroll(disable) 
interleave(disable)
   |       |
   | external/protobuf~/src/google/protobuf/wire_format_lite.cc:711: warning: 
ignoring '#pragma clang loop' [-Wunknown-pragmas]
   |   711 | #pragma clang loop vectorize(disable) unroll(disable) 
interleave(disable)
   |       |
   INFO: From Compiling src/google/protobuf/generated_message_tctable_lite.cc 
[for tool]:
   | 
external/protobuf~/src/google/protobuf/generated_message_tctable_lite.cc:807:36:
 warning: 'always_inline' function might not be inlinable [-Wattributes]
   |   807 | PROTOBUF_ALWAYS_INLINE const char* TcParser::FastVarintS1(
   |       |                                    ^~~~~~~~
   | 
external/protobuf~/src/google/protobuf/generated_message_tctable_lite.cc:807:36:
 warning: 'always_inline' function might not be inlinable [-Wattributes]
   | 
external/protobuf~/src/google/protobuf/generated_message_tctable_lite.cc:730:29:
 warning: 'always_inline' function might not be inlinable [-Wattributes]
   |   730 | PROTOBUF_ALWAYS_INLINE bool EnumIsValidAux(int32_t val, uint16_t 
xform_val,
   |       |                             ^~~~~~~~~~~~~~
   | 
external/protobuf~/src/google/protobuf/generated_message_tctable_lite.cc:718:29:
 warning: 'always_inline' function might not be inlinable [-Wattributes]
   |   718 | PROTOBUF_ALWAYS_INLINE void PrefetchEnumData(uint16_t xform_val,
   |       |                             ^~~~~~~~~~~~~~~~
   INFO: From Compiling src/google/protobuf/wire_format_lite.cc:
   | external/protobuf~/src/google/protobuf/wire_format_lite.cc:669: warning: 
ignoring '#pragma clang loop' [-Wunknown-pragmas]
   |   669 | #pragma clang loop vectorize(disable) unroll(disable) 
interleave(disable)
   |       |
   | external/protobuf~/src/google/protobuf/wire_format_lite.cc:711: warning: 
ignoring '#pragma clang loop' [-Wunknown-pragmas]
   |   711 | #pragma clang loop vectorize(disable) unroll(disable) 
interleave(disable)
   |       |
   INFO: From Compiling src/google/protobuf/generated_message_tctable_lite.cc:
   | 
external/protobuf~/src/google/protobuf/generated_message_tctable_lite.cc:807:36:
 warning: 'always_inline' function might not be inlinable [-Wattributes]
   |   807 | PROTOBUF_ALWAYS_INLINE const char* TcParser::FastVarintS1(
   |       |                                    ^~~~~~~~
   | 
external/protobuf~/src/google/protobuf/generated_message_tctable_lite.cc:807:36:
 warning: 'always_inline' function might not be inlinable [-Wattributes]
   | 
external/protobuf~/src/google/protobuf/generated_message_tctable_lite.cc:730:29:
 warning: 'always_inline' function might not be inlinable [-Wattributes]
   |   730 | PROTOBUF_ALWAYS_INLINE bool EnumIsValidAux(int32_t val, uint16_t 
xform_val,
   |       |                             ^~~~~~~~~~~~~~
   | 
external/protobuf~/src/google/protobuf/generated_message_tctable_lite.cc:718:29:
 warning: 'always_inline' function might not be inlinable [-Wattributes]
   |   718 | PROTOBUF_ALWAYS_INLINE void PrefetchEnumData(uint16_t xform_val,
   |       |                             ^~~~~~~~~~~~~~~~
   INFO: Analyzed 57 targets (131 packages loaded, 11699 targets configured).
   INFO: From Compiling src/google/protobuf/compiler/java/full/enum.cc [for 
tool]:
   | external/protobuf~/src/google/protobuf/compiler/java/full/enum.cc: In 
member function 'virtual void 
google::protobuf::compiler::java::EnumNonLiteGenerator::Generate(google::protobuf::io::Printer*)':
   | external/protobuf~/src/google/protobuf/compiler/java/full/enum.cc:72:21: 
warning: comparison of integer expressions of different signedness: 'int' and 
'std::vector<const google::protobuf::EnumValueDescriptor*>::size_type' {aka 
'long unsigned int'} [-Wsign-compare]
   |    72 |   for (int i = 0; i < canonical_values_.size(); i++) {
   |       |                   ~~^~~~~~~~~~~~~~~~~~~~~~~~~~
   | external/protobuf~/src/google/protobuf/compiler/java/full/enum.cc:80:21: 
warning: comparison of integer expressions of different signedness: 'int' and 
'std::vector<const google::protobuf::EnumValueDescriptor*>::size_type' {aka 
'long unsigned int'} [-Wsign-compare]
   |    80 |   for (int i = 0; i < canonical_values_.size(); i++) {
   |       |                   ~~^~~~~~~~~~~~~~~~~~~~~~~~~~
   | external/protobuf~/src/google/protobuf/compiler/java/full/enum.cc:120:21: 
warning: comparison of integer expressions of different signedness: 'int' and 
'std::vector<google::protobuf::compiler::java::EnumNonLiteGenerator::Alias>::size_type'
 {aka 'long unsigned int'} [-Wsign-compare]
   |   120 |   for (int i = 0; i < aliases_.size(); i++) {
   |       |                   ~~^~~~~~~~~~~~~~~~~
   | external/protobuf~/src/google/protobuf/compiler/java/full/enum.cc:204:21: 
warning: comparison of integer expressions of different signedness: 'int' and 
'std::vector<const google::protobuf::EnumValueDescriptor*>::size_type' {aka 
'long unsigned int'} [-Wsign-compare]
   |   204 |   for (int i = 0; i < canonical_values_.size(); i++) {
   |       |                   ~~^~~~~~~~~~~~~~~~~~~~~~~~~~
   | external/protobuf~/src/google/protobuf/compiler/java/full/enum.cc: In 
member function 'bool 
google::protobuf::compiler::java::EnumNonLiteGenerator::CanUseEnumValues()':
   | external/protobuf~/src/google/protobuf/compiler/java/full/enum.cc:378:32: 
warning: comparison of integer expressions of different signedness: 
'std::vector<const google::protobuf::EnumValueDescriptor*>::size_type' {aka 
'long unsigned int'} and 'int' [-Wsign-compare]
   |   378 |   if (canonical_values_.size() != descriptor_->value_count()) {
   |       |       ~~~~~~~~~~~~~~~~~~~~~~~~~^~~~~~~~~~~~~~~~~~~~~~~~~~~~~
   INFO: From Compiling 
src/google/protobuf/compiler/java/full/message_builder.cc [for tool]:
   | 
external/protobuf~/src/google/protobuf/compiler/java/full/message_builder.cc: 
In member function 'void 
google::protobuf::compiler::java::MessageBuilderGenerator::GenerateDescriptorMethods(google::protobuf::io::Printer*)':
   | 
external/protobuf~/src/google/protobuf/compiler/java/full/message_builder.cc:214:23:
 warning: comparison of integer expressions of different signedness: 'int' and 
'std::vector<const google::protobuf::FieldDescriptor*>::size_type' {aka 'long 
unsigned int'} [-Wsign-compare]
   |   214 |     for (int i = 0; i < map_fields.size(); ++i) {
   |       |                     ~~^~~~~~~~~~~~~~~~~~~
   | 
external/protobuf~/src/google/protobuf/compiler/java/full/message_builder.cc:240:23:
 warning: comparison of integer expressions of different signedness: 'int' and 
'std::vector<const google::protobuf::FieldDescriptor*>::size_type' {aka 'long 
unsigned int'} [-Wsign-compare]
   |   240 |     for (int i = 0; i < map_fields.size(); ++i) {
   |       |                     ~~^~~~~~~~~~~~~~~~~~~
   INFO: From Compiling src/google/protobuf/compiler/java/full/message.cc [for 
tool]:
   | external/protobuf~/src/google/protobuf/compiler/java/full/message.cc: In 
member function 'void 
google::protobuf::compiler::java::ImmutableMessageGenerator::GenerateDescriptorMethods(google::protobuf::io::Printer*)':
   | 
external/protobuf~/src/google/protobuf/compiler/java/full/message.cc:805:23: 
warning: comparison of integer expressions of different signedness: 'int' and 
'std::vector<const google::protobuf::FieldDescriptor*>::size_type' {aka 'long 
unsigned int'} [-Wsign-compare]
   |   805 |     for (int i = 0; i < map_fields.size(); ++i) {
   |       |                     ~~^~~~~~~~~~~~~~~~~~~
   INFO: From Compiling src/google/protobuf/compiler/java/kotlin_generator.cc 
[for tool]:
   | In file included from 
bazel-out/k8-opt-exec-ST-d57f47055a04/bin/external/protobuf~/src/google/protobuf/compiler/java/_virtual_includes/helpers/google/protobuf/compiler/java/helpers.h:23,
   |                  from 
external/protobuf~/src/google/protobuf/compiler/java/kotlin_generator.cc:13:
   | 
bazel-out/k8-opt-exec-ST-d57f47055a04/bin/external/protobuf~/src/google/protobuf/io/_virtual_includes/printer/google/protobuf/io/printer.h:
 In instantiation of 'void 
google::protobuf::io::AnnotationProtoCollector<AnnotationProto>::AddAnnotation(size_t,
 size_t, const string&, const std::vector<int>&, 
std::optional<google::protobuf::io::AnnotationCollector::Semantic>) [with 
AnnotationProto = google::protobuf::GeneratedCodeInfo; size_t = long unsigned 
int; std::string = std::__cxx11::basic_string<char>]':
   | 
bazel-out/k8-opt-exec-ST-d57f47055a04/bin/external/protobuf~/src/google/protobuf/io/_virtual_includes/printer/google/protobuf/io/printer.h:123:8:
   required from here
   | 
bazel-out/k8-opt-exec-ST-d57f47055a04/bin/external/protobuf~/src/google/protobuf/io/_virtual_includes/printer/google/protobuf/io/printer.h:127:23:
 warning: comparison of integer expressions of different signedness: 'int' and 
'std::vector<int>::size_type' {aka 'long unsigned int'} [-Wsign-compare]
   |   127 |     for (int i = 0; i < path.size(); ++i) {
   |       |                     ~~^~~~~~~~~~~~~
   INFO: From Compiling src/google/protobuf/compiler/java/lite/enum.cc [for 
tool]:
   | external/protobuf~/src/google/protobuf/compiler/java/lite/enum.cc: In 
member function 'virtual void 
google::protobuf::compiler::java::EnumLiteGenerator::Generate(google::protobuf::io::Printer*)':
   | external/protobuf~/src/google/protobuf/compiler/java/lite/enum.cc:65:21: 
warning: comparison of integer expressions of different signedness: 'int' and 
'std::vector<const google::protobuf::EnumValueDescriptor*>::size_type' {aka 
'long unsigned int'} [-Wsign-compare]
   |    65 |   for (int i = 0; i < canonical_values_.size(); i++) {
   ```



-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: [email protected]

For queries about this service, please contact Infrastructure at:
[email protected]


---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]

Reply via email to