Skip to content

CMake grpc upgrade to 1.44.0 #9488

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

Merged
merged 21 commits into from
May 2, 2022
Merged
Show file tree
Hide file tree
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
3 changes: 2 additions & 1 deletion .github/workflows/firestore.yml
Original file line number Diff line number Diff line change
Expand Up @@ -126,7 +126,8 @@ jobs:
sanitizers:
# Don't run on private repo unless it is a PR.
if: (github.repository == 'Firebase/firebase-ios-sdk' && github.event_name == 'schedule') || github.event_name == 'pull_request'
runs-on: macos-11
# TODO(b/231154868): GRPC 1.44 cause link issues on Mac, moving it to Ubuntu for now and add Mac when it is resolved.
runs-on: ubuntu-latest
needs: check

strategy:
Expand Down
7 changes: 7 additions & 0 deletions CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -174,6 +174,13 @@ else()
set(ZLIB_ROOT_DIR ${FIREBASE_EXTERNAL_SOURCE_DIR}/zlib)
endif()

find_package(re2 QUIET)
if(RE2_FOUND)
set(gRPC_RE2_PROVIDER package CACHE STRING "Use external re2")
else()
set(RE2_ROOT_DIR ${FIREBASE_EXTERNAL_SOURCE_DIR}/re2)
endif()

set(gRPC_BUILD_TESTS OFF CACHE BOOL "Disable gRPC tests")
set(gRPC_BUILD_CODEGEN OFF CACHE BOOL "Disable gRPC codegen")
set(gRPC_BUILD_CSHARP_EXT OFF CACHE BOOL "Disable gRPC C# extensions")
Expand Down
1 change: 1 addition & 0 deletions cmake/external/CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -39,4 +39,5 @@ include(leveldb)
include(libfuzzer)
include(nanopb)
include(protobuf)
include(re2)
include(zlib)
4 changes: 2 additions & 2 deletions cmake/external/abseil-cpp.cmake
Original file line number Diff line number Diff line change
Expand Up @@ -14,15 +14,15 @@

include(ExternalProject)

set(version 20200225)
set(version 20211102.0)

ExternalProject_Add(
abseil-cpp

DOWNLOAD_DIR ${FIREBASE_DOWNLOAD_DIR}
DOWNLOAD_NAME abseil-cpp-${version}.tar.gz
URL https://github.com/abseil/abseil-cpp/archive/${version}.tar.gz
URL_HASH SHA256=728a813291bdec2aa46eab8356ace9f75ac2ed9dfe2df5ab603c4e6c09f1c353
URL_HASH SHA256=dcf71b9cba8dc0ca9940c4b316a0c796be8fab42b070bb6b7cab62b48f0e66c4

PREFIX ${PROJECT_BINARY_DIR}

Expand Down
7 changes: 3 additions & 4 deletions cmake/external/boringssl.cmake
Original file line number Diff line number Diff line change
Expand Up @@ -18,17 +18,16 @@ if(TARGET boringssl)
return()
endif()

# Based on https://github.com/grpc/grpc/blob/v1.27.0/bazel/grpc_deps.bzl
# master-with-bazel@{2019-10-18}
set(commit 83da28a68f32023fd3b95a8ae94991a07b1f6c62)
# Based on https://github.com/grpc/grpc/blob/v1.44.0/bazel/grpc_deps.bzl
set(commit b9232f9e27e5668bc0414879dcdedb2a59ea75f2)

ExternalProject_Add(
boringssl

DOWNLOAD_DIR ${FIREBASE_DOWNLOAD_DIR}
DOWNLOAD_NAME boringssl-${commit}.tar.gz
URL https://github.com/google/boringssl/archive/${commit}.tar.gz
URL_HASH SHA256=781fa39693ec2984c71213cd633e9f6589eaaed75e3a9ac413237edec96fd3b9
URL_HASH SHA256=534fa658bd845fd974b50b10f444d392dfd0d93768c4a51b61263fd37d851c40

PREFIX ${PROJECT_BINARY_DIR}
SOURCE_DIR ${PROJECT_BINARY_DIR}/src/boringssl
Expand Down
2 changes: 1 addition & 1 deletion cmake/external/c-ares.cmake
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,7 @@ if(TARGET c-ares)
return()
endif()

# Based on https://github.com/grpc/grpc/blob/v1.27.0/bazel/grpc_deps.bzl
# Based on https://github.com/grpc/grpc/blob/v1.44.0/bazel/grpc_deps.bzl
# v1.15.0, master@{2018-10-23}
set(commit e982924acee7f7313b4baa4ee5ec000c5e373c30)

Expand Down
2 changes: 2 additions & 0 deletions cmake/external/firestore.cmake
Original file line number Diff line number Diff line change
Expand Up @@ -18,6 +18,7 @@ include(grpc)
include(leveldb)
include(nanopb)
include(protobuf)
include(re2)
include(libfuzzer)

if(TARGET Firestore)
Expand All @@ -32,6 +33,7 @@ ExternalProject_Add(
leveldb
nanopb
protobuf
re2
libfuzzer

# Lay the binary directory out as if this were a subproject. This makes it
Expand Down
2 changes: 1 addition & 1 deletion cmake/external/googletest.cmake
Original file line number Diff line number Diff line change
Expand Up @@ -20,7 +20,7 @@ endif()

# Note: googletest lives at head and encourages to just point to a head commit.
# https://github.com/google/googletest/blob/bf66935e07/README.md?plain=1#L5-L10
set(version bf66935e07825318ae519675d73d0f3e313b3ec6)
set(version main)

ExternalProject_Add(
googletest
Expand Down
4 changes: 2 additions & 2 deletions cmake/external/grpc.cmake
Original file line number Diff line number Diff line change
Expand Up @@ -18,15 +18,15 @@ if(TARGET grpc)
return()
endif()

set(version 1.28.0)
set(version 1.44.0)

ExternalProject_Add(
grpc

DOWNLOAD_DIR ${FIREBASE_DOWNLOAD_DIR}
DOWNLOAD_NAME grpc-${version}.tar.gz
URL https://github.com/grpc/grpc/archive/v${version}.tar.gz
URL_HASH SHA256=d6277f77e0bb922d3f6f56c0f93292bb4cfabfc3c92b31ee5ccea0e100303612
URL_HASH SHA256=8c05641b9f91cbc92f51cc4a5b3a226788d7a63f20af4ca7aaca50d92cc94a0d

PREFIX ${PROJECT_BINARY_DIR}
SOURCE_DIR ${PROJECT_BINARY_DIR}/src/grpc
Expand Down
39 changes: 39 additions & 0 deletions cmake/external/re2.cmake
Original file line number Diff line number Diff line change
@@ -0,0 +1,39 @@
# Copyright 2022 Google LLC
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
#
# http://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applicable law or agreed to in writing, software
# distributed under the License is distributed on an "AS IS" BASIS,
# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
# See the License for the specific language governing permissions and
# limitations under the License.

include(ExternalProject)

if(TARGET RE2)
return()
endif()

# Based on https://github.com/grpc/grpc/blob/v1.44.0/bazel/grpc_deps.bzl
set(commit 8e08f47b11b413302749c0d8b17a1c94777495d5)

ExternalProject_Add(
re2

DOWNLOAD_DIR ${FIREBASE_DOWNLOAD_DIR}
DOWNLOAD_NAME re2-${commit}.tar.gz
URL https://github.com/google/re2/archive/${commit}.tar.gz
URL_HASH SHA256=319a58a58d8af295db97dfeecc4e250179c5966beaa2d842a82f0a013b6a239b

PREFIX ${PROJECT_BINARY_DIR}
SOURCE_DIR ${PROJECT_BINARY_DIR}/src/re2

CONFIGURE_COMMAND ""
BUILD_COMMAND ""
INSTALL_COMMAND ""
TEST_COMMAND ""
)