Skip to content

Commit 8a74118

Browse files
committed
Merge branch 'main' into feature/enable-tvos-packaging
2 parents 12634d2 + 58a1c1b commit 8a74118

Some content is hidden

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

45 files changed

+1116
-605
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
@@ -198,9 +198,17 @@ if(FIREBASE_INCLUDE_FIRESTORE AND DESKTOP)
198198
endif()
199199

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

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})

firestore/integration_test_internal/src/bundle_test.cc

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -177,8 +177,12 @@ TEST_F(BundleTest, CanDeleteFirestoreFromProgressUpdate) {
177177
progresses.push_back(progress);
178178
// Delete firestore before the final progress.
179179
if (progresses.size() == 3) {
180+
// Save `db_deleted` to a local variable because this lambda gets
181+
// deleted by the call to `DeleteFirestore()` below, and therefore it
182+
// is undefined behavior to access any captured variables thereafter.
183+
auto& db_deleted_local = db_deleted;
180184
DeleteFirestore(db);
181-
db_deleted.set_value();
185+
db_deleted_local.set_value();
182186
}
183187
});
184188

0 commit comments

Comments
 (0)