Skip to content

Commit 76dfd77

Browse files
committed
Merge branch 'main' into bugfix/app-cmake-exceptions-private
2 parents 6352a70 + 2d2e320 commit 76dfd77

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

44 files changed

+1111
-604
lines changed

.github/workflows/checks_secure.yml

Lines changed: 38 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,38 @@
1+
name: Checks (secure)
2+
# These are run on base branch with read/write access.
3+
4+
on:
5+
pull_request_target:
6+
types: [synchronize]
7+
8+
jobs:
9+
dismiss_stale_approvals:
10+
# Dismiss stale approvals for non-admins or if this PR comes from a fork.
11+
runs-on: ubuntu-latest
12+
# Only if another commit was added to the PR.
13+
steps:
14+
- name: Check user permission
15+
id: check
16+
uses: scherermichael-oss/[email protected]
17+
# This action sets outputs.has-permission to '1' or ''
18+
with:
19+
required-permission: admin
20+
env:
21+
GITHUB_TOKEN: ${{ github.token }}
22+
- uses: actions/checkout@v2
23+
if: steps.check.outputs.has-permission != 1 || github.event.pull_request.head.repo.full_name != github.repository
24+
with:
25+
submodules: false
26+
- name: Setup python
27+
if: steps.check.outputs.has-permission != 1 || github.event.pull_request.head.repo.full_name != github.repository
28+
uses: actions/setup-python@v2
29+
with:
30+
python-version: 3.7
31+
- name: Install prerequisites
32+
if: steps.check.outputs.has-permission != 1 || github.event.pull_request.head.repo.full_name != github.repository
33+
run: pip install -r scripts/gha/requirements.txt
34+
- name: Dismiss reviews
35+
if: steps.check.outputs.has-permission != 1 || github.event.pull_request.head.repo.full_name != github.repository
36+
shell: bash
37+
run: |
38+
python scripts/gha/dismiss_reviews.py --token ${{github.token}} --pull_number ${{github.event.pull_request.number}} --review_state=APPROVED --message "🍞 Dismissed stale approval on external PR."

CMakeLists.txt

Lines changed: 9 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -197,9 +197,17 @@ if(FIREBASE_INCLUDE_FIRESTORE AND DESKTOP)
197197
endif()
198198

199199
if(FIREBASE_CPP_USE_PRIOR_GRADLE_BUILD)
200+
# Quote meta characters in ${CMAKE_CURRENT_LIST_DIR} so we can
201+
# match it in a regex.
202+
# For example, '/path/with/+meta/char.acters' will become
203+
# '/path/with/\+meta/char\.acters'.
204+
string(REGEX REPLACE
205+
"([][+.*()^])" "\\\\\\1" # Yes, this many \'s is correct.
206+
current_list_dir_regex
207+
"${CMAKE_CURRENT_LIST_DIR}")
200208
# Figure out where app's binary_dir was.
201209
string(REGEX REPLACE
202-
"${CMAKE_CURRENT_LIST_DIR}/[^/]+/(.*)"
210+
"${current_list_dir_regex}/[^/]+/(.*)"
203211
"${CMAKE_CURRENT_LIST_DIR}/app/\\1"
204212
APP_BINARY_DIR "${FIREBASE_BINARY_DIR}")
205213

cmake/external/googletest.cmake

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -18,20 +18,20 @@ if(TARGET googletest OR NOT DOWNLOAD_GOOGLETEST)
1818
return()
1919
endif()
2020

21-
set(version 1.10.0)
21+
set(version 1.11.0) # June 2021
2222

2323
ExternalProject_Add(
2424
googletest
2525

2626
DOWNLOAD_DIR ${FIREBASE_DOWNLOAD_DIR}
2727
DOWNLOAD_NAME googletest-${version}.tar.gz
2828
URL https://github.com/google/googletest/archive/release-${version}.tar.gz
29-
URL_HASH SHA256=9dc9157a9a1551ec7a7e43daea9a694a0bb5fb8bec81235d8a1e6ef64c716dcb
29+
URL_HASH SHA256=b4870bf121ff7795ba20d20bcdd8627b8e088f2d1dab299a031c1034eddc93d5
3030

3131
PREFIX ${PROJECT_BINARY_DIR}
3232

3333
CONFIGURE_COMMAND ""
3434
BUILD_COMMAND ""
3535
INSTALL_COMMAND ""
3636
TEST_COMMAND ""
37-
)
37+
)

external/vcpkg

Submodule vcpkg updated 133 files

firestore/integration_test_internal/CMakeLists.txt

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -378,5 +378,9 @@ add_subdirectory(${FIREBASE_CPP_SDK_DIR} bin/ EXCLUDE_FROM_ALL)
378378
# Note that firebase_app needs to be last in the list.
379379
set(firebase_libs firebase_firestore firebase_auth firebase_app)
380380
set(gtest_libs gtest gmock)
381+
# Validation tests need exceptions to be enabled in order to run. The only
382+
# library that explicitly disables exceptions is App (but it gets propagated
383+
# everywhere), so overriding that effectively reenables exceptions.
384+
target_compile_options(firebase_app PUBLIC -fexceptions)
381385
target_link_libraries(${integration_test_target_name} ${firebase_libs}
382386
${gtest_libs} ${ADDITIONAL_LIBS})

0 commit comments

Comments
 (0)