Skip to content

Commit 8978980

Browse files
authored
Merge e7ad15d into e40042a
2 parents e40042a + e7ad15d commit 8978980

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)