Skip to content

Commit 6bb0c4d

Browse files
committed
Merge branch 'master' into vk.transform_migration
2 parents db2ed1c + ff558a4 commit 6bb0c4d

File tree

211 files changed

+5817
-2506
lines changed

Some content is hidden

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

211 files changed

+5817
-2506
lines changed

.github/workflows/build-release-artifacts.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -16,7 +16,7 @@ jobs:
1616

1717
- name: Perform gradle build
1818
run: |
19-
./gradlew firebasePublish -PprojectsToPublish=firebase-firestore -PpublishMode=RELEASE -PincludeFireEscapeArtifacts=true
19+
./gradlew firebasePublish -PpublishConfigFilePath=release.cfg -PpublishMode=RELEASE -PincludeFireEscapeArtifacts=true
2020
- name: Upload generated artifacts
2121
uses: actions/upload-artifact@v2
2222
with:

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

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -26,7 +26,7 @@ jobs:
2626
run: |
2727
./gradlew -b buildSrc/build.gradle.kts -PenablePluginTests=true check
2828
- name: Publish Test Results
29-
uses: EnricoMi/publish-unit-test-result-action@v1
29+
uses: EnricoMi/publish-unit-test-result-action@b9f6c61d965bcaa18acc02d6daf706373a448f02
3030
with:
3131
files: "**/build/test-results/**/*.xml"
3232
check_name: "buildSrc Test Results"

.github/workflows/ci_tests.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -122,7 +122,7 @@ jobs:
122122
FTL_RESULTS_DIR: ${{ github.event_name == 'pull_request' && format('pr-logs/pull/{0}/{1}/{2}/{3}_{4}/artifacts/', github.repository, github.event.pull_request.number, github.job, github.run_id, github.run_attempt) || format('logs/{0}/{1}_{2}/artifacts/', github.workflow, github.run_id, github.run_attempt)}}
123123
FIREBASE_APP_CHECK_DEBUG_SECRET: ${{ secrets.FIREBASE_APP_CHECK_DEBUG_SECRET }}
124124
run: |
125-
./gradlew ${{matrix.module}}:deviceCheck withErrorProne -PuseProdBackendForTests=true
125+
./gradlew ${{matrix.module}}:deviceCheck withErrorProne -PtargetBackend="prod"
126126
127127
publish-test-results:
128128
name: "Publish Tests Results"

.github/workflows/create_releases.yml

Lines changed: 11 additions & 15 deletions
Original file line numberDiff line numberDiff line change
@@ -7,6 +7,10 @@ on:
77
description: 'Release name'
88
required: true
99
type: string
10+
past-name:
11+
description: 'Past release name'
12+
required: true
13+
type: string
1014

1115
jobs:
1216
create-branches:
@@ -15,35 +19,27 @@ jobs:
1519
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
1620
steps:
1721
- name: Create base branch
18-
uses: peterjgrainger/action-create-branch@v2.2.0
22+
uses: peterjgrainger/action-create-branch@c2800a3a9edbba2218da6861fa46496cf8f3195a
1923
with:
2024
branch: 'releases/${{ inputs.name }}'
21-
- name: Create release branch
22-
uses: peterjgrainger/[email protected]
23-
with:
24-
branch: 'releases/${{ inputs.name }}.release'
2525

2626
create-pull-request:
2727
runs-on: ubuntu-latest
2828
steps:
2929
- uses: actions/checkout@v3
30+
with:
31+
fetch-depth: 0
3032

3133
- name: Create release configuration template
3234
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'
35+
./gradlew generateReleaseConfig -PcurrentRelease=${{ inputs.name }} -PpastRelease=${{ inputs.past-name }} -PprintOutput=true
4336
4437
- name: Create Pull Request
4538
uses: peter-evans/create-pull-request@v4
4639
with:
4740
base: 'releases/${{ inputs.name }}'
4841
branch: 'releases/${{ inputs.name }}.release'
42+
add-paths: release.cfg
4943
title: '${{ inputs.name}} release'
44+
body: 'Auto-generated PR for release ${{ inputs.name}}'
45+
commit-message: 'Create release config for ${{ inputs.name }}'

.github/workflows/diff-javadoc.yml

Lines changed: 70 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,70 @@
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+
# Certain SDKs won't export docs, make a blank folder to diff if that's the case
35+
run: mkdir build && ./gradlew ${{ steps.changed-modules.outputs.run }}
36+
37+
- name: Move original docs
38+
run: mv build ~/diff/modified
39+
40+
- uses: actions/checkout@v3
41+
with:
42+
ref: ${{ github.base_ref }}
43+
44+
- name: Build
45+
# Certain SDKs won't export docs, make a blank folder to diff if that's the case
46+
run: mkdir build && ./gradlew ${{ steps.changed-modules.outputs.run }}
47+
48+
- name: Move modified docs
49+
run: mv build ~/diff/original
50+
51+
- name: Diff docs
52+
run: >
53+
`# Recursively diff directories, including new files, git style, with 3 lines of context`
54+
diff -wEburN ~/diff/original ~/diff/modified
55+
`# Remove the first line and new file signifier of the output`
56+
| tail -n +2
57+
`# Replace the diff new file signifier with the end and start of a new codeblock`
58+
| sed "s/^diff.*$/\`\`\`\\n\`\`\`diff/g"
59+
`# Add a collapsable block, summary, and start the first code block on the first line`
60+
| sed "1s/^/<details>\\n<summary>Javadoc Changes:<\/summary>\\n\\n\`\`\`diff\\n/"
61+
`# Close the final code block and close the collapsable on the final line`
62+
| sed "$ s/$/\\n\`\`\`\\n<\/details>/"
63+
`# Write to diff.md for later`
64+
> diff.md
65+
66+
- name: Add comment
67+
continue-on-error: true
68+
uses: mshick/add-pr-comment@a65df5f64fc741e91c59b8359a4bc56e57aaf5b1
69+
with:
70+
message-path: diff.md

.github/workflows/health-metrics.yml

Lines changed: 8 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
name: Health Metrics
22

33
concurrency:
4-
group: ${{ github.workflow }}-${{ github.event.pull_request.number || github.ref }}
4+
group: ${{ github.workflow }}-${{ github.event.pull_request.number || github.sha }}
55
cancel-in-progress: true
66

77
on:
@@ -122,7 +122,12 @@ jobs:
122122
echo $INTEG_TESTS_GOOGLE_SERVICES | base64 -d > $BENCHMARK_APP_LOCATION
123123
- name: Run startup-time tests (presubmit)
124124
if: ${{ github.event_name == 'pull_request' }}
125-
run: fireci macrobenchmark ci --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
126130
- name: Run startup-time tests (post-submit)
127131
if: ${{ github.event_name == 'push' }}
128-
run: fireci macrobenchmark ci --push
132+
run: |
133+
fireci macrobenchmark ci --push
Lines changed: 55 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,55 @@
1+
name: Jekyll with GitHub Pages
2+
3+
on:
4+
# Runs on pushes targeting the default branch
5+
push:
6+
branches: ["master"]
7+
paths:
8+
- '.github/workflows/jekyll-gh-pages.yml'
9+
- 'contributor-docs/**'
10+
pull_request:
11+
paths:
12+
- '.github/workflows/jekyll-gh-pages.yml'
13+
- 'contributor-docs/**'
14+
15+
# Allows you to run this workflow manually from the Actions tab
16+
workflow_dispatch:
17+
18+
# Sets permissions of the GITHUB_TOKEN to allow deployment to GitHub Pages
19+
permissions:
20+
contents: read
21+
pages: write
22+
id-token: write
23+
24+
# Allow one concurrent deployment
25+
concurrency:
26+
group: "pages"
27+
cancel-in-progress: true
28+
29+
jobs:
30+
build:
31+
runs-on: ubuntu-latest
32+
steps:
33+
- name: Checkout
34+
uses: actions/checkout@v3
35+
- name: Setup Pages
36+
uses: actions/configure-pages@v2
37+
- name: Build with Jekyll
38+
uses: actions/jekyll-build-pages@v1
39+
with:
40+
source: ./contributor-docs
41+
destination: ./_site
42+
- name: Upload artifact
43+
uses: actions/upload-pages-artifact@v1
44+
45+
deploy:
46+
if: ${{ github.event_name == 'push' && github.repository == 'firebase/firebase-android-sdk' }}
47+
environment:
48+
name: github-pages
49+
url: ${{ steps.deployment.outputs.page_url }}
50+
runs-on: ubuntu-latest
51+
needs: build
52+
steps:
53+
- name: Deploy to GitHub Pages
54+
id: deployment
55+
uses: actions/deploy-pages@v1

.github/workflows/merge-to-main.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -15,7 +15,7 @@ jobs:
1515
permissions:
1616
pull-requests: write
1717
steps:
18-
- uses: mshick/add-pr-comment@v2
18+
- uses: mshick/add-pr-comment@a65df5f64fc741e91c59b8359a4bc56e57aaf5b1
1919
with:
2020
message: >
2121
### 📝 PRs merging into main branch

.github/workflows/scorecards.yml

Lines changed: 72 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,72 @@
1+
# This workflow uses actions that are not certified by GitHub. They are provided
2+
# by a third-party and are governed by separate terms of service, privacy
3+
# policy, and support documentation.
4+
5+
name: Scorecards supply-chain security
6+
on:
7+
# For Branch-Protection check. Only the default branch is supported. See
8+
# https://github.com/ossf/scorecard/blob/main/docs/checks.md#branch-protection
9+
branch_protection_rule:
10+
# To guarantee Maintained check is occasionally updated. See
11+
# https://github.com/ossf/scorecard/blob/main/docs/checks.md#maintained
12+
schedule:
13+
- cron: '45 11 * * 1'
14+
push:
15+
branches: [ "master" ]
16+
17+
# Declare default permissions as read only.
18+
permissions: read-all
19+
20+
jobs:
21+
analysis:
22+
name: Scorecards analysis
23+
runs-on: ubuntu-latest
24+
permissions:
25+
# Needed to upload the results to code-scanning dashboard.
26+
security-events: write
27+
# Needed to publish results and get a badge (see publish_results below).
28+
id-token: write
29+
# Uncomment the permissions below if installing in a private repository.
30+
# contents: read
31+
# actions: read
32+
33+
steps:
34+
- name: "Checkout code"
35+
uses: actions/checkout@93ea575cb5d8a053eaa0ac8fa3b40d7e05a33cc8 # v3.1.0
36+
with:
37+
persist-credentials: false
38+
39+
- name: "Run analysis"
40+
uses: ossf/scorecard-action@99c53751e09b9529366343771cc321ec74e9bd3d # v2.0.6
41+
with:
42+
results_file: results.sarif
43+
results_format: sarif
44+
# (Optional) "write" PAT token. Uncomment the `repo_token` line below if:
45+
# - you want to enable the Branch-Protection check on a *public* repository, or
46+
# - you are installing Scorecards on a *private* repository
47+
# To create the PAT, follow the steps in https://github.com/ossf/scorecard-action#authentication-with-pat.
48+
# repo_token: ${{ secrets.SCORECARD_TOKEN }}
49+
50+
# Public repositories:
51+
# - Publish results to OpenSSF REST API for easy access by consumers
52+
# - Allows the repository to include the Scorecard badge.
53+
# - See https://github.com/ossf/scorecard-action#publishing-results.
54+
# For private repositories:
55+
# - `publish_results` will always be set to `false`, regardless
56+
# of the value entered here.
57+
publish_results: true
58+
59+
# Upload the results as artifacts (optional). Commenting out will disable uploads of run results in SARIF
60+
# format to the repository Actions tab.
61+
- name: "Upload artifact"
62+
uses: actions/upload-artifact@3cea5372237819ed00197afe530f5a7ea3e805c8 # v3.1.0
63+
with:
64+
name: SARIF file
65+
path: results.sarif
66+
retention-days: 5
67+
68+
# Upload the results to GitHub's code scanning dashboard.
69+
- name: "Upload to code-scanning"
70+
uses: github/codeql-action/upload-sarif@807578363a7869ca324a79039e6db9c843e0e100 # v2.1.27
71+
with:
72+
sarif_file: results.sarif

.github/workflows/update-cpp-sdk-on-release.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -62,7 +62,7 @@ jobs:
6262
ref: main
6363

6464
- name: Get firebase-workflow-trigger token
65-
uses: tibdex/github-app-token@v1
65+
uses: tibdex/github-app-token@021a2405c7f990db57f5eae5397423dcc554159c
6666
id: generate-token
6767
with:
6868
app_id: ${{ secrets.CPP_WORKFLOW_TRIGGER_APP_ID }}

0 commit comments

Comments
 (0)