Skip to content

Commit 126965b

Browse files
authored
CMake grpc upgrade to 1.44.0 (#9488)
1 parent 0fe05a8 commit 126965b

File tree

10 files changed

+60
-11
lines changed

10 files changed

+60
-11
lines changed

.github/workflows/firestore.yml

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -126,7 +126,8 @@ jobs:
126126
sanitizers:
127127
# Don't run on private repo unless it is a PR.
128128
if: (github.repository == 'Firebase/firebase-ios-sdk' && github.event_name == 'schedule') || github.event_name == 'pull_request'
129-
runs-on: macos-11
129+
# TODO(b/231154868): GRPC 1.44 cause link issues on Mac, moving it to Ubuntu for now and add Mac when it is resolved.
130+
runs-on: ubuntu-latest
130131
needs: check
131132

132133
strategy:

CMakeLists.txt

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -174,6 +174,13 @@ else()
174174
set(ZLIB_ROOT_DIR ${FIREBASE_EXTERNAL_SOURCE_DIR}/zlib)
175175
endif()
176176

177+
find_package(re2 QUIET)
178+
if(RE2_FOUND)
179+
set(gRPC_RE2_PROVIDER package CACHE STRING "Use external re2")
180+
else()
181+
set(RE2_ROOT_DIR ${FIREBASE_EXTERNAL_SOURCE_DIR}/re2)
182+
endif()
183+
177184
set(gRPC_BUILD_TESTS OFF CACHE BOOL "Disable gRPC tests")
178185
set(gRPC_BUILD_CODEGEN OFF CACHE BOOL "Disable gRPC codegen")
179186
set(gRPC_BUILD_CSHARP_EXT OFF CACHE BOOL "Disable gRPC C# extensions")

cmake/external/CMakeLists.txt

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -39,4 +39,5 @@ include(leveldb)
3939
include(libfuzzer)
4040
include(nanopb)
4141
include(protobuf)
42+
include(re2)
4243
include(zlib)

cmake/external/abseil-cpp.cmake

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -14,15 +14,15 @@
1414

1515
include(ExternalProject)
1616

17-
set(version 20200225)
17+
set(version 20211102.0)
1818

1919
ExternalProject_Add(
2020
abseil-cpp
2121

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

2727
PREFIX ${PROJECT_BINARY_DIR}
2828

cmake/external/boringssl.cmake

Lines changed: 3 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -18,17 +18,16 @@ if(TARGET boringssl)
1818
return()
1919
endif()
2020

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

2524
ExternalProject_Add(
2625
boringssl
2726

2827
DOWNLOAD_DIR ${FIREBASE_DOWNLOAD_DIR}
2928
DOWNLOAD_NAME boringssl-${commit}.tar.gz
3029
URL https://github.com/google/boringssl/archive/${commit}.tar.gz
31-
URL_HASH SHA256=781fa39693ec2984c71213cd633e9f6589eaaed75e3a9ac413237edec96fd3b9
30+
URL_HASH SHA256=534fa658bd845fd974b50b10f444d392dfd0d93768c4a51b61263fd37d851c40
3231

3332
PREFIX ${PROJECT_BINARY_DIR}
3433
SOURCE_DIR ${PROJECT_BINARY_DIR}/src/boringssl

cmake/external/c-ares.cmake

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -18,7 +18,7 @@ if(TARGET c-ares)
1818
return()
1919
endif()
2020

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

cmake/external/firestore.cmake

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -18,6 +18,7 @@ include(grpc)
1818
include(leveldb)
1919
include(nanopb)
2020
include(protobuf)
21+
include(re2)
2122
include(libfuzzer)
2223

2324
if(TARGET Firestore)
@@ -32,6 +33,7 @@ ExternalProject_Add(
3233
leveldb
3334
nanopb
3435
protobuf
36+
re2
3537
libfuzzer
3638

3739
# Lay the binary directory out as if this were a subproject. This makes it

cmake/external/googletest.cmake

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -20,7 +20,7 @@ endif()
2020

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

2525
ExternalProject_Add(
2626
googletest

cmake/external/grpc.cmake

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -18,15 +18,15 @@ if(TARGET grpc)
1818
return()
1919
endif()
2020

21-
set(version 1.28.0)
21+
set(version 1.44.0)
2222

2323
ExternalProject_Add(
2424
grpc
2525

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

3131
PREFIX ${PROJECT_BINARY_DIR}
3232
SOURCE_DIR ${PROJECT_BINARY_DIR}/src/grpc

cmake/external/re2.cmake

Lines changed: 39 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,39 @@
1+
# Copyright 2022 Google LLC
2+
#
3+
# Licensed under the Apache License, Version 2.0 (the "License");
4+
# you may not use this file except in compliance with the License.
5+
# You may obtain a copy of the License at
6+
#
7+
# http://www.apache.org/licenses/LICENSE-2.0
8+
#
9+
# Unless required by applicable law or agreed to in writing, software
10+
# distributed under the License is distributed on an "AS IS" BASIS,
11+
# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
12+
# See the License for the specific language governing permissions and
13+
# limitations under the License.
14+
15+
include(ExternalProject)
16+
17+
if(TARGET RE2)
18+
return()
19+
endif()
20+
21+
# Based on https://github.com/grpc/grpc/blob/v1.44.0/bazel/grpc_deps.bzl
22+
set(commit 8e08f47b11b413302749c0d8b17a1c94777495d5)
23+
24+
ExternalProject_Add(
25+
re2
26+
27+
DOWNLOAD_DIR ${FIREBASE_DOWNLOAD_DIR}
28+
DOWNLOAD_NAME re2-${commit}.tar.gz
29+
URL https://github.com/google/re2/archive/${commit}.tar.gz
30+
URL_HASH SHA256=319a58a58d8af295db97dfeecc4e250179c5966beaa2d842a82f0a013b6a239b
31+
32+
PREFIX ${PROJECT_BINARY_DIR}
33+
SOURCE_DIR ${PROJECT_BINARY_DIR}/src/re2
34+
35+
CONFIGURE_COMMAND ""
36+
BUILD_COMMAND ""
37+
INSTALL_COMMAND ""
38+
TEST_COMMAND ""
39+
)

0 commit comments

Comments
 (0)