diff --git a/.github/workflows/build.yml b/.github/workflows/build.yml index c8471cc9..757a18e9 100644 --- a/.github/workflows/build.yml +++ b/.github/workflows/build.yml @@ -17,7 +17,7 @@ jobs: fail-fast: false matrix: compiler: [clang, gcc] - os: [ubuntu-latest] + os: [ubuntu-20.04] build_tool: [cmake, bazel] with_test: [true, false] exclude: @@ -46,6 +46,7 @@ jobs: - name: Install dependencies on Linux if: ${{ runner.os == 'Linux' }} run: | + sudo apt-get update sudo apt-get install -qq libgflags-dev \ libprotobuf-dev libprotoc-dev protobuf-compiler \ libleveldb-dev libgoogle-perftools-dev diff --git a/CMakeLists.txt b/CMakeLists.txt index 110daa30..378e06f2 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -62,6 +62,10 @@ if(BRPC_WITH_GLOG) include_directories(${GLOG_INCLUDE_PATH}) endif() +if(BRPC_WITH_THRIFT) + find_library(THRIFT_LIB NAMES thrift) +endif() + if(LEVELDB_WITH_SNAPPY) find_library(SNAPPY_LIB NAMES snappy) endif() @@ -126,6 +130,12 @@ if(LEVELDB_WITH_SNAPPY) ) endif() +if(BRPC_WITH_THRIFT) + set(DYNAMIC_LIB ${DYNAMIC_LIB} + ${THRIFT_LIB} + ) +endif() + if(CMAKE_SYSTEM_NAME STREQUAL "Darwin") set(DYNAMIC_LIB ${DYNAMIC_LIB} pthread diff --git a/WORKSPACE b/WORKSPACE index 360d1cf7..a6e066fe 100644 --- a/WORKSPACE +++ b/WORKSPACE @@ -53,9 +53,9 @@ http_archive( http_archive( name = "com_github_brpc_brpc", - sha256 = "c0168d22205724bfa1939c9ad79bd9f74a98e0bd05be9e8f5cc504ef44c676a1", - strip_prefix = "incubator-brpc-1.0.0-rc02", - url = "https://github.com/apache/incubator-brpc/archive/refs/tags/1.0.0-rc02.tar.gz" + sha256 = "58a06997ae07c1654979fb8356884481ab9803b60de04c1b341d986e2b62220d", + strip_prefix = "brpc-1.1.0", + url = "https://github.com/apache/incubator-brpc/archive/refs/tags/1.1.0.tar.gz" ) bind(