Skip to content

Commit 2e94bb7

Browse files
danasilverargzdevrlazomilaGGLehsannas
authored
Merge master into realtime-rc-merge and use Firebase executors. (#4473)
* 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]>
1 parent e40042a commit 2e94bb7

File tree

469 files changed

+20782
-11708
lines changed

Some content is hidden

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

469 files changed

+20782
-11708
lines changed

.github/workflows/api-information.yml

Lines changed: 0 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -17,15 +17,6 @@ jobs:
1717
java-version: 11
1818
distribution: temurin
1919
cache: gradle
20-
- name: Set up NDK 21.4.7075529
21-
run: |
22-
ANDROID_ROOT=/usr/local/lib/android
23-
ANDROID_SDK_ROOT=${ANDROID_ROOT}/sdk
24-
ANDROID_NDK_ROOT=${ANDROID_SDK_ROOT}/ndk-bundle
25-
SDKMANAGER=${ANDROID_SDK_ROOT}/cmdline-tools/latest/bin/sdkmanager
26-
echo "y" | $SDKMANAGER "ndk;21.4.7075529"
27-
ln -sfn ${ANDROID_SDK_ROOT}/ndk/21.4.7075529 ${ANDROID_NDK_ROOT}
28-
echo "ANDROID_NDK_HOME=${ANDROID_NDK_ROOT}" >> $GITHUB_ENV
2920
- name: Set up Python 3.10
3021
uses: actions/setup-python@v4
3122
with:
Lines changed: 25 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,25 @@
1+
name: Build Release Artifacts
2+
3+
on:
4+
workflow_dispatch:
5+
pull_request:
6+
branches:
7+
- 'releases/**'
8+
9+
jobs:
10+
build-artifacts:
11+
runs-on: ubuntu-latest
12+
env:
13+
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
14+
steps:
15+
- uses: actions/checkout@v3
16+
17+
- name: Perform gradle build
18+
run: |
19+
./gradlew firebasePublish -PprojectsToPublish=firebase-firestore -PpublishMode=RELEASE -PincludeFireEscapeArtifacts=true
20+
- name: Upload generated artifacts
21+
uses: actions/upload-artifact@v2
22+
with:
23+
name: release_artifacts
24+
path: build/*.zip
25+
retention-days: 5

.github/workflows/build-src-check.yml

Lines changed: 1 addition & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -14,13 +14,6 @@ jobs:
1414
runs-on: ubuntu-22.04
1515
steps:
1616
- uses: actions/[email protected]
17-
- name: Setup NDK
18-
run: |
19-
ANDROID_ROOT=/usr/local/lib/android
20-
ANDROID_SDK_ROOT=${ANDROID_ROOT}/sdk
21-
ANDROID_NDK_ROOT=${ANDROID_SDK_ROOT}/ndk-bundle
22-
ln -sfn $ANDROID_SDK_ROOT/ndk/21.4.7075529 $ANDROID_NDK_ROOT
23-
2417
- name: Set up JDK 11
2518
uses: actions/setup-java@v2
2619
with:
@@ -33,7 +26,7 @@ jobs:
3326
run: |
3427
./gradlew -b buildSrc/build.gradle.kts -PenablePluginTests=true check
3528
- name: Publish Test Results
36-
uses: EnricoMi/publish-unit-test-result-action@v1
29+
uses: EnricoMi/publish-unit-test-result-action@94ba6dbddef5ec4aa827fc275cf7d563bc4d398f
3730
with:
3831
files: "**/build/test-results/**/*.xml"
3932
check_name: "buildSrc Test Results"

.github/workflows/ci_tests.yml

Lines changed: 0 additions & 29 deletions
Original file line numberDiff line numberDiff line change
@@ -4,8 +4,6 @@ concurrency:
44
cancel-in-progress: true
55
on:
66
pull_request:
7-
branches:
8-
- '*'
97
push:
108
branches:
119
- master
@@ -22,15 +20,6 @@ jobs:
2220
with:
2321
fetch-depth: 2
2422
submodules: true
25-
- name: Set up NDK 21.4.7075529
26-
run: |
27-
ANDROID_ROOT=/usr/local/lib/android
28-
ANDROID_SDK_ROOT=${ANDROID_ROOT}/sdk
29-
ANDROID_NDK_ROOT=${ANDROID_SDK_ROOT}/ndk-bundle
30-
SDKMANAGER=${ANDROID_SDK_ROOT}/cmdline-tools/latest/bin/sdkmanager
31-
echo "y" | $SDKMANAGER "ndk;21.4.7075529"
32-
ln -sfn ${ANDROID_SDK_ROOT}/ndk/21.4.7075529 ${ANDROID_NDK_ROOT}
33-
echo "ANDROID_NDK_HOME=${ANDROID_NDK_ROOT}" >> $GITHUB_ENV
3423

3524
- name: Set up JDK 11
3625
uses: actions/setup-java@v2
@@ -59,15 +48,6 @@ jobs:
5948
with:
6049
fetch-depth: 2
6150
submodules: true
62-
- name: Set up NDK 21.4.7075529
63-
run: |
64-
ANDROID_ROOT=/usr/local/lib/android
65-
ANDROID_SDK_ROOT=${ANDROID_ROOT}/sdk
66-
ANDROID_NDK_ROOT=${ANDROID_SDK_ROOT}/ndk-bundle
67-
SDKMANAGER=${ANDROID_SDK_ROOT}/cmdline-tools/latest/bin/sdkmanager
68-
echo "y" | $SDKMANAGER "ndk;21.4.7075529"
69-
ln -sfn ${ANDROID_SDK_ROOT}/ndk/21.4.7075529 ${ANDROID_NDK_ROOT}
70-
echo "ANDROID_NDK_HOME=${ANDROID_NDK_ROOT}" >> $GITHUB_ENV
7151

7252
- name: Set up JDK 11
7353
uses: actions/setup-java@v2
@@ -118,15 +98,6 @@ jobs:
11898
with:
11999
fetch-depth: 2
120100
submodules: true
121-
- name: Set up NDK 21.4.7075529
122-
run: |
123-
ANDROID_ROOT=/usr/local/lib/android
124-
ANDROID_SDK_ROOT=${ANDROID_ROOT}/sdk
125-
ANDROID_NDK_ROOT=${ANDROID_SDK_ROOT}/ndk-bundle
126-
SDKMANAGER=${ANDROID_SDK_ROOT}/cmdline-tools/latest/bin/sdkmanager
127-
echo "y" | $SDKMANAGER "ndk;21.4.7075529"
128-
ln -sfn ${ANDROID_SDK_ROOT}/ndk/21.4.7075529 ${ANDROID_NDK_ROOT}
129-
echo "ANDROID_NDK_HOME=${ANDROID_NDK_ROOT}" >> $GITHUB_ENV
130101

131102
- name: Set up JDK 11
132103
uses: actions/setup-java@v2

.github/workflows/copyright-check.yml

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -21,6 +21,7 @@ jobs:
2121
-e py \
2222
-e gradle \
2323
-e java \
24+
-e kt \
2425
-e groovy \
2526
-e sh \
2627
-e proto

.github/workflows/create_releases.yml

Lines changed: 49 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,49 @@
1+
name: Create release
2+
3+
on:
4+
workflow_dispatch:
5+
inputs:
6+
name:
7+
description: 'Release name'
8+
required: true
9+
type: string
10+
11+
jobs:
12+
create-branches:
13+
runs-on: ubuntu-latest
14+
env:
15+
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
16+
steps:
17+
- name: Create base branch
18+
uses: peterjgrainger/action-create-branch@c2800a3a9edbba2218da6861fa46496cf8f3195a
19+
with:
20+
branch: 'releases/${{ inputs.name }}'
21+
- name: Create release branch
22+
uses: peterjgrainger/action-create-branch@c2800a3a9edbba2218da6861fa46496cf8f3195a
23+
with:
24+
branch: 'releases/${{ inputs.name }}.release'
25+
26+
create-pull-request:
27+
runs-on: ubuntu-latest
28+
steps:
29+
- uses: actions/checkout@v3
30+
31+
- name: Create release configuration template
32+
run: |
33+
git config user.name 'Create Release GA'
34+
git config user.email '[email protected]'
35+
echo "[release]" > release.cfg
36+
echo "name = ${{ inputs.name }}" >> release.cfg
37+
echo "mode = RELEASE" >> release.cfg
38+
echo "" >> release.cfg
39+
echo "[modules]" >> release.cfg
40+
echo "" >> release.cfg
41+
git add release.cfg
42+
git commit -a -m 'Create release config'
43+
44+
- name: Create Pull Request
45+
uses: peter-evans/create-pull-request@v4
46+
with:
47+
base: 'releases/${{ inputs.name }}'
48+
branch: 'releases/${{ inputs.name }}.release'
49+
title: '${{ inputs.name}} release'

.github/workflows/diff-javadoc.yml

Lines changed: 67 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,67 @@
1+
name: Diff Javadoc
2+
3+
on:
4+
pull_request:
5+
6+
jobs:
7+
build:
8+
runs-on: ubuntu-latest
9+
permissions:
10+
pull-requests: write
11+
steps:
12+
- name: Make Dir
13+
run: mkdir ~/diff
14+
15+
- uses: actions/checkout@v3
16+
with:
17+
fetch-depth: 2
18+
submodules: true
19+
20+
- name: Set up JDK 11
21+
uses: actions/setup-java@v2
22+
with:
23+
java-version: 11
24+
distribution: temurin
25+
cache: gradle
26+
27+
- name: Changed Modules
28+
id: changed-modules
29+
run: |
30+
git diff --name-only HEAD~1 | xargs printf -- '--changed-git-paths %s\n' | xargs ./gradlew writeChangedProjects --output-file-path=modules.json --only-firebase-sdks
31+
echo "run=$(cat modules.json | sed "s/[]\"[]//g" | sed "s/,/\n/g" | xargs printf -- "%s:kotlinDoc ")" >> $GITHUB_OUTPUT
32+
33+
- name: Build
34+
run: ./gradlew ${{ steps.changed-modules.outputs.run }}
35+
36+
- name: Move original docs
37+
run: mv build ~/diff/modified
38+
39+
- uses: actions/checkout@v3
40+
with:
41+
ref: ${{ github.base_ref }}
42+
43+
- name: Build
44+
run: ./gradlew ${{ steps.changed-modules.outputs.run }}
45+
46+
- name: Move modified docs
47+
run: mv build ~/diff/original
48+
49+
- name: Diff docs
50+
run: >
51+
`# Recursively diff directories, including new files, git style, with 3 lines of context`
52+
diff -wEburN ~/diff/original ~/diff/modified
53+
`# Remove the first line and new file signifier of the output`
54+
| tail -n +2
55+
`# Replace the diff new file signifier with the end and start of a new codeblock`
56+
| sed "s/^diff.*$/\`\`\`\\n\`\`\`diff/g"
57+
`# Add a collapsable block, summary, and start the first code block on the first line`
58+
| sed "1s/^/<details>\\n<summary>Javadoc Changes:<\/summary>\\n\\n\`\`\`diff\\n/"
59+
`# Close the final code block and close the collapsable on the final line`
60+
| sed "$ s/$/\\n\`\`\`\\n<\/details>/"
61+
`# Write to diff.md for later`
62+
> diff.md
63+
64+
- name: Add comment
65+
uses: mshick/add-pr-comment@a65df5f64fc741e91c59b8359a4bc56e57aaf5b1
66+
with:
67+
message-path: diff.md

.github/workflows/fireci.yml

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -18,8 +18,10 @@ jobs:
1818
- uses: actions/[email protected]
1919
- uses: actions/setup-python@v2
2020
with:
21-
python-version: '3.9'
21+
python-version: '3.8'
2222
- run: |
2323
pip install -e "ci/fireci[test]"
2424
- run: |
2525
pytest ci/fireci
26+
- run: |
27+
mypy --config-file ci/fireci/setup.cfg ci/fireci/

.github/workflows/fireperf-e2e.yml

Lines changed: 0 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -33,15 +33,6 @@ jobs:
3333
java-version: 11
3434
distribution: temurin
3535
cache: gradle
36-
- name: Set up NDK 21.4.7075529
37-
run: |
38-
ANDROID_ROOT=/usr/local/lib/android
39-
ANDROID_SDK_ROOT=${ANDROID_ROOT}/sdk
40-
ANDROID_NDK_ROOT=${ANDROID_SDK_ROOT}/ndk-bundle
41-
SDKMANAGER=${ANDROID_SDK_ROOT}/cmdline-tools/latest/bin/sdkmanager
42-
echo "y" | $SDKMANAGER "ndk;21.4.7075529"
43-
ln -sfn ${ANDROID_SDK_ROOT}/ndk/21.4.7075529 ${ANDROID_NDK_ROOT}
44-
echo "ANDROID_NDK_HOME=${ANDROID_NDK_ROOT}" >> $GITHUB_ENV
4536
- name: Set up Python 3.10
4637
uses: actions/setup-python@v4
4738
with:

.github/workflows/health-metrics.yml

Lines changed: 65 additions & 21 deletions
Original file line numberDiff line numberDiff line change
@@ -1,14 +1,27 @@
11
name: Health Metrics
22

3-
on: [ pull_request, push ]
3+
concurrency:
4+
group: ${{ github.workflow }}-${{ github.event.pull_request.number || github.sha }}
5+
cancel-in-progress: true
6+
7+
on:
8+
pull_request:
9+
push:
10+
branches:
11+
- master
12+
# add other feature branches here
13+
# TODO(yifany): support workflow_dispatch for metric tests (or only for startup time test)
414

515
env:
616
GITHUB_PULL_REQUEST_NUMBER: ${{ github.event.pull_request.number }}
717

818
jobs:
919
coverage:
1020
name: Coverage
11-
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)
21+
if: |
22+
(github.event_name == 'push' && github.repository == 'firebase/firebase-android-sdk')
23+
|| (github.event_name == 'pull_request'
24+
&& github.event.pull_request.head.repo.full_name == github.repository)
1225
runs-on: ubuntu-latest
1326
steps:
1427
- uses: actions/checkout@v3
@@ -21,15 +34,6 @@ jobs:
2134
java-version: 11
2235
distribution: temurin
2336
cache: gradle
24-
- name: Set up NDK 21.4.7075529
25-
run: |
26-
ANDROID_ROOT=/usr/local/lib/android
27-
ANDROID_SDK_ROOT=${ANDROID_ROOT}/sdk
28-
ANDROID_NDK_ROOT=${ANDROID_SDK_ROOT}/ndk-bundle
29-
SDKMANAGER=${ANDROID_SDK_ROOT}/cmdline-tools/latest/bin/sdkmanager
30-
echo "y" | $SDKMANAGER "ndk;21.4.7075529"
31-
ln -sfn ${ANDROID_SDK_ROOT}/ndk/21.4.7075529 ${ANDROID_NDK_ROOT}
32-
echo "ANDROID_NDK_HOME=${ANDROID_NDK_ROOT}" >> $GITHUB_ENV
3337
- name: Set up Python 3.10
3438
uses: actions/setup-python@v4
3539
with:
@@ -49,7 +53,10 @@ jobs:
4953

5054
size:
5155
name: Size
52-
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)
56+
if: |
57+
(github.event_name == 'push' && github.repository == 'firebase/firebase-android-sdk')
58+
|| (github.event_name == 'pull_request'
59+
&& github.event.pull_request.head.repo.full_name == github.repository)
5360
runs-on: ubuntu-latest
5461
steps:
5562
- uses: actions/checkout@v3
@@ -62,15 +69,6 @@ jobs:
6269
java-version: 11
6370
distribution: temurin
6471
cache: gradle
65-
- name: Set up NDK 21.4.7075529
66-
run: |
67-
ANDROID_ROOT=/usr/local/lib/android
68-
ANDROID_SDK_ROOT=${ANDROID_ROOT}/sdk
69-
ANDROID_NDK_ROOT=${ANDROID_SDK_ROOT}/ndk-bundle
70-
SDKMANAGER=${ANDROID_SDK_ROOT}/cmdline-tools/latest/bin/sdkmanager
71-
echo "y" | $SDKMANAGER "ndk;21.4.7075529"
72-
ln -sfn ${ANDROID_SDK_ROOT}/ndk/21.4.7075529 ${ANDROID_NDK_ROOT}
73-
echo "ANDROID_NDK_HOME=${ANDROID_NDK_ROOT}" >> $GITHUB_ENV
7472
- name: Set up Python 3.10
7573
uses: actions/setup-python@v4
7674
with:
@@ -87,3 +85,49 @@ jobs:
8785
- name: Run size tests (post-submit)
8886
if: ${{ github.event_name == 'push' }}
8987
run: fireci binary_size
88+
89+
startup_time:
90+
name: Startup Time
91+
if: |
92+
(github.event_name == 'push' && github.repository == 'firebase/firebase-android-sdk')
93+
|| (github.event_name == 'pull_request'
94+
&& github.event.pull_request.head.repo.full_name == github.repository)
95+
runs-on: ubuntu-latest
96+
steps:
97+
- uses: actions/checkout@v3
98+
with:
99+
fetch-depth: 2
100+
submodules: true
101+
- name: Set up JDK 11
102+
uses: actions/setup-java@v2
103+
with:
104+
java-version: 11
105+
distribution: temurin
106+
cache: gradle
107+
- name: Set up Python 3.10
108+
uses: actions/setup-python@v4
109+
with:
110+
python-version: '3.10'
111+
- uses: google-github-actions/auth@v0
112+
with:
113+
credentials_json: '${{ secrets.GCP_SERVICE_ACCOUNT }}'
114+
- uses: google-github-actions/setup-gcloud@v0
115+
- name: Set up fireci
116+
run: pip3 install -e ci/fireci
117+
- name: Add google-services.json
118+
env:
119+
INTEG_TESTS_GOOGLE_SERVICES: ${{ secrets.INTEG_TESTS_GOOGLE_SERVICES }}
120+
BENCHMARK_APP_LOCATION: health-metrics/benchmark/template/app/google-services.json
121+
run: |
122+
echo $INTEG_TESTS_GOOGLE_SERVICES | base64 -d > $BENCHMARK_APP_LOCATION
123+
- name: Run startup-time tests (presubmit)
124+
if: ${{ github.event_name == 'pull_request' }}
125+
run: |
126+
git diff --name-only HEAD~1 | \
127+
xargs printf -- '--changed-git-paths %s\n' | \
128+
xargs ./gradlew writeChangedProjects --output-file-path=modules.json
129+
fireci macrobenchmark ci --pull-request --changed-modules-file modules.json
130+
- name: Run startup-time tests (post-submit)
131+
if: ${{ github.event_name == 'push' }}
132+
run: |
133+
fireci macrobenchmark ci --push

0 commit comments

Comments
 (0)