Skip to content

Commit

Permalink
Merge master into realtime-rc-merge and use Firebase executors. (#4473)
Browse files Browse the repository at this point in the history
* return exception if modelname is empty (#4226)

* Add "create release PR" github action (#4236)

This implementation:

- Creates the base branch (name is based in user input)
- Creates the release branch (name is based in user input)
- Creates the release.cfg file in the release branch without adding
  any SDK (module) to it.

It can create the branches based on any existing branch of the repo.

* Sync spec tests from web SDK to Android SDK (#4230)

* Update versions (#4238)

* Update versions

* Exclude .github dir from `firebaseContinuousIntegration` paths (#4239)

* Performing IN expansion (#4221)

* WIP: `in` expansion.

* Add composite filter in-expansion test.

* Fix formatting.

* Run in-expansion as part of DNF computation and add tests.

* Add test with nested IN filters with CSI.

* Add tests for other cases.

* typo fix (#4237)

* Firestore: Add test that verifies count query error message when missing index (#4232)

* refactor(functions): update firebase-iid to 21.1.0 (#4225)

* refactor(functions): update firebase-iid to 21.1.0

* Update CHANGELOG.md

* Update CHANGELOG.md

* bump firebase-iid-interop to 17.1.0

* exclude firebase-components from firebase-iid dependency

* Fix Firestore failing to return empty results from the local cache (#4207)

* Remove plexus-utils from firebase-database's test dependency (#4233)

firebase-database only uses StringUtils#repeat in test code, and it is
easy to port repeat method to test file and remove plexus-utils
from test dependency.

Signed-off-by: utzcoz <[email protected]>

Signed-off-by: utzcoz <[email protected]>

* test(functions): fix instrumentation tests (#4249)

* test(functions): fix instrumentation tests

* fix java format

* Fix flakiness in MessagingAnalyticsRoboTest.java (#4259)

Properly reset SharedPreferences test state in between each test.

* Update CHANGELOG entries across several sdks (#4240)

* Fix FAILED_PRECONDITION when writing to a deleted document in a transaction (#4257)

* Fix Javadoc link generation in Dackka (#4258)

* Remove redundant package list

* Implement fix for link transformations

* Set reference path in DackkaPlugin

* Removed accidental dackka diff script

* Remove GenericTypeIndicator in error messages (#4268)

* Early return in getDocumentsMatchingTarget (#4272)

* Early return in getDocumentsMatchingTarget

* Address Feedback

* Upgrade GRPC tp 1.50.2 (#4277)

* Upgrade GRPC tp 1.50.2

* Add changelog for Upgrade GRPC tp 1.50.2

* Add links to changelog

* Add Dackka transform to remove leading groupId in Javadocs (#4278)

* Add groupId removal transform

* Add bug link for dackka exposing the configuration

* Add @CanIgnoreReturnValue to MockInputStreamHelper.injectExceptionAt(int) (#4275)

* Remove `@Deprecated` annotations. (#4289)

* Fix FrameMetrics NPE (#4284)

* Initial version of the build release artifacts workflow. (#4287)

* Initial version of the build release artifacts workflow.

This version of the workflow hardcodes the list of sdks to release to
include Firestore only. Also, generated javadoc is not yet equivalent
to what's generated by the regular release process.

* Prepend 'releases/' to the name of the release branches (#4291)

This will make it easier to identify them and apply restrictions on them.

* Add androidx.annotation package (#4286)

* Add support of macrobenchmark result analysis in fireci (#4285)

* Fix broken code elements in docs (#4292)

* Fix code blocks

* Fix linting in firebase-database

* Fix FirebaseMLDownloader linting

* [Fireperf][AASA] Additional experiments for `_experiment_as_ttid` (#4283)

* predraw and uptimeMillis

* fix send event

* fix dangling variable and naming

* copyright

* fix test

* onStop

* test

* better readability

* comments

* reduce code

* reset

* Deflake `AppStateMonitorTest` (#4294)

* fix flaky test

* word smithing

* Add executor documentation (#4298)

* Wrap &lt and &gt symbols in code blocks (#4299)

* Add action to show a message when merging to the main branch (#4301)

* Add action to show a message when merging to the main branch

* Fail if label 'merge-main-ack' is not present

* Fix multiline hyperlink renders (#4307)

* Replace trace hyperlink with direct link

* Replace timestamp link with non multiline variant

* Add transform to rectify hyperlink bugs in see blocks

* Fix ndk build. (#4311)

* Fix ndk build.

Due to AGP upgrade the crashlytics-trampoline.so file stopped being
included in the resulting AAR, this causes issues on devices with api
29+.

* fix filename

* Revert "Add support of macrobenchmark result analysis in fireci (#4285)" (#4312)

This reverts commit 00d8c72.

* Update executors.md (#4306)

* Switch from ktlint to ktfmt (#4318)

Additionally upgrade google-java-format to latest version.

* Merge executors to master (#4322)

* Add qualifier support to firebase components. (#3180)

* Add qualifier support to firebase components.

Details: go/firebase-component-qualifiers

* fix errorprone error.

* change copyright year.

* Register executors as components. (#4288)

* Register executors as components.

The intent for those is to be used by all Firebase SDKs and forbid
creating their own at will.

* Add copyrights.

* add more copyrights

* ktlintformat

* gJF

* ktlint

* Address review comments.

* Adds generally useful executors (#4305)

Namely, SequentialExecutor and directExecutor.

* Enable strict mode for executors. (#4303)

Any violations would kill the app in debug builds of firebase-common,
and log a warning in release builds. This is done to fail tests that
incorrectly use executors while not affecting 3p apps in release builds.

Additionally correctly set thread priorities in an Android specific way.

* Enable thread pool linter check. (#4297)

* Enable thread pool linter check.

All violations are now suppressed, bugs filed to fix each product.

* ktlint

* Remove init

* Fix copyright

* Replace Doclava with Dackka (#4324)

* Remove restriction on Dackka's Javadoc

* Refactor release plugin to use dackka

* Add support of macrobenchmark result analysis in fireci (#4323)

* Avoid throwing in ForcedSender.sendBlocking (#4293)

* Make ForcedSender.sendBlocking do nothing, instead of throw, when given a wrong Transport type.

This will make it easier to mock Transport in tests. This method is best-effort anyway, so doing nothing instead of throwing is fine.

* Log warning when given wrong type.

* Fix deadlock when handling simultaneous messages. (#4327)

#4315
* Released sendWakefulServiceIntent()'s WakeLock on the main thread instead of within WithinAppServiceConnection to prevent a deadlock trying to acquire the WakeLockHolder.syncObject.

* Update build-release-artifacts.yml (#4354)

Remove unnecessary zip extension

* Improve fireci CLI for macrobenchmark (#4359)

- Output more analysis results
- Close figure after saving to file
- Switch to `redfin` for more consistent results

* Fix warnings in the linter. (#4360)

* Add action to create bom (#4352)

* Add action to create bom

* Use ubuntu-latest

* Update versions and changelogs (#4343)

* Update versions

* Update changelogs

* Update functions changelog

* Update firestore changelog

* update fireperf changelog

* update messaging changelog

* Migrate functions off of UI thread for continuations. (#4364)

* Migrate functions off of UI thread for continuations.

* fixes

* Add changelog

* fix

* fix dep

* Enable dead code elimination for vendored deps. (#4368)

* Set jvm target for kotlin to jvm11 to match java. (#4369)

* Set jvm target for kotlin to jvm11 to match java.

* Fix typo

* Changed protobuf-java to latest version 3.21.9 (#4373)

* Changed protoc and protobuf-java to latest version 3.21.9

* changed protoc version back and only target protobuf-java

* Use dagger in functions. (#4366)

This simplifies injection of firebase components so they don't have to be passed all the way from the registrar into classes that actually use components.

This change adds `+4.22 kB` to the size of the sdk, but is a small enough increase compared to the advantages it provides

* Migrate fireperf content provider to component (#4242)

* Migrate fireperf content provider to component

* Resolve comments

* Collect startup time from init provider

* Limit startup time usage to during init provider initialization

* Pass in startup time in private constructor

* Component dependencies and names

* Ensure FirebasePerfEarly gets initialized before FirebasePerf

* Actually fix merge

* Adjust tests

* Resolve cli tests

* Resolve nullability

* Actually resolving nullability lints

* Formatting

* Adjust privacy and docs

* Hide startup time in the init provider

* Fix error with getting optional component from ComponentContainer

* Fix error with getting optional component from ComponentContainer

* Hide one more method

* Migrate ml to dagger DI. (#4370)

This simplifies injection of firebase components so they don't have to be passed all the way from the registrar into classes that actually use components.

This change adds `+6.58 kB` to the size of the sdk, but is a small enough increase compared to the advantages it provides

* Add examples for new Flow operators in firestore-ktx (#4078)

* Set ndkVersion for Crashlytics NDK SDK. (#4310)

* Remove custom NDK installations (#4378)

* Add documentation, and address/remove some TODOs. (#4274)

* Fix ci tests presubmit to work on all branches. (#4381)

* Add lint check that detects UI thread continuations. (#4363)

* Add lint check that detects UI thread continuations.

* Suppress lint failures pending actual fixes by product teams.

* Fix copyrights (#4386)

* Forbid creating ui thread Handler. (#4385)

* Forbid creating ui thread Handler.

* fix perf tests

* ktfmt

* actually fix perf

* Add workflow triggers for startup time test (#4379)

* Enable for Kotlin Gradle dsl. (#4392)

* Enable for Kotlin Gradle dsl.

Additionally migrate to using a version catalog to simplify dependency
management.

* Fix metalava

* Address review comments

* Migrate RC to common executors. (#4393)

* Allow task subclasses to implement overloads. (#4394)

* Remove unused Executor classes. (#4383)

* Invoke async api for processing startup time request (#4406)

* Upgrade JaCoCo plugin version (#4423)

Fixes the issue where JaCoCo cannot produce coverage files for certain kotlin packages.

See details:
- jacoco/jacoco#1155
- https://youtrack.jetbrains.com/issue/KT-44757

* Refine startup time test app (#4407)

- Force initialize all components
- Include `fire-perf-early` in measurements
- Test only changed products in pull requests

* Initial setup for Github Pages (#4427)

* Add Component documentation (#4429)

* Add components documentation

* switch to light theme

* undo workflow change

* remove direct boot mode reference

* Create scorecards.yml

* Change concurrency group for health metrics test to "github.sha" (#4428)

The problem with "github.ref" was that when two consecutive
commits are pushed to a feature branch (e.g. `master`) around
the same time, the execution of health metrics test for the
second commit will cancel the execution for the first one, and
thus make the metrics measurement for the first commit unavailable.

* Port app.get() check from errorprone to lint (#4434)

* Port app.get() check from errorprone to lint

Motivation: Make sure the check works for kotlin, not only java.

* Add copyrights

* Added more docs (#4437)

* Describe dependencies

* deploy

* fix typo

* fixes

* updates

* toc

* fix

* updates

* configure callouts

* undo deploy from branch

* Apply suggestions from code review

Co-authored-by: Rodrigo Lazo <[email protected]>

Co-authored-by: Rodrigo Lazo <[email protected]>

* Migrate `firebase-appcheck` to use standard executors provided by Firebase Common. (#4431)

* Migrate to use standard executors provided by Firebase Common.

* Update changelog and fix unit test.

* Address review comments.

* Fix unit test.

* Address review comments.

* Fix RC Executor annotation (#4395)

* Integrate `AppCheckProvider`s with Firebase Components. (#4436)

* Integrate `SafetyNetAppCheckProvider` with Firebase Components.

* Suppress warning.

* Integrate DebugAppCheckProvider with Firebase Components.

* Add unit tests for the new registrars.

* Integrate `PlayIntegrityAppCheckProvider` with Firebase Components.

* Add dependency injection docs (#4447)

* Migrate firebase-inappmessaging SDK to go/firebase-android-executors. (#4440)

Migrate firebase-inappmessaging SDK to go/firebase-android-executors.

* Migrate remaining App Check SDKs to go/firebase-android-executors. (#4449)

* Migrate `firebase-appcheck-safetynet` to go/firebase-android-executors.

* Migrate `firebase-appcheck-playintegrity` to go/firebase-android-executors.

* Migrate `firebase-appcheck-debug` to go/firebase-android-executors.

* Remove unnecessary class field from `SafetyNetAppCheckProvider`.

* Update changelogs.

* Migrate core libraries to Gradle Kotlin DSL. (#4452)

* Migrate core libraries to Gradle Kotlin DSL.

* update

* Add functions, fix tests

* fix docs

* fix functions ktx minSdk version.

* Apply suggestions from code review

Co-authored-by: Rodrigo Lazo <[email protected]>

Co-authored-by: Rodrigo Lazo <[email protected]>

* Fix overlay bug leas to patch mutation optimization not being applied (#4442)

* Fix overlay patch bug

* Feedback

* Delete comment

* Add Diff Javadoc workflow (#4426)

* Add diff javadoc workflow

* Minor tweaks

* Revert checkout order change

* Revert incorrect changes

* Modify ChangedModulesTask

* Only compare modified SDKs

* Change build order

* Add fetch depth

* Fix typo

* Only Firebase SDKs

* Move continuations off main thread for App Check SDKs. (#4453)

* Move continuations off main thread for `firebase-appcheck`.

* One more continuation in `firebase-appcheck`.

* Move continuations off main thread for `firebase-appcheck-debug`.

* Rearrange executor order.

* Move continuations off main thread for `firebase-appcheck-safetynet`.

* Move continuations off main thread for `firebase-appcheck-playintegrity`.

* Update changelog.

* Fix `SafetyNetAppCheckProviderTest`.

* Address review comments.

* update mlkitdownloader to use executors (#4382)

* update dagger

* update

* update

* update

* update registrar

* update tests

* Replace tag targets with commits (#4460)

* Fix typo in comments. (#4462)

* Use Firebase executors for realtime.

* Format java.

Signed-off-by: utzcoz <[email protected]>
Co-authored-by: argzdev <[email protected]>
Co-authored-by: Rodrigo Lazo <[email protected]>
Co-authored-by: Mila <[email protected]>
Co-authored-by: Ehsan <[email protected]>
Co-authored-by: cherylEnkidu <[email protected]>
Co-authored-by: Denver Coneybeare <[email protected]>
Co-authored-by: Rosário Pereira Fernandes <[email protected]>
Co-authored-by: utzcoz <[email protected]>
Co-authored-by: William Xu <[email protected]>
Co-authored-by: Daymon <[email protected]>
Co-authored-by: Tom Andersen <[email protected]>
Co-authored-by: Kurt Alfred Kluever <[email protected]>
Co-authored-by: Rosalyn Tan <[email protected]>
Co-authored-by: Leo Zhan <[email protected]>
Co-authored-by: Yifan Yang <[email protected]>
Co-authored-by: Vladimir Kryachko <[email protected]>
Co-authored-by: Matthew Robertson <[email protected]>
Co-authored-by: Greg Sakakihara <[email protected]>
Co-authored-by: emilypgoogle <[email protected]>
Co-authored-by: Márton Braun <[email protected]>
Co-authored-by: Eldhose M Babu <[email protected]>
Co-authored-by: wu-hui <[email protected]>
Co-authored-by: Vinay Guthal <[email protected]>
  • Loading branch information
1 parent e40042a commit 2e94bb7
Show file tree
Hide file tree
Showing 469 changed files with 20,782 additions and 11,708 deletions.
9 changes: 0 additions & 9 deletions .github/workflows/api-information.yml
Original file line number Diff line number Diff line change
Expand Up @@ -17,15 +17,6 @@ jobs:
java-version: 11
distribution: temurin
cache: gradle
- name: Set up NDK 21.4.7075529
run: |
ANDROID_ROOT=/usr/local/lib/android
ANDROID_SDK_ROOT=${ANDROID_ROOT}/sdk
ANDROID_NDK_ROOT=${ANDROID_SDK_ROOT}/ndk-bundle
SDKMANAGER=${ANDROID_SDK_ROOT}/cmdline-tools/latest/bin/sdkmanager
echo "y" | $SDKMANAGER "ndk;21.4.7075529"
ln -sfn ${ANDROID_SDK_ROOT}/ndk/21.4.7075529 ${ANDROID_NDK_ROOT}
echo "ANDROID_NDK_HOME=${ANDROID_NDK_ROOT}" >> $GITHUB_ENV
- name: Set up Python 3.10
uses: actions/setup-python@v4
with:
Expand Down
25 changes: 25 additions & 0 deletions .github/workflows/build-release-artifacts.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,25 @@
name: Build Release Artifacts

on:
workflow_dispatch:
pull_request:
branches:
- 'releases/**'

jobs:
build-artifacts:
runs-on: ubuntu-latest
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
steps:
- uses: actions/checkout@v3

- name: Perform gradle build
run: |
./gradlew firebasePublish -PprojectsToPublish=firebase-firestore -PpublishMode=RELEASE -PincludeFireEscapeArtifacts=true
- name: Upload generated artifacts
uses: actions/upload-artifact@v2
with:
name: release_artifacts
path: build/*.zip
retention-days: 5
9 changes: 1 addition & 8 deletions .github/workflows/build-src-check.yml
Original file line number Diff line number Diff line change
Expand Up @@ -14,13 +14,6 @@ jobs:
runs-on: ubuntu-22.04
steps:
- uses: actions/[email protected]
- name: Setup NDK
run: |
ANDROID_ROOT=/usr/local/lib/android
ANDROID_SDK_ROOT=${ANDROID_ROOT}/sdk
ANDROID_NDK_ROOT=${ANDROID_SDK_ROOT}/ndk-bundle
ln -sfn $ANDROID_SDK_ROOT/ndk/21.4.7075529 $ANDROID_NDK_ROOT
- name: Set up JDK 11
uses: actions/setup-java@v2
with:
Expand All @@ -33,7 +26,7 @@ jobs:
run: |
./gradlew -b buildSrc/build.gradle.kts -PenablePluginTests=true check
- name: Publish Test Results
uses: EnricoMi/publish-unit-test-result-action@v1
uses: EnricoMi/publish-unit-test-result-action@94ba6dbddef5ec4aa827fc275cf7d563bc4d398f
with:
files: "**/build/test-results/**/*.xml"
check_name: "buildSrc Test Results"
29 changes: 0 additions & 29 deletions .github/workflows/ci_tests.yml
Original file line number Diff line number Diff line change
Expand Up @@ -4,8 +4,6 @@ concurrency:
cancel-in-progress: true
on:
pull_request:
branches:
- '*'
push:
branches:
- master
Expand All @@ -22,15 +20,6 @@ jobs:
with:
fetch-depth: 2
submodules: true
- name: Set up NDK 21.4.7075529
run: |
ANDROID_ROOT=/usr/local/lib/android
ANDROID_SDK_ROOT=${ANDROID_ROOT}/sdk
ANDROID_NDK_ROOT=${ANDROID_SDK_ROOT}/ndk-bundle
SDKMANAGER=${ANDROID_SDK_ROOT}/cmdline-tools/latest/bin/sdkmanager
echo "y" | $SDKMANAGER "ndk;21.4.7075529"
ln -sfn ${ANDROID_SDK_ROOT}/ndk/21.4.7075529 ${ANDROID_NDK_ROOT}
echo "ANDROID_NDK_HOME=${ANDROID_NDK_ROOT}" >> $GITHUB_ENV

- name: Set up JDK 11
uses: actions/setup-java@v2
Expand Down Expand Up @@ -59,15 +48,6 @@ jobs:
with:
fetch-depth: 2
submodules: true
- name: Set up NDK 21.4.7075529
run: |
ANDROID_ROOT=/usr/local/lib/android
ANDROID_SDK_ROOT=${ANDROID_ROOT}/sdk
ANDROID_NDK_ROOT=${ANDROID_SDK_ROOT}/ndk-bundle
SDKMANAGER=${ANDROID_SDK_ROOT}/cmdline-tools/latest/bin/sdkmanager
echo "y" | $SDKMANAGER "ndk;21.4.7075529"
ln -sfn ${ANDROID_SDK_ROOT}/ndk/21.4.7075529 ${ANDROID_NDK_ROOT}
echo "ANDROID_NDK_HOME=${ANDROID_NDK_ROOT}" >> $GITHUB_ENV

- name: Set up JDK 11
uses: actions/setup-java@v2
Expand Down Expand Up @@ -118,15 +98,6 @@ jobs:
with:
fetch-depth: 2
submodules: true
- name: Set up NDK 21.4.7075529
run: |
ANDROID_ROOT=/usr/local/lib/android
ANDROID_SDK_ROOT=${ANDROID_ROOT}/sdk
ANDROID_NDK_ROOT=${ANDROID_SDK_ROOT}/ndk-bundle
SDKMANAGER=${ANDROID_SDK_ROOT}/cmdline-tools/latest/bin/sdkmanager
echo "y" | $SDKMANAGER "ndk;21.4.7075529"
ln -sfn ${ANDROID_SDK_ROOT}/ndk/21.4.7075529 ${ANDROID_NDK_ROOT}
echo "ANDROID_NDK_HOME=${ANDROID_NDK_ROOT}" >> $GITHUB_ENV

- name: Set up JDK 11
uses: actions/setup-java@v2
Expand Down
1 change: 1 addition & 0 deletions .github/workflows/copyright-check.yml
Original file line number Diff line number Diff line change
Expand Up @@ -21,6 +21,7 @@ jobs:
-e py \
-e gradle \
-e java \
-e kt \
-e groovy \
-e sh \
-e proto
49 changes: 49 additions & 0 deletions .github/workflows/create_releases.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,49 @@
name: Create release

on:
workflow_dispatch:
inputs:
name:
description: 'Release name'
required: true
type: string

jobs:
create-branches:
runs-on: ubuntu-latest
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
steps:
- name: Create base branch
uses: peterjgrainger/action-create-branch@c2800a3a9edbba2218da6861fa46496cf8f3195a
with:
branch: 'releases/${{ inputs.name }}'
- name: Create release branch
uses: peterjgrainger/action-create-branch@c2800a3a9edbba2218da6861fa46496cf8f3195a
with:
branch: 'releases/${{ inputs.name }}.release'

create-pull-request:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v3

- name: Create release configuration template
run: |
git config user.name 'Create Release GA'
git config user.email '[email protected]'
echo "[release]" > release.cfg
echo "name = ${{ inputs.name }}" >> release.cfg
echo "mode = RELEASE" >> release.cfg
echo "" >> release.cfg
echo "[modules]" >> release.cfg
echo "" >> release.cfg
git add release.cfg
git commit -a -m 'Create release config'
- name: Create Pull Request
uses: peter-evans/create-pull-request@v4
with:
base: 'releases/${{ inputs.name }}'
branch: 'releases/${{ inputs.name }}.release'
title: '${{ inputs.name}} release'
67 changes: 67 additions & 0 deletions .github/workflows/diff-javadoc.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,67 @@
name: Diff Javadoc

on:
pull_request:

jobs:
build:
runs-on: ubuntu-latest
permissions:
pull-requests: write
steps:
- name: Make Dir
run: mkdir ~/diff

- uses: actions/checkout@v3
with:
fetch-depth: 2
submodules: true

- name: Set up JDK 11
uses: actions/setup-java@v2
with:
java-version: 11
distribution: temurin
cache: gradle

- name: Changed Modules
id: changed-modules
run: |
git diff --name-only HEAD~1 | xargs printf -- '--changed-git-paths %s\n' | xargs ./gradlew writeChangedProjects --output-file-path=modules.json --only-firebase-sdks
echo "run=$(cat modules.json | sed "s/[]\"[]//g" | sed "s/,/\n/g" | xargs printf -- "%s:kotlinDoc ")" >> $GITHUB_OUTPUT
- name: Build
run: ./gradlew ${{ steps.changed-modules.outputs.run }}

- name: Move original docs
run: mv build ~/diff/modified

- uses: actions/checkout@v3
with:
ref: ${{ github.base_ref }}

- name: Build
run: ./gradlew ${{ steps.changed-modules.outputs.run }}

- name: Move modified docs
run: mv build ~/diff/original

- name: Diff docs
run: >
`# Recursively diff directories, including new files, git style, with 3 lines of context`
diff -wEburN ~/diff/original ~/diff/modified
`# Remove the first line and new file signifier of the output`
| tail -n +2
`# Replace the diff new file signifier with the end and start of a new codeblock`
| sed "s/^diff.*$/\`\`\`\\n\`\`\`diff/g"
`# Add a collapsable block, summary, and start the first code block on the first line`
| sed "1s/^/<details>\\n<summary>Javadoc Changes:<\/summary>\\n\\n\`\`\`diff\\n/"
`# Close the final code block and close the collapsable on the final line`
| sed "$ s/$/\\n\`\`\`\\n<\/details>/"
`# Write to diff.md for later`
> diff.md
- name: Add comment
uses: mshick/add-pr-comment@a65df5f64fc741e91c59b8359a4bc56e57aaf5b1
with:
message-path: diff.md
4 changes: 3 additions & 1 deletion .github/workflows/fireci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -18,8 +18,10 @@ jobs:
- uses: actions/[email protected]
- uses: actions/setup-python@v2
with:
python-version: '3.9'
python-version: '3.8'
- run: |
pip install -e "ci/fireci[test]"
- run: |
pytest ci/fireci
- run: |
mypy --config-file ci/fireci/setup.cfg ci/fireci/
9 changes: 0 additions & 9 deletions .github/workflows/fireperf-e2e.yml
Original file line number Diff line number Diff line change
Expand Up @@ -33,15 +33,6 @@ jobs:
java-version: 11
distribution: temurin
cache: gradle
- name: Set up NDK 21.4.7075529
run: |
ANDROID_ROOT=/usr/local/lib/android
ANDROID_SDK_ROOT=${ANDROID_ROOT}/sdk
ANDROID_NDK_ROOT=${ANDROID_SDK_ROOT}/ndk-bundle
SDKMANAGER=${ANDROID_SDK_ROOT}/cmdline-tools/latest/bin/sdkmanager
echo "y" | $SDKMANAGER "ndk;21.4.7075529"
ln -sfn ${ANDROID_SDK_ROOT}/ndk/21.4.7075529 ${ANDROID_NDK_ROOT}
echo "ANDROID_NDK_HOME=${ANDROID_NDK_ROOT}" >> $GITHUB_ENV
- name: Set up Python 3.10
uses: actions/setup-python@v4
with:
Expand Down
86 changes: 65 additions & 21 deletions .github/workflows/health-metrics.yml
Original file line number Diff line number Diff line change
@@ -1,14 +1,27 @@
name: Health Metrics

on: [ pull_request, push ]
concurrency:
group: ${{ github.workflow }}-${{ github.event.pull_request.number || github.sha }}
cancel-in-progress: true

on:
pull_request:
push:
branches:
- master
# add other feature branches here
# TODO(yifany): support workflow_dispatch for metric tests (or only for startup time test)

env:
GITHUB_PULL_REQUEST_NUMBER: ${{ github.event.pull_request.number }}

jobs:
coverage:
name: Coverage
if: (github.repository == 'Firebase/firebase-android-sdk' && github.event_name == 'push') || (github.event_name == 'pull_request' && github.event.pull_request.head.repo.full_name == github.repository)
if: |
(github.event_name == 'push' && github.repository == 'firebase/firebase-android-sdk')
|| (github.event_name == 'pull_request'
&& github.event.pull_request.head.repo.full_name == github.repository)
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v3
Expand All @@ -21,15 +34,6 @@ jobs:
java-version: 11
distribution: temurin
cache: gradle
- name: Set up NDK 21.4.7075529
run: |
ANDROID_ROOT=/usr/local/lib/android
ANDROID_SDK_ROOT=${ANDROID_ROOT}/sdk
ANDROID_NDK_ROOT=${ANDROID_SDK_ROOT}/ndk-bundle
SDKMANAGER=${ANDROID_SDK_ROOT}/cmdline-tools/latest/bin/sdkmanager
echo "y" | $SDKMANAGER "ndk;21.4.7075529"
ln -sfn ${ANDROID_SDK_ROOT}/ndk/21.4.7075529 ${ANDROID_NDK_ROOT}
echo "ANDROID_NDK_HOME=${ANDROID_NDK_ROOT}" >> $GITHUB_ENV
- name: Set up Python 3.10
uses: actions/setup-python@v4
with:
Expand All @@ -49,7 +53,10 @@ jobs:

size:
name: Size
if: (github.repository == 'Firebase/firebase-android-sdk' && github.event_name == 'push') || (github.event_name == 'pull_request' && github.event.pull_request.head.repo.full_name == github.repository)
if: |
(github.event_name == 'push' && github.repository == 'firebase/firebase-android-sdk')
|| (github.event_name == 'pull_request'
&& github.event.pull_request.head.repo.full_name == github.repository)
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v3
Expand All @@ -62,15 +69,6 @@ jobs:
java-version: 11
distribution: temurin
cache: gradle
- name: Set up NDK 21.4.7075529
run: |
ANDROID_ROOT=/usr/local/lib/android
ANDROID_SDK_ROOT=${ANDROID_ROOT}/sdk
ANDROID_NDK_ROOT=${ANDROID_SDK_ROOT}/ndk-bundle
SDKMANAGER=${ANDROID_SDK_ROOT}/cmdline-tools/latest/bin/sdkmanager
echo "y" | $SDKMANAGER "ndk;21.4.7075529"
ln -sfn ${ANDROID_SDK_ROOT}/ndk/21.4.7075529 ${ANDROID_NDK_ROOT}
echo "ANDROID_NDK_HOME=${ANDROID_NDK_ROOT}" >> $GITHUB_ENV
- name: Set up Python 3.10
uses: actions/setup-python@v4
with:
Expand All @@ -87,3 +85,49 @@ jobs:
- name: Run size tests (post-submit)
if: ${{ github.event_name == 'push' }}
run: fireci binary_size

startup_time:
name: Startup Time
if: |
(github.event_name == 'push' && github.repository == 'firebase/firebase-android-sdk')
|| (github.event_name == 'pull_request'
&& github.event.pull_request.head.repo.full_name == github.repository)
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v3
with:
fetch-depth: 2
submodules: true
- name: Set up JDK 11
uses: actions/setup-java@v2
with:
java-version: 11
distribution: temurin
cache: gradle
- name: Set up Python 3.10
uses: actions/setup-python@v4
with:
python-version: '3.10'
- uses: google-github-actions/auth@v0
with:
credentials_json: '${{ secrets.GCP_SERVICE_ACCOUNT }}'
- uses: google-github-actions/setup-gcloud@v0
- name: Set up fireci
run: pip3 install -e ci/fireci
- name: Add google-services.json
env:
INTEG_TESTS_GOOGLE_SERVICES: ${{ secrets.INTEG_TESTS_GOOGLE_SERVICES }}
BENCHMARK_APP_LOCATION: health-metrics/benchmark/template/app/google-services.json
run: |
echo $INTEG_TESTS_GOOGLE_SERVICES | base64 -d > $BENCHMARK_APP_LOCATION
- name: Run startup-time tests (presubmit)
if: ${{ github.event_name == 'pull_request' }}
run: |
git diff --name-only HEAD~1 | \
xargs printf -- '--changed-git-paths %s\n' | \
xargs ./gradlew writeChangedProjects --output-file-path=modules.json
fireci macrobenchmark ci --pull-request --changed-modules-file modules.json
- name: Run startup-time tests (post-submit)
if: ${{ github.event_name == 'push' }}
run: |
fireci macrobenchmark ci --push
Loading

0 comments on commit 2e94bb7

Please sign in to comment.