Commit Graph
274 Commits
Author SHA1 Message Date
Morgan Chen 64f8c65599 add Installations to docs script (#5035) 2020-03-06 11:39:10 -08:00
Gil fb0fc07609 Remove setting CMAKE_BUILD_TYPE in CMakeLists.txt (#5027)
This really needs to be set on the command-line if it's to be effective,
and setting it here breaks downstream projects that include
firebase-ios-sdk as a subdirectory.
2020-03-05 15:30:11 -08:00
Jason Hu 194439fdfb Integrating GoogleDataTransport in Crashlytics to Report Crashes (#4989) 2020-03-05 14:59:11 -05:00
Gil d4e86ba091 Fixes for compatibility with builds in firebase-cpp-sdk (#4984)
* Don't modify CMAKE_CXX_FLAGS

* Avoid conflict on RANDOM_FILE

* Only conditionally build tests

* Remove alias provided by the upstream build

* Set SOURCE_DIR and BINARY_DIR for each external library

* Compute repo root without git

This supports building Firestore from a source archive

* Make empty files C++

This makes it possible to compile with a single set of flags for every
cc_library.
2020-02-26 17:54:13 -08:00
Paul Beusterien 54747a092b Fix CI issues from changing interop pod version requirements (#4979) 2020-02-26 13:51:32 -08:00
Chen Liang a310248f49 Make Firebase Storage compile and work in independent watch app (#4955) 2020-02-25 14:06:40 -08:00
Paul Beusterien 0058b259b4 Remove deprecated FIAMDisplay from repo (#4899) 2020-02-13 08:59:43 -08:00
Gil fae5c43af2 Extract log output from xcodebuild runs after failures (#4867) 2020-02-12 15:42:08 -08:00
Gil 69d6ee794b Add a travis output filter (#4866)
* Use a travis-optimized output filter with xcpretty

* Capture and show raw xcodebuild log on failure
2020-02-10 10:26:39 -08:00
Chen Liang f4ae4a4416 re-enable style script for messaging (#4858) 2020-02-07 14:27:18 -08:00
Gil 9d202ae761 Drop support for building Firestore with Xcode 8 (#4842) 2020-02-06 17:37:16 -08:00
Gil 9cb98ac733 Upgrade Firestore emulator to 1.10.4 (#4845)
* Upgrade Firestore emulator to 1.10.4

The emulator now sends resume tokens, which exercises more of the
system. In particular, this means that resuming queries now uses the
index-free query engine.

* Ensure CI runs on script changes
2020-02-06 17:30:20 -08:00
Paul Beusterien dc85cd9339 Update secrets for QuickStart test fix (#4815) 2020-02-04 15:20:13 -08:00
Gil 2652abf99d Add a GitHub Actions workflow for Firestore (#4752)
* Extract setup steps for check.sh into setup_check.sh

* Use checkout v2 which is much faster

However, this doesn't guarantee the master branch exists when running
checks so add that to setup_check.sh.

* Initial Firestore GitHub Actions workflow

* Also run on Linux

* Cache .ccache between runs

* Add sanitizers and xcodebuild
2020-02-01 11:10:58 -08:00
dmandar f5062d861c FDL source, unit tests and app now live in FirebaseDynamicLinks folder. (#4767)
* Move FDL sources to new location.

* Add FDL unit tests.

* Move test app.

* Fix source path.

* Move unit tests path.

* Rename source to sources.

* Change relative path.

* Update podspec.

* Fix header search path.

* Fix relative path for scripts.

* Fix tests.
2020-01-30 11:44:31 -08:00
Gil 36c29e4451 Prepare build scripts for building Firestore on GitHub Actions (#4764)
* Make build.sh cases match script argument order

* Allow install_rereqs to take command-line arguments

* Group Firestore rules together

* Make build.sh work on Linux too

* Invoke setup_bundler.sh from install_prereqs.sh

Also fix typos in setup_bundler.sh

* Get install_prereqs.sh to run on Linux

* Fix Xcode 8 version checks in install_prereqs.sh

* Ensure that PLATFORM is in the environment.
2020-01-29 15:34:58 -08:00
Ryan Wilson be43c7c826 Create ZipBuilder CI to compile tooling (#4760)
* Create ZipBuilder CI to compile tooling

This doesn't test, but does ensure that the zip tooling actually builds.

* Style.sh

* Combine zip build and packaging.

Also upload artifacts upon successful zip completion.

* Pass in folder name to build script.

* Fix argument parsing.

* Add -x to script invocation for logging.

* Debugging script building.

* More script debugging.

* Cleanup, actually try the build.

* Temp testing for faster GA iteration.

* Revert temp testing, fix double zip naming.

* Only run package on cron jobs.
2020-01-29 16:15:42 -05:00
Morgan Chen e4eee7691e Update paths in release notes script (#4749) 2020-01-24 16:29:23 -08:00
Paul Beusterien dcf876d6a0 Delete duplicate function (#4744) 2020-01-24 11:01:29 -08:00
Gil bbc8de404c Add a benchmark for query execution (#4731)
* Use a valid project id

This avoids tripping up over newly added validation in the emulator

* Allow passing arguments to the emulator

e.g. to pass a non-default host

* Add a benchmark for reading documents

Baseline results:

Run on (12 X 2900 MHz CPU s)
CPU Caches:
  L1 Data 32K (x6)
  L1 Instruction 32K (x6)
  L2 Unified 262K (x6)
  L3 Unified 12582K (x1)
Load Average: 2.11, 1.96, 1.92
---------------------------------------------------------------------
Benchmark                           Time             CPU   Iterations
---------------------------------------------------------------------
BM_QueryMatching/0/1           168359 ns        13750 ns        53878
BM_QueryMatching/1/1           179118 ns        16706 ns        40193
BM_QueryMatching/1/10          721218 ns        35729 ns        10000
BM_QueryMatching/10/10         726533 ns        51864 ns        13587
BM_QueryMatching/1/100        5326040 ns        42820 ns         1000
BM_QueryMatching/100/100      5734101 ns       335289 ns         1000
BM_QueryMatching/1/1000      54110241 ns        41310 ns          100
BM_QueryMatching/10/1000     54584725 ns        95060 ns          100
BM_QueryMatching/100/1000    55083753 ns       527750 ns          100
BM_QueryMatching/1000/1000   58299823 ns        29130 ns          100
BM_QueryAll/1                  108892 ns        13355 ns        51197
BM_QueryAll/10                 657727 ns        43867 ns        10000
BM_QueryAll/100               5786091 ns       328244 ns         1000
BM_QueryAll/1000             60092767 ns        19380 ns          100

* Add a dedicated XCTest/Google Benchmark adapter

Remove FSTLevelDBBenchmarkTests. This benchmark appears to explore some
trade-off in document-size vs indexing but doesn't seem useful to
re-run.
2020-01-24 09:09:43 -08:00
Paul Beusterien 80d8bc0f0e GHA cron updates (#4738) 2020-01-24 08:01:15 -08:00
Paul Beusterien 6407cb03e0 Use GitHub Actions Secrets to run FirebaseStorage CI (#4726) 2020-01-22 17:57:00 -08:00
christibbs 48aa5ed5ee FIAM Consolidation (#4705)
* Move display SDK source and resources into FIAM SDK

* Change files prefixed with FID to be prefixed FIRIAM

* Restructure example apps in firebase-ios-sdk directory

* Fix directory structure for FIAM

* Move proto files into base directory

* Fix up proto files

* Move unit test files to Firebase/InAppMessaging/Tests

* Move FIRIAMSDKModeManagerTests and require app host in podspec

* Move sample apps to tests folder

* Add empty repo for FIAMDisplay that generates a warning

* Fix up functional tests app

* Fix up default UI test app

* Re-generate protos

* Add warning to remove display pod

* Remove display podspec from .travis.yml

* Remove trailing whitespace

* Fix import in test app

* Add changes to point to the default test app

* Wrap iOS version conditionals

* Add line in podspec about deprecation

* Delete whitespace in podspec

* Delete pods section in project file

* Update changelog with consolidation info

* Fix indentation in podspecs

* Fix some import issues

* Fix indent on FirebaseInAppMessaging.podspec

* Delete FirebaseInAppMessagingDisplay, update podfile for external test app

* Update podfiles, bump iOS min version to 9, remove iOS 9 checks in FIRIAMActionUrlFollowerTests

*  Add line in CHANGELOG referencing deletion of display sdk pod

* Remove unused podfile

* Update min version on Podfiles to iOS 9

* Add back FirebaseInAppMessagingDisplay.h

* Add iOS support message to CHANGELOG.md

* Wrap necessary deprecated iOS 9 call
2020-01-22 10:57:00 -05:00
Maksym Malyhin b68ad6282d if_changed.sh: add InstanceID and Installations to all dependent SDKs (#4687)
* if_changed.sh: add InstanceID and Installations to all dependent SDKs

* if_changed.sh: Remote Config podspec added

* Remove redundunt FirebaseInstallations.podspec
2020-01-15 11:33:57 -05:00
Paul Beusterien ba8ebce8cc Fix if_changed script for Crashlytics (#4663) 2020-01-13 07:15:16 -08:00
Gil a5727ac00e Cache ccache output (#4611)
This should reuse object files from unchanged sources between builds.

This brings a rebuild of the Firestore CMake build down from 20 min 37 sec,  to 9 min 13 sec:

  * Before: https://travis-ci.org/firebase/firebase-ios-sdk/jobs/635423433
  * After: https://travis-ci.org/firebase/firebase-ios-sdk/jobs/635295223

#no-changelog
2020-01-11 17:00:08 -08:00
Jason Hu 355131cc21 Enable CI for Crashlytics (#4630) 2020-01-08 16:54:11 -05:00
Ryan Wilson e6cccc3ce6 Fix vendor directory being included in style.sh (#4636) 2020-01-08 15:56:14 -05:00
Gil 5fcde3c669 Flip the default to diffing against master (#4631)
In implementing the fallback for old PRs in #4614 I changed the default
for interactive use of check.sh. This fixes it so that if you just run
check.sh with no arguments it evaluates only the diff against master.
2020-01-08 11:17:42 -08:00
Gil 91ff0c66c9 Have check.sh fallback to checking everything (#4614)
Sometimes PRs have been cut from so long ago that there's no merge base
with master in the shallow clone that Travis makes. In this case, fall
back on just checking everything.
2020-01-07 12:04:21 -08:00
Paul Beusterien da4819b46d Build zip in GHA cron (#4593) 2020-01-06 09:41:54 -08:00
Paul Beusterien fc8639f4a9 Fix cmake build regression (#4596) 2020-01-06 09:33:35 -08:00
Paul Beusterien 1367084063 FirebaseCore directory structure update (#4590) 2020-01-06 07:11:40 -08:00
Paul Beusterien efa9bd9cd4 Remove Firebase xcode project (#4588) 2020-01-03 12:19:41 -08:00
Paul Beusterien a8ec3bf7b8 Start GitHub Actions (#4431) 2020-01-03 07:56:43 -08:00
Paul Beusterien b6cd99e30a Update Firebase Storage directory structure (#4573) 2020-01-03 07:22:33 -08:00
Maksym Malyhin 942a23dc17 FirebaseInstanceID integration tests (#4560)
* InstanceID integration tests

* ./scripts/style.sh

* Travis: run install_prereqs.sh for IID

* install_prereqs.sh: run `install_secrets` for IID

* Flag to disable IID integration tests

* Travis: IID disable integration tests for forks.

* ./scripts/style.sh

* Temporary disable IID test due to b/147102327

* Travis: IID integration tests enabled for all IID builds.
2020-01-02 19:29:29 -05:00
Paul Beusterien 6aea0af5db Run QuickStart Integration Tests from CI (#4567) 2020-01-02 10:27:52 -08:00
Maksym Malyhin ef24de0877 style.sh: update clang-format formula in suggestions (#4545) 2019-12-23 11:25:41 -05:00
Maksym MalyhinandChen Liang f62c7ddcec IID: version dependent on FirebaseInstallations (#4533)
* Firebase Installations: Instance ID now uses FIS under the hood. (#3398)

* Fix merge errors

* Use modular import for FIRInstanceID_Private.h

* Use modular imports for FirebaseInstanceID.h (#3509)

* Changes missing during the fix.

* Changes missing during merge.

* Fix header import.

* ./scripts/style.sh

* Fix FCM tests. (#3888)

* Fix IID FCM token check.

* FirebaseInstallation: merge master into FIS integration branch (#4076)

* Fix IID FCM token check.

* Unused constant deleted.

* FCM tests: fix bad merge.

* Remote Config test app: use local IID and FIS. (#4089)

* token request should pass through if token is not fresh (#4104)

* Merge errors fix.

* IID with FIS: send FIS auth token with IID token request (#4152)

* FIRInstanceIDTokenOperation: add FIS auth token to the IID token request.

* IID tests: don't use FIS private headers.

* IID: indication of compatibility with FIS (#4262)

* FIS: IID incompatible version exception.

* FirebaseInstallations.podspec: set preprocessor flags based on env vars.

* FIS Travis: set required env vars

* /scripts/style.sh

* IID: method to indicate FIS usege added.

* FIS: FIRInstantiationTimingEagerInDefaultApp

* FIS: FIRInstantiationTimingAlwaysEager

* IID: make compatibility method static.

* Make -[FIRInstanceID appInstanceID:] safe to be called from any thread (#4482)

* IID: use a cached value of FID for -[FIRInstanceID appInstanceID:]

* TODO comment

* TODO updated

* FirebaseInstallations: prepare IID with FIS dependency for release (#4522)

* Bump FIrebaseInstallations to 1.0.0

* Travis: remove mm/fis-integration-master branch

* Travis: if_changed script updated to reflect IID dependency on FIS.

* Revert "Travis: remove mm/fis-integration-master branch"

This reverts commit 534dff990a.

* Travis: remove mm/fis-integration-master branch (#4526)

* Formatting and spelling.

* Firebase example proj: pod deintegrate

Co-authored-by: Chen Liang <chliang@google.com>
2019-12-20 10:54:11 -05:00
Gil 85365cb089 Get the remainder of Objective-C tests running under CMake (#4430)
* Add Objective-C API tests to the CMake build

* Fix signedness warnings under the CMake build

* Get the remainder of Objective-C tests running under CMake

Also:
  * Add a Path::HasExtension check
  * Change spec tests to pick up json without NSBundle
2019-12-06 10:11:05 -08:00
Paul Beusterien 7481e8b97f travis job consolidation for Core, GDT, and FIAM (#4385) 2019-11-22 16:57:08 -08:00
Gil d9c3e6a15f Fix the build on Windows (#4384)
* Fix errors about Abseil using std::copy

The C++11 version of this function can be unsafe if used improperly.
Defining this macro is also done in the Abseil build, though they don't
export the setting.

* Prevent output differences in generated certificate data

* Don't regenerate nanopb sources on Windows

There's something wrong with the interaction between protoc and the
nanopb generator that prevents this from working properly.
2019-11-22 16:44:57 -08:00
Gil 37c97d8f32 Fix completely out-of-source CMake builds (#4377)
Visual Studio 2017 runs creates its CMake output directory in a location
outside the git checkout, which causes the check for a current git
repository to fail.
2019-11-21 15:25:32 -08:00
Gil 0d476a399b Upgrade Firestore emulator to 1.10.2 (#4358)
This fixes several flakes in the integration tests.
2019-11-19 13:35:32 -08:00
wu-hui 2a8d069b77 Run integration tests from CMake on mac (#4276) 2019-11-19 13:40:43 -05:00
Konstantin Varlamov 57f8d7d675 Embed root certificates into the binary on Apple platforms as well (#4352)
Currently, on iOS Firestore is loading `roots.pem` file from the gRPC bundle. The mechanism has proved to be brittle, so instead we can use the same approach as the CMake build does -- parse the file at build time and embed its contents into the binary.

One downside of this approach is that now we would have to periodically update the generated files for embedding manually. Judging from history, `roots.pem` is updated quite often in gRPC repo, and can be expected to be modified on each release.

The command to regenerate the certificates is something like:
```sh
mkdir build # From the root of the repo
cd build
cmake .. && make -j 8 generate_grpc_root_certificates
```

TESTED=with Fireeats.
2019-11-19 01:50:08 -05:00
Gil 12fb9f61d2 Upgrade gRPC to 1.24.3; upgrade protobuf to 3.9.2 (#4252)
* Upgrade gRPC to 1.24.3

* Upgrade C++ Protobuf to 3.9.2

Disable -Wunreachable-code in protobuf-generated code

* Regenerate C++ protos with protobuf 3.9.2

* Generate objc protos with Protobuf 3.9.2
2019-11-07 15:23:14 -08:00
Paul Beusterien 52505143e3 Add --analyze to pod lib lint tests (#4161) 2019-11-05 17:42:04 -08:00
Maksym Malyhin af019d09fc check_whitespaces.sh: ignore notices. (#4231) 2019-11-04 16:21:46 -05:00