Skip to content

Merge updates from main branch into admob_2021 feature branch #743

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 48 commits into from
Nov 17, 2021
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
48 commits
Select commit Hold shift + click to select a range
c85d0ed
operator== and operator!= for DocumentChange (#607)
ehsannas Aug 24, 2021
de035e1
Add private function that returns a query's hash code. (#613)
ehsannas Aug 24, 2021
48103b1
Replace HARD_ASSERT with SIMPLE_HARD_ASSERT to fix iOS absl linker er…
dconeybe Aug 24, 2021
cebf363
Update android and ios versions for M102 (#617)
a-maurice Aug 24, 2021
6d3ec1d
Replace ThrowInvalidArgument with SimpleThrowInvalidArgument to fix i…
dconeybe Aug 25, 2021
7616961
Private function to get `Hash()` for QuerySnapshot, DocumentSnapshot,…
ehsannas Aug 26, 2021
2c5d663
Fix: Moving a local object in a return statement prevents copy elisio…
ehsannas Aug 26, 2021
3c21909
Add placeholder workflow for updating dependencies. (#628)
jonsimantov Sep 8, 2021
0fa1bd7
Add workflow to automatically update iOS and Android dependencies. (#…
jonsimantov Sep 10, 2021
ecbf96d
Add some licenses to `NOTICES` (#654)
var-const Sep 14, 2021
ba12775
Fix log file for when both Android and iOS are present. (#656)
jonsimantov Sep 14, 2021
26f8b4a
Update mobile dependencies - Tue Sep 14 2021 (#659)
firebase-workflow-trigger[bot] Sep 14, 2021
b17f8a3
8.5.0 version json file update and release notes. (#660)
DellaBitta Sep 14, 2021
a1b972f
Add a comment field, for when update-dependencies is triggered by oth…
jonsimantov Sep 15, 2021
2008044
Fix the logic to generate .pro file (#664)
cynthiajoan Sep 15, 2021
708ec9c
Add presubmit trigger with ccache in linux firestore (#626)
sunmou99 Sep 16, 2021
a8931f2
de-flake test on Android devices (#666)
sunmou99 Sep 17, 2021
521a5b4
Fix integration test check step variable values
sunmou99 Sep 17, 2021
520af2c
Change the way to achieve token while init the app (#667)
cynthiajoan Sep 17, 2021
84c4e2a
Do not hard code project id in expected error message (#675)
wu-hui Sep 23, 2021
196188e
ARM Mac open-source and packaged build (#677)
jonsimantov Sep 24, 2021
6b465d7
move pull request template (#683)
DellaBitta Sep 28, 2021
9e702bf
Fix bug in dependency update workflow. (#685)
jonsimantov Sep 29, 2021
bffc11a
Update version number for next release to 8.6.0. (#694)
jonsimantov Sep 29, 2021
32a1143
Update iOS dependencies - Wed Sep 29 2021 (#691)
firebase-workflow-trigger[bot] Sep 29, 2021
d483884
Remove sanity check from integration test workflow
sunmou99 Sep 29, 2021
0631f33
Run linux integration test in desktop workflow
sunmou99 Sep 30, 2021
ef28f10
Fix crash caused by ResponseJson::MarkCompleted() failing to set appl…
dconeybe Sep 30, 2021
40e407b
Update Android dependencies - Mon Oct 04 2021 (#699)
firebase-workflow-trigger[bot] Oct 5, 2021
e961980
Change Git tag of googletest to the 1.11.0 release. (#676)
jonsimantov Oct 6, 2021
ae8c32e
Make pod header public so unity can build (#701)
cynthiajoan Oct 6, 2021
f82c423
Update README to suggest Python3 versions (#702)
crwilcox Oct 18, 2021
3990d4c
Quick check uses dummy google-services file, and skip certain tests (…
sunmou99 Oct 25, 2021
0201e94
Fix database double type precision bug (#709)
cynthiajoan Oct 27, 2021
4f1d245
Update iOS dependencies - Fri Oct 29 2021 (#714)
firebase-workflow-trigger[bot] Nov 1, 2021
58dbf86
When downloading external projects, provide GitHub token if available…
jonsimantov Nov 1, 2021
dbb5e4d
Analytics tvOS support. (#715)
jonsimantov Nov 1, 2021
1d164a0
Update Android dependencies - Mon Nov 01 2021 (#718)
firebase-workflow-trigger[bot] Nov 2, 2021
f91a9ff
Update C++ SDK version to 8.7.0. (#719)
jonsimantov Nov 2, 2021
faa7ef7
Add 8.7.0 release notes entries for Firestore (#720)
dconeybe Nov 2, 2021
e6d77d9
Fix script to use Firebase/ subspecs. (#725)
jonsimantov Nov 2, 2021
b6c496b
Update iOS dependencies - Tue Nov 02 2021 (#726)
firebase-workflow-trigger[bot] Nov 2, 2021
49e9ede
Add GitHub token to Cocoapods Github URL to avoid throttling. (#727)
jonsimantov Nov 3, 2021
91288c8
Update the 8.7.0 release notes entry announcing Firestore's GA (#732)
dconeybe Nov 3, 2021
b7ca2e2
Override ResponseJson::MarkFailed to set application_data_. (#738)
jonsimantov Nov 5, 2021
e4d43e5
Fix crash in Messaging on Android when Terminate is called while task…
TBarendt Nov 8, 2021
ae8a3f2
Fix app build for Android against prebuilt version (#736)
borissoft Nov 8, 2021
2e4d2c8
Merge branch 'main' into feature/admob_2021
jonsimantov Nov 10, 2021
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
8 changes: 8 additions & 0 deletions .github/workflows/android.yml
Original file line number Diff line number Diff line change
Expand Up @@ -12,6 +12,7 @@ on:

env:
CCACHE_DIR: ${{ github.workspace }}/ccache_dir
GITHUB_TOKEN: ${{ github.token }}

jobs:
prepare_matrix:
Expand Down Expand Up @@ -45,6 +46,13 @@ jobs:
architecture: ${{ fromJson(needs.prepare_matrix.outputs.matrix_architecture) }}
python_version: ${{ fromJson(needs.prepare_matrix.outputs.matrix_python_version) }}
steps:
- name: Store git credentials for all git commands
# Forces all git commands to use authenticated https, to prevent throttling.
shell: bash
run: |
git config --global credential.helper 'store --file /tmp/git-credentials'
echo 'https://${{ github.token }}@github.com' > /tmp/git-credentials

- name: Check expanded matrix config
if: github.event.inputs.expanded_matrix == '1'
run: |
Expand Down
99 changes: 82 additions & 17 deletions .github/workflows/cpp-packaging.yml
Original file line number Diff line number Diff line change
Expand Up @@ -32,9 +32,12 @@ env:
demumbleVer: "1.1.0"
# Use SHA256 for hashing files.
hashCommand: "sha256sum"
# Xcode version 12 is the version we build the SDK with.
# Xcode version 12.2 is the version we build the SDK with.
# Our MacOS runners will use the version in /Applications/Xcode_${xcodeVersion}.app
xcodeVersion: "12"
xcodeVersion: "12.2"
# LLVM version with ARM MachO support has no version number yet.
llvmVer: "5f187f0afaad33013ba03454c4749d99b1362534"
GITHUB_TOKEN: ${{ github.token }}

jobs:
log_inputs:
Expand Down Expand Up @@ -91,7 +94,7 @@ jobs:
if: runner.os == 'macOS'
run: sudo xcode-select -s /Applications/Xcode_${{ env.xcodeVersion }}.app/Contents/Developer

- name: fetch and build binutils
- name: Fetch and build binutils
run: |
set +e
# Retry up to 10 times because Curl has a tendency to timeout on
Expand All @@ -105,13 +108,46 @@ jobs:

tar -xf binutils.tar.xz
mv ./binutils-${{ matrix.binutils_version }} ./binutils-src
mkdir /tmp/binutils-output
cd binutils-src
./configure --enable-targets=all --prefix=/tmp/binutils
make
./configure --enable-targets=all --prefix=/tmp/binutils-output
make -j2
make install
cd -
mkdir -p packaging-tools
cp -af /tmp/binutils/bin/* packaging-tools
cp -af /tmp/binutils-output/bin/* packaging-tools

- name: Cache LLVM (Mac only)
if: matrix.tools_platform == 'darwin'
id: cache_llvm
uses: actions/cache@v2
with:
path: llvm-src/llvm/build/bin
key: llvm-bin-${{matrix.tools_platform}}-${{env.xcodeVersion}}-${{env.llvmVer}}

- name: Fetch LLVM source (Mac only)
# Only fetch LLVM if we don't already have binaries from the cache.
if: ${{ matrix.tools_platform == 'darwin' && !steps.cache_llvm.outputs.cache-hit }}
uses: actions/[email protected]
with:
repository: llvm/llvm-project
path: llvm-src
ref: ${{ env.llvmVer }}

- name: Build LLVM (Mac only)
# Only build LLVM if we don't already have binaries from the cache.
if: ${{ matrix.tools_platform == 'darwin' && !steps.cache_llvm.outputs.cache-hit }}
run: |
mkdir llvm-src/llvm/build
cd llvm-src/llvm/build
cmake -DLLVM_ENABLE_PROJECTS=clang -DCMAKE_BUILD_TYPE=Release ..
cmake --build . -j 3 --target llvm-objcopy --target llvm-nm --target llvm-ar

- name: Package LLVM output (Mac only)
if: matrix.tools_platform == 'darwin'
run: |
mkdir -p packaging-tools
cp -af llvm-src/llvm/build/bin/* packaging-tools

- name: fetch demumble
uses: actions/[email protected]
Expand All @@ -127,7 +163,7 @@ jobs:
cmake --build .
python demumble_test.py
cd -
mkdir -p packaging-tools-
mkdir -p packaging-tools
cp -af demumble-src/demumble packaging-tools

- name: archive tools
Expand All @@ -147,6 +183,13 @@ jobs:
runs-on: macos-latest
if: ${{ github.event.inputs.downloadPublicVersion == '' && github.event.inputs.downloadPreviousRun == '' }}
steps:
- name: Store git credentials for all git commands
# Forces all git commands to use authenticated https, to prevent throttling.
shell: bash
run: |
git config --global credential.helper 'store --file /tmp/git-credentials'
echo 'https://${{ github.token }}@github.com' > /tmp/git-credentials

- name: setup Xcode version (macos)
if: runner.os == 'macOS'
run: sudo xcode-select -s /Applications/Xcode_${{ env.xcodeVersion }}.app/Contents/Developer
Expand Down Expand Up @@ -207,6 +250,13 @@ jobs:
with:
path: sdk-src

- name: Store git credentials for all git commands
# Forces all git commands to use authenticated https, to prevent throttling.
shell: bash
run: |
git config --global credential.helper 'store --file /tmp/git-credentials'
echo 'https://${{ github.token }}@github.com' > /tmp/git-credentials

- name: Cache NDK
id: cache_ndk
uses: actions/cache@v2
Expand Down Expand Up @@ -254,7 +304,7 @@ jobs:
matrix:
os: [windows-latest, ubuntu-latest, macos-latest]
build_type: ["Release", "Debug"]
architecture: ["x64", "x86"]
architecture: ["x64", "x86", "arm64"]
msvc_runtime: ["static", "dynamic"]
linux_abi: ["legacy", "c++11"]
python_version: [3.7]
Expand Down Expand Up @@ -292,8 +342,19 @@ jobs:
msvc_runtime: "dynamic"
- os: ubuntu-latest
build_type: "Debug"
- os: ubuntu-latest
architecture: "arm64"
- os: windows-latest
architecture: "arm64"

steps:
- name: Store git credentials for all git commands
# Forces all git commands to use authenticated https, to prevent throttling.
shell: bash
run: |
git config --global credential.helper 'store --file /tmp/git-credentials'
echo 'https://${{ github.token }}@github.com' > /tmp/git-credentials

- name: setup Xcode version (macos)
if: runner.os == 'macOS'
run: sudo xcode-select -s /Applications/Xcode_${{ env.xcodeVersion }}.app/Contents/Developer
Expand All @@ -308,6 +369,10 @@ jobs:
echo "VCPKG_RESPONSE_FILE=external/vcpkg_${{ matrix.vcpkg_triplet }}_response_file.txt" >> $GITHUB_ENV
echo "MATRIX_UNIQUE_NAME=${{ matrix.os }}-${{ matrix.build_type }}-${{ matrix.architecture }}-${{ matrix.python_version }}-${{ matrix.msvc_runtime }}-${{ matrix.linux_abi }}" >> $GITHUB_ENV
echo "SDK_NAME=${{ matrix.sdk_platform }}-${{ matrix.architecture }}-${{ matrix.build_type }}-${{ matrix.msvc_runtime }}-${{ matrix.linux_abi }}" >> $GITHUB_ENV
if [[ '${{ matrix.sdk_platform }}' == 'darwin' ]]; then
# If Mac, also hash vcpkg cache on Xcode version.
echo "VCPKG_EXTRA_HASH=-xcode${{env.xcodeVersion}}" >> $GITHUB_ENV
fi

- name: Add msbuild to PATH (windows)
if: startsWith(matrix.os, 'windows')
Expand All @@ -318,7 +383,7 @@ jobs:
uses: actions/cache@v2
with:
path: external/vcpkg/installed
key: dev-vcpkg-${{ matrix.architecture }}-${{ matrix.vcpkg_triplet_suffix }}-${{ matrix.msvc_runtime }}-${{ matrix.linux_abi }}-${{ hashFiles(format('{0}', env.VCPKG_RESPONSE_FILE)) }}-${{ hashFiles('.git/modules/external/vcpkg/HEAD') }}
key: dev-vcpkg-${{ matrix.architecture }}-${{ matrix.vcpkg_triplet_suffix }}-${{ matrix.msvc_runtime }}-${{ matrix.linux_abi }}-${{ hashFiles(format('{0}', env.VCPKG_RESPONSE_FILE)) }}-${{ hashFiles('.git/modules/external/vcpkg/HEAD') }}${{env.VCPKG_EXTRA_HASH}}

- name: Cache ccache files
if: startsWith(matrix.os, 'ubuntu') || startsWith(matrix.os, 'macos')
Expand Down Expand Up @@ -503,15 +568,15 @@ jobs:
variant=$(sdk-src/build_scripts/desktop/get_variant.sh "${pkg}")
additional_flags=(${verbose_flag})
# Several build targets require explicitly-set binutils format to be passed
# to package.sh (and thus, to merge_libraries).
if [[ "${{ matrix.sdk_platform }}" == "darwin" && "${variant}" == "arm64" ]]; then
# MacOS ARM
additional_flags+=(-f mach-o-arm64)
# to package.sh (and thus, to merge_libraries), or use LLVM binutils.
if [[ "${{ matrix.sdk_platform }}" == "darwin" ]]; then
# MacOS: use LLVM binutils for both X64 and ARM64
additional_flags+=(-L)
elif [[ "${{ matrix.sdk_platform }}" == "windows" && "${variant}" == *"/x64/"* ]]; then
# Windows x64
# Windows x64: force input and output target format
additional_flags+=(-f pe-x86-64,pe-bigobj-x86-64)
elif [[ "${{ matrix.sdk_platform }}" == "windows" && "${variant}" == *"/x86/"* ]]; then
# Windows x86
# Windows x86: force input and output target format
additional_flags+=(-f pe-i386,pe-bigobj-i386)
fi
sdk-src/build_scripts/desktop/package.sh -b ${pkg} -o firebase-cpp-sdk-${{ matrix.sdk_platform }}${{ matrix.suffix }}-package -p ${{ matrix.sdk_platform }} -t bin -d ${variant} -P python3 -j ${additional_flags[*]}
Expand Down Expand Up @@ -721,8 +786,8 @@ jobs:
USE_EXPANDED_MATRIX=0
fi
if [[ "${{ github.event_name }}" == "schedule" ]]; then
# reuse flag --test_pull_request=sdk to generate report
generate_report=(-p test_pull_request sdk)
# reuse flag --test_pull_request=nightly-packaging to generate report
generate_report=(-p test_pull_request nightly-packaging)
fi
verbose_flag=
if [[ -n "${{ github.event.inputs.verboseBuild }}" && "${{ github.event.inputs.verboseBuild }}" -ne 0 ]]; then
Expand Down
107 changes: 104 additions & 3 deletions .github/workflows/desktop.yml
Original file line number Diff line number Diff line change
Expand Up @@ -12,6 +12,7 @@ on:

env:
CCACHE_DIR: ${{ github.workspace }}/ccache_dir
GITHUB_TOKEN: ${{ github.token }}

jobs:
prepare_matrix:
Expand Down Expand Up @@ -76,7 +77,22 @@ jobs:
xcode_version: "12.4"
- os: windows-latest
xcode_version: "12.4"
# arm64 is only for macos
- os: ubuntu-latest
architecture: "arm64"
- os: windows-latest
architecture: "arm64"
# arm64 can't be built on Xcode 11
- xcode_version: "11.7"
architecture: "arm64"
steps:
- name: Store git credentials for all git commands
# Forces all git commands to use authenticated https, to prevent throttling.
shell: bash
run: |
git config --global credential.helper 'store --file /tmp/git-credentials'
echo 'https://${{ github.token }}@github.com' > /tmp/git-credentials

- name: Setup Xcode version (macos)
if: runner.os == 'macOS'
run: sudo xcode-select -s /Applications/Xcode_${{ matrix.xcode_version }}.app/Contents/Developer
Expand Down Expand Up @@ -114,21 +130,25 @@ jobs:
echo "VCPKG_SUFFIX: ${{env.VCPKG_SUFFIX}}"
echo "VCPKG_RESPONSE_FILE=external/vcpkg_custom_data/response_files/${{ matrix.architecture }}-${{ env.VCPKG_SUFFIX }}.txt" >> $GITHUB_ENV
echo "MATRIX_UNIQUE_NAME=${{ matrix.os }}-${{ matrix.build_type }}-${{ matrix.architecture }}-${{ matrix.msvc_runtime }}" >> $GITHUB_ENV
if [[ '${{ matrix.sdk_platform }}' == 'darwin' ]]; then
# If Mac, also hash vcpkg cache on Xcode version.
echo "VCPKG_EXTRA_HASH=-xcode${{matrix.xcode_version}}" >> $GITHUB_ENV
fi

- name: Cache vcpkg C++ dependencies
id: cache_vcpkg
uses: actions/cache@v2
with:
path: external/vcpkg/installed
key: dev-vcpkg-${{ matrix.architecture }}-${{ env.VCPKG_SUFFIX }}-${{ matrix.msvc_runtime }}-${{ hashFiles(format('{0}', env.VCPKG_RESPONSE_FILE)) }}-${{ hashFiles('.git/modules/external/vcpkg/HEAD') }}
key: dev-vcpkg-${{ matrix.architecture }}-${{ env.VCPKG_SUFFIX }}-${{ matrix.msvc_runtime }}-${{ hashFiles(format('{0}', env.VCPKG_RESPONSE_FILE)) }}-${{ hashFiles('.git/modules/external/vcpkg/HEAD') }}${{ env.VCPKG_EXTRA_HASH }}

- name: Cache ccache files
if: startsWith(matrix.os, 'ubuntu') || startsWith(matrix.os, 'macos')
id: cache_ccache
uses: actions/cache@v2
with:
path: ccache_dir
key: dev-test-ccache-${{ env.MATRIX_UNIQUE_NAME }}
key: dev-test-ccache-${{ env.MATRIX_UNIQUE_NAME }}${{ env.VCPKG_EXTRA_HASH }}

- name: Setup python
uses: actions/setup-python@v2
Expand Down Expand Up @@ -193,7 +213,7 @@ jobs:

- name: Run unit tests (windows & macos)
# TODO: Enable tests for x86 once they are all working
if: (startsWith(matrix.os, 'windows') || startsWith(matrix.os, 'macos')) && matrix.architecture != 'x86'
if: (startsWith(matrix.os, 'windows') || startsWith(matrix.os, 'macos')) && matrix.architecture != 'x86' && matrix.architecture != 'arm64'
env:
LANG: en_US
run: |
Expand Down Expand Up @@ -262,3 +282,84 @@ jobs:
path: |
~/Library/Logs/DiagnosticReports/*
/tmp/bins/*

local_integration_tests:
### This job run firestore integration test on Linux Dekstop as required by firestore team.
### It's possible to add more apps here once integration tests are less flaky.
name: local-integration-tests-linux-openssl
needs: prepare_matrix
runs-on: ubuntu-latest
strategy:
fail-fast: false
steps:
- uses: actions/checkout@v2
with:
ref: ${{needs.check_and_prepare.outputs.github_ref}}
submodules: true
- name: Set env vars
run: |
echo "VCPKG_TRIPLET=x64-linux" >> $GITHUB_ENV
echo "VCPKG_RESPONSE_FILE=external/vcpkg_${{ env.VCPKG_TRIPLET }}_response_file.txt" >> $GITHUB_ENV
- name: Cache vcpkg C++ dependencies
id: cache_vcpkg
uses: actions/cache@v2
with:
path: external/vcpkg/installed
key: dev-vcpkg-${{ env.VCPKG_TRIPLET }}-${{ hashFiles(format('{0}', env.VCPKG_RESPONSE_FILE)) }}-${{ hashFiles('.git/modules/external/vcpkg/HEAD') }}
- name: Cache ccache files
uses: actions/cache@v2
with:
path: ccache_dir
key: local-integration-tests-linux-openssl-ccache
- name: Setup python
uses: actions/setup-python@v2
with:
python-version: ${{ fromJson(needs.prepare_matrix.outputs.matrix_python_version)[0] }}
- name: Prepare for integration tests
run: |
pip install -r scripts/gha/requirements.txt
- name: Install OpenSSL
run: |
sudo apt install openssl
- name: Build integration tests
shell: bash
env:
CCACHE_DIR: ${{ github.workspace }}/ccache_dir
run: |
apis=$( python scripts/gha/print_matrix_configuration.py -c -w integration_tests -k apis -m=1 )
python scripts/gha/build_testapps.py --p Desktop \
--t ${apis} \
--output_directory "${{ github.workspace }}" \
--artifact_name "desktop-ubuntu-latest-openssl" \
--noadd_timestamp \
--short_output_paths \
--cmake_flag=-DFIREBASE_QUICK_TEST=ON
- name: Summarize build results
if: ${{ !cancelled() }}
shell: bash
run: |
cat build-results-desktop-ubuntu-latest-openssl.log
if [[ "${{ job.status }}" != "success" ]]; then
exit 1
fi
- name: Set up Node (12)
uses: actions/setup-node@v2
with:
node-version: 12.x
- name: Setup Firestore Emulator
run: |
npm install -g firebase-tools
- name: Run Desktop integration tests
run: |
cp scripts/gha/integration_testing/google-services.json testapps-desktop-ubuntu-latest-openssl/firestore/google-services.json
firebase emulators:exec --only firestore --project demo-example 'python scripts/gha/desktop_tester.py --testapp_dir testapps-desktop-ubuntu-latest-openssl --logfile_name "desktop-ubuntu-latest-openssl"'
env:
USE_FIRESTORE_EMULATOR: true
- name: Summarize test results
if: ${{ !cancelled() }}
shell: bash
run: |
cat testapps-desktop-ubuntu-latest-openssl/test-results-desktop-ubuntu-latest-openssl.log
if [[ "${{ job.status }}" != "success" ]]; then
exit 1
fi
Loading