diff --git a/.github/workflows/ci_linux.yml b/.github/workflows/ci_linux.yml index f470b2b2c7..8e9aa807cc 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 //...