You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@brpc.apache.org by ww...@apache.org on 2022/11/25 01:36:32 UTC

[incubator-brpc] branch master updated: Support Clang compile for Linux workflow (#2015)

This is an automated email from the ASF dual-hosted git repository.

wwbmmm pushed a commit to branch master
in repository https://gitbox.apache.org/repos/asf/incubator-brpc.git


The following commit(s) were added to refs/heads/master by this push:
     new 93a49cd8 Support Clang compile for Linux workflow (#2015)
93a49cd8 is described below

commit 93a49cd826beadb34bc42121074c60671caf038b
Author: 果冻虾仁 <gu...@apache.org>
AuthorDate: Fri Nov 25 09:36:25 2022 +0800

    Support Clang compile for Linux workflow (#2015)
    
    * clang
    
    * mergefile
    
    * bazel
---
 .github/workflows/ci_linux.yml | 64 ++++++++++++++++++++++++++++++++++++++----
 1 file changed, 59 insertions(+), 5 deletions(-)

diff --git a/.github/workflows/ci_linux.yml b/.github/workflows/ci_linux.yml
index f470b2b2..8e9aa807 100644
--- a/.github/workflows/ci_linux.yml
+++ b/.github/workflows/ci_linux.yml
@@ -10,7 +10,7 @@ env:
   proc_num: $(nproc)
 
 jobs:
-  compile-with-make:
+  gcc-compile-with-make:
     runs-on: ubuntu-latest # https://github.com/actions/runner-images
 
     steps:
@@ -19,14 +19,64 @@ jobs:
     - name: install dependences
       run: |
            sudo apt-get install -y git g++ make libssl-dev libgflags-dev libprotobuf-dev libprotoc-dev protobuf-compiler libleveldb-dev libgoogle-perftools-dev
-    - name: config_brpc
+    - name: config brpc
       run: |
            ./config_brpc.sh --header="/usr/local/include /usr/include" --libs="/usr/local/lib /usr/local/lib64 /usr/lib /usr/lib64"
     - name: compile
       run: |
            make -j ${{env.proc_num}}
+
+  gcc-compile-with-cmake:
+    runs-on: ubuntu-latest
+
+    steps:
+    - uses: actions/checkout@v2
+    
+    - name: install dependences
+      run: |
+           sudo apt-get install -y git g++ make libssl-dev libgflags-dev libprotobuf-dev libprotoc-dev protobuf-compiler libleveldb-dev
+    - name: cmake 
+      run: |
+           mkdir build
+           cd build
+           cmake ..
+    - name: compile
+      run: |
+           cd build
+           make -j ${{env.proc_num}}
+
+  gcc-compile-with-bazel:
+    runs-on: ubuntu-latest
+
+    steps:
+    - uses: actions/checkout@v2
+    
+    - name: install dependences
+      run: |
+           sudo apt-get update
+           sudo apt-get install libibverbs-dev
+    - name: compile
+      run: |
+           bazel build -j ${{env.proc_num}} -c opt --copt -DHAVE_ZLIB=1 //...
+
    
-  compile-with-cmake:
+  clang-compile-with-make:
+    runs-on: ubuntu-latest # https://github.com/actions/runner-images
+
+    steps:
+    - uses: actions/checkout@v2
+    
+    - name: install dependences
+      run: |
+           sudo apt-get install -y git g++ make libssl-dev libgflags-dev libprotobuf-dev libprotoc-dev protobuf-compiler libleveldb-dev libgoogle-perftools-dev
+    - name: config brpc
+      run: |
+           ./config_brpc.sh --header="/usr/local/include /usr/include" --libs="/usr/local/lib /usr/local/lib64 /usr/lib /usr/lib64" --nodebugsymbols --cxx=clang++ --cc=clang
+    - name: compile
+      run: |
+           make -j ${{env.proc_num}}
+
+  clang-compile-with-cmake:
     runs-on: ubuntu-latest
 
     steps:
@@ -37,6 +87,8 @@ jobs:
            sudo apt-get install -y git g++ make libssl-dev libgflags-dev libprotobuf-dev libprotoc-dev protobuf-compiler libleveldb-dev
     - name: cmake 
       run: |
+           export CC=clang
+           export CXX=clang++
            mkdir build
            cd build
            cmake ..
@@ -44,8 +96,8 @@ jobs:
       run: |
            cd build
            make -j ${{env.proc_num}}
-           
-  compile-with-bazel:
+
+  clang-compile-with-bazel:
     runs-on: ubuntu-latest
 
     steps:
@@ -57,4 +109,6 @@ jobs:
            sudo apt-get install libibverbs-dev
     - name: compile
       run: |
+           export CC=clang
+           export CXX=clang++
            bazel build -j ${{env.proc_num}} -c opt --copt -DHAVE_ZLIB=1 //...


---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscribe@brpc.apache.org
For additional commands, e-mail: dev-help@brpc.apache.org