Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Support Clang compile for Linux workflow #2015

Merged
merged 3 commits into from
Nov 25, 2022
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
64 changes: 59 additions & 5 deletions .github/workflows/ci_linux.yml
Original file line number Diff line number Diff line change
Expand Up @@ -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:
Expand All @@ -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:
Expand All @@ -37,15 +87,17 @@ 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 ..
- name: compile
run: |
cd build
make -j ${{env.proc_num}}
compile-with-bazel:

clang-compile-with-bazel:
runs-on: ubuntu-latest

steps:
Expand All @@ -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 //...