Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
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
30 changes: 9 additions & 21 deletions .github/workflows/abtesting.yml
Original file line number Diff line number Diff line change
Expand Up @@ -13,6 +13,7 @@ on:
- '.github/workflows/common.yml'
- '.github/workflows/common_cocoapods.yml'
- '.github/workflows/common_catalyst.yml'
- '.github/workflows/common_quickstart.yml'
- 'Gemfile*'
schedule:
# Run every day at 2am (PDT) / 5am (EDT) - cron uses UTC times
Expand Down Expand Up @@ -40,28 +41,15 @@ jobs:
product: FirebaseABTesting

quickstart:
# Don't run on private repo unless it is a PR.
if: (github.repository == 'Firebase/firebase-ios-sdk' && github.event_name == 'schedule') || github.event_name == 'pull_request'

env:
uses: ./.github/workflows/common_quickstart.yml
with:
product: ABTesting
is_legacy: true
setup_command: scripts/setup_quickstart.sh abtesting
plist_src_path: scripts/gha-encrypted/qs-database.plist.gpg
plist_dst_path: quickstart-ios/database/GoogleService-Info.plist
secrets:
plist_secret: ${{ secrets.GHASecretsGPGPassphrase1 }}
runs-on: macos-15
steps:
- uses: actions/checkout@v4
- uses: ruby/setup-ruby@354a1ad156761f5ee2b7b13fa8e09943a5e8d252 # v1
- name: Xcode
run: sudo xcode-select -s /Applications/Xcode_16.4.app/Contents/Developer
- name: Setup quickstart
env:
LEGACY: true
run: scripts/setup_quickstart.sh abtesting
- name: Install Secret GoogleService-Info.plist
run: scripts/decrypt_gha_secret.sh scripts/gha-encrypted/qs-abtesting.plist.gpg \
quickstart-ios/abtesting/GoogleService-Info.plist "$plist_secret"
- name: Test swift quickstart
env:
LEGACY: true
run: ([ -z $plist_secret ] || scripts/third_party/travis/retry.sh scripts/test_quickstart.sh ABTesting true)

quickstart-ftl-cron-only:
# Don't run on private repo.
Expand Down
29 changes: 14 additions & 15 deletions .github/workflows/auth.yml
Original file line number Diff line number Diff line change
Expand Up @@ -13,6 +13,7 @@ on:
- '.github/workflows/common.yml'
- '.github/workflows/common_cocoapods.yml'
- '.github/workflows/common_catalyst.yml'
- '.github/workflows/common_quickstart.yml'
- 'scripts/gha-encrypted/AuthSample/SwiftApplication.plist.gpg'
- 'Gemfile*'
schedule:
Expand Down Expand Up @@ -92,22 +93,16 @@ jobs:
command: ([ -z $plist_secret ] || scripts/build.sh Auth iOS ${{ matrix.scheme }})

quickstart:
# Don't run on private repo unless it is a PR.
if: (github.repository == 'Firebase/firebase-ios-sdk' && github.event_name == 'schedule') || github.event_name == 'pull_request'

env:
uses: ./.github/workflows/common_quickstart.yml
with:
product: Authentication
is_legacy: false
setup_command: scripts/setup_quickstart.sh authentication
plist_src_path: scripts/gha-encrypted/qs-auth.plist.gpg
plist_dst_path: quickstart-ios/authentication/GoogleService-Info.plist
run_tests: false
secrets:
plist_secret: ${{ secrets.GHASecretsGPGPassphrase1 }}
runs-on: macos-15
steps:
- uses: actions/checkout@v4
- uses: ruby/setup-ruby@354a1ad156761f5ee2b7b13fa8e09943a5e8d252 # v1
- name: Setup quickstart
run: scripts/setup_quickstart.sh authentication
- name: Install Secret GoogleService-Info.plist
run: scripts/decrypt_gha_secret.sh scripts/gha-encrypted/qs-auth.plist.gpg \
quickstart-ios/authentication/GoogleService-Info.plist "$plist_secret"
- name: Test swift quickstart
run: ([ -z $plist_secret ] || scripts/third_party/travis/retry.sh scripts/test_quickstart.sh Authentication false)

# TODO(@sunmou99): currently have issue with this job, will re-enable it once the issue resolved.
# quickstart-ftl-cron-only:
Expand All @@ -116,6 +111,7 @@ jobs:

# env:
# plist_secret: ${{ secrets.GHASecretsGPGPassphrase1 }}
# signin_secret: ${{ secrets.GHASecretsGPGPassphrase1 }}
# runs-on: macos-14
# steps:
# - uses: actions/checkout@v4
Expand Down Expand Up @@ -150,6 +146,9 @@ jobs:
'--use-static-frameworks'
]
needs: pod_lib_lint
env:
plist_secret: ${{ secrets.GHASecretsGPGPassphrase1 }}
runs-on: macos-14
steps:
- uses: actions/checkout@v4
- uses: ruby/setup-ruby@354a1ad156761f5ee2b7b13fa8e09943a5e8d252 # v1
Expand Down
114 changes: 114 additions & 0 deletions .github/workflows/common_quickstart.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,114 @@
name: common_quickstart

permissions:
contents: read

on:
workflow_call:
# Re-usable workflows do not automatically inherit the caller's secrets.
#
# This workflow decrypts encrypted files, so the calling workflow needs to
# pass the secret to the re-usable workflow.
#
# Example:
#
# quickstart:
# uses: ./.github/workflows/common_quickstart.yml
# with:
# # ...
# secrets:
# plist_secret: ${{ secrets.GHASecretsGPGPassphrase1 }}
#
secrets:
plist_secret:
required: true

inputs:
# The product to test be tested (e.g. `ABTesting`).
product:
type: string
required: true

# Whether to test the legacy version of the quickstart.
is_legacy:
type: boolean
required: true

# The path to the encrypted `GoogleService-Info.plist` file.
plist_src_path:
type: string
required: true

# The destination path for the decrypted `GoogleService-Info.plist` file.
plist_dst_path:
type: string
required: true

# The type of quickstart to test.
#
# Options: [swift, objc]
quickstart_type:
type: string
required: false
default: objc

# Whether to run tests or just build. Defaults to true.
run_tests:
type: boolean
required: false
default: true

# A command to execute before testing.
#
# Example: `scripts/setup_quickstart.sh functions`
setup_command:
type: string
required: false
default: ""

jobs:
quickstart:
# Run on the main repo's scheduled jobs or pull requests and manual workflow invocations.
if: (github.repository == 'firebase/firebase-ios-sdk' && github.event_name == 'schedule') || contains(fromJSON('["pull_request", "workflow_dispatch"]'), github.event_name)
env:
plist_secret: ${{ secrets.plist_secret }}
LEGACY: ${{ inputs.is_legacy && true || '' }}
runs-on: macos-15
steps:
- uses: actions/checkout@v4
- uses: ruby/setup-ruby@354a1ad156761f5ee2b7b13fa8e09943a5e8d252 # v1
- name: Xcode
run: sudo xcode-select -s /Applications/Xcode_16.4.app/Contents/Developer
- name: Run setup command.
run: ${{ inputs.setup_command }}
- name: Install Secret GoogleService-Info.plist
run: |
scripts/decrypt_gha_secret.sh \
${{ inputs.plist_src_path }} \
${{ inputs.plist_dst_path }} \
"$plist_secret"
- name: Build ${{ inputs.product }} Quickstart (${{ inputs.quickstart_type }} / ${{ inputs.is_legacy && 'Legacy' || 'Non-Legacy' }})
uses: nick-fields/retry@ce71cc2ab81d554ebbe88c79ab5975992d79ba08 # v3
with:
timeout_minutes: 15
max_attempts: 3
retry_wait_seconds: 120
command: |
scripts/test_quickstart.sh \
${{ inputs.product }} \
${{ inputs.run_tests }} \
${{ inputs.quickstart_type }}
# Failure sequence to upload artifact.
- id: lowercase_product
if: ${{ failure() }}
run: |
lowercase_product=$(echo "${{ inputs.product }}" | tr '[:upper:]' '[:lower:]')
echo "lowercase_product=$lowercase_product" >> $GITHUB_OUTPUT
- name: Remove data before upload.
if: ${{ failure() }}
run: scripts/remove_data.sh ${{ steps.lowercase_product.outputs.lowercase_product }}
- uses: actions/upload-artifact@v4
if: ${{ failure() }}
with:
name: quickstart_artifacts_${{ steps.lowercase_product.outputs.lowercase_product }}
path: quickstart-ios/
35 changes: 12 additions & 23 deletions .github/workflows/crashlytics.yml
Original file line number Diff line number Diff line change
Expand Up @@ -13,6 +13,7 @@ on:
- '.github/workflows/common.yml'
- '.github/workflows/common_cocoapods.yml'
- '.github/workflows/common_catalyst.yml'
- '.github/workflows/common_quickstart.yml'
- 'Interop/Analytics/Public/*.h'
- 'Gemfile*'
schedule:
Expand Down Expand Up @@ -42,33 +43,21 @@ jobs:
buildonly_platforms: tvOS, macOS, watchOS

quickstart:
# Don't run on private repo unless it is a PR.
if: (github.repository == 'Firebase/firebase-ios-sdk' && github.event_name == 'schedule') || github.event_name == 'pull_request'

env:
plist_secret: ${{ secrets.GHASecretsGPGPassphrase1 }}
runs-on: macos-15
steps:
- uses: actions/checkout@v4
- uses: ruby/setup-ruby@354a1ad156761f5ee2b7b13fa8e09943a5e8d252 # v1
- name: Xcode
run: sudo xcode-select -s /Applications/Xcode_16.4.app/Contents/Developer
- name: Setup quickstart
run: scripts/setup_quickstart.sh crashlytics
env:
LEGACY: true
- name: Install Secret GoogleService-Info.plist
run: scripts/decrypt_gha_secret.sh scripts/gha-encrypted/qs-crashlytics.plist.gpg \
quickstart-ios/crashlytics/GoogleService-Info.plist "$plist_secret"
- name: Test swift quickstart
run: |
uses: ./.github/workflows/common_quickstart.yml
with:
product: Crashlytics
is_legacy: true
quickstart_type: swift
setup_command: |
scripts/setup_quickstart.sh crashlytics
mkdir quickstart-ios/crashlytics/LegacyCrashlyticsQuickstart/Pods/FirebaseCrashlytics
# Set the deployed pod location of run and upload-symbols with the development pod version.
cp Crashlytics/run quickstart-ios/crashlytics/LegacyCrashlyticsQuickstart/Pods/FirebaseCrashlytics/
cp Crashlytics/upload-symbols quickstart-ios/crashlytics/LegacyCrashlyticsQuickstart/Pods/FirebaseCrashlytics/
([ -z $plist_secret ] || scripts/third_party/travis/retry.sh scripts/test_quickstart.sh Crashlytics true swift)
env:
LEGACY: true
plist_src_path: scripts/gha-encrypted/qs-crashlytics.plist.gpg
plist_dst_path: quickstart-ios/crashlytics/GoogleService-Info.plist
secrets:
plist_secret: ${{ secrets.GHASecretsGPGPassphrase1 }}

quickstart-ftl-cron-only:
# Don't run on private repo.
Expand Down
32 changes: 14 additions & 18 deletions .github/workflows/database.yml
Original file line number Diff line number Diff line change
Expand Up @@ -16,6 +16,7 @@ on:
- '.github/workflows/common.yml'
- '.github/workflows/common_cocoapods.yml'
- '.github/workflows/common_catalyst.yml'
- '.github/workflows/common_quickstart.yml'
- 'Gemfile*'
- 'scripts/run_database_emulator.sh'
schedule:
Expand Down Expand Up @@ -69,25 +70,20 @@ jobs:
run: scripts/third_party/travis/retry.sh scripts/build.sh Database iOS integration

quickstart:
# Don't run on private repo unless it is a PR.
if: (github.repository == 'Firebase/firebase-ios-sdk' && github.event_name == 'schedule') || github.event_name == 'pull_request'
env:
uses: ./.github/workflows/common_quickstart.yml
strategy:
matrix:
quickstart_type: [objc, swift]
with:
product: Database
is_legacy: false
setup_command: scripts/setup_quickstart.sh database
plist_src_path: scripts/gha-encrypted/qs-database.plist.gpg
plist_dst_path: quickstart-ios/database/GoogleService-Info.plist
quickstart_type: ${{ matrix.quickstart_type }}
run_tests: false
secrets:
plist_secret: ${{ secrets.GHASecretsGPGPassphrase1 }}
runs-on: macos-15
steps:
- uses: actions/checkout@v4
- uses: ruby/setup-ruby@354a1ad156761f5ee2b7b13fa8e09943a5e8d252 # v1
- name: Setup quickstart
run: scripts/setup_quickstart.sh database
- name: Install Secret GoogleService-Info.plist
run: scripts/decrypt_gha_secret.sh scripts/gha-encrypted/qs-database.plist.gpg \
quickstart-ios/database/GoogleService-Info.plist "$plist_secret"
- name: Xcode
run: sudo xcode-select -s /Applications/Xcode_16.4.app/Contents/Developer
- name: Test objc quickstart
run: ([ -z $plist_secret ] || scripts/third_party/travis/retry.sh scripts/test_quickstart.sh Database false)
- name: Test swift quickstart
run: ([ -z $plist_secret ] || scripts/third_party/travis/retry.sh scripts/test_quickstart.sh Database false swift)

database-cron-only:
# Don't run on private repo.
Expand Down
29 changes: 11 additions & 18 deletions .github/workflows/firestore.yml
Original file line number Diff line number Diff line change
Expand Up @@ -598,23 +598,16 @@ jobs:
if: needs.*.result == 'failure'
run: exit 1

# Disable until FirebaseUI is updated to accept Firebase 9 and quickstart is updated to accept
# Firebase UI 12
# TODO: Disable until FirebaseUI is updated to accept Firebase 9 and
# quickstart is updated to accept Firebase UI 12
# quickstart:
# # Don't run on private repo unless it is a PR.
# if: (github.repository == 'Firebase/firebase-ios-sdk' && github.event_name == 'schedule') || github.event_name == 'pull_request'
# env:
# uses: ./.github/workflows/common_quickstart.yml
# with:
# product: Firestore
# is_legacy: true
# setup_command: scripts/setup_quickstart.sh firestore
# plist_src_path: scripts/gha-encrypted/qs-firestore.plist.gpg
# plist_dst_path: quickstart-ios/firestore/GoogleService-Info.plist
# run_tests: false
# secrets:
# plist_secret: ${{ secrets.GHASecretsGPGPassphrase1 }}
# runs-on: macos-14
# needs: check

# steps:
# - uses: actions/checkout@v4
# - name: Setup quickstart
# run: scripts/setup_quickstart.sh firestore
# - name: Install Secret GoogleService-Info.plist
# run: scripts/decrypt_gha_secret.sh scripts/gha-encrypted/qs-firestore.plist.gpg \
# quickstart-ios/firestore/GoogleService-Info.plist "$plist_secret"
# - name: Test swift quickstart
# run: ([ -z $plist_secret ] ||
# scripts/third_party/travis/retry.sh scripts/test_quickstart.sh Firestore false)
Loading
Loading