Skip to content

Commit 436de0b

Browse files
infra: Migrate away from ObjC quickstarts (#15478)
Co-authored-by: gemini-code-assist[bot] <176961590+gemini-code-assist[bot]@users.noreply.github.com>
1 parent 54ae013 commit 436de0b

27 files changed

+815
-424
lines changed

.github/workflows/abtesting.yml

Lines changed: 3 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -45,10 +45,9 @@ jobs:
4545
uses: ./.github/workflows/common_quickstart.yml
4646
with:
4747
product: ABTesting
48-
is_legacy: true
49-
setup_command: scripts/setup_quickstart.sh abtesting
50-
plist_src_path: scripts/gha-encrypted/qs-database.plist.gpg
51-
plist_dst_path: quickstart-ios/database/GoogleService-Info.plist
48+
setup_command: scripts/setup_quickstart_spm.sh abtesting
49+
plist_src_path: scripts/gha-encrypted/qs-abtesting.plist.gpg
50+
plist_dst_path: quickstart-ios/abtesting/GoogleService-Info.plist
5251
secrets:
5352
plist_secret: ${{ secrets.GHASecretsGPGPassphrase1 }}
5453

@@ -66,17 +65,13 @@ jobs:
6665
with:
6766
python-version: '3.11'
6867
- name: Setup quickstart
69-
env:
70-
LEGACY: true
7168
run: scripts/setup_quickstart.sh abtesting
7269
- name: Install Secret GoogleService-Info.plist
7370
run: scripts/decrypt_gha_secret.sh scripts/gha-encrypted/qs-abtesting.plist.gpg \
7471
quickstart-ios/abtesting/GoogleService-Info.plist "$plist_secret"
7572
- name: Xcode
7673
run: sudo xcode-select -s /Applications/Xcode_16.4.app/Contents/Developer
7774
- name: Build swift quickstart
78-
env:
79-
LEGACY: true
8075
run: ([ -z $plist_secret ] || scripts/third_party/travis/retry.sh scripts/test_quickstart_ftl.sh ABTesting)
8176
- id: ftl_test
8277
uses: FirebaseExtended/github-actions/[email protected]

.github/workflows/auth.yml

Lines changed: 1 addition & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -97,8 +97,7 @@ jobs:
9797
uses: ./.github/workflows/common_quickstart.yml
9898
with:
9999
product: Authentication
100-
is_legacy: false
101-
setup_command: scripts/setup_quickstart.sh authentication
100+
setup_command: scripts/setup_quickstart_spm.sh authentication
102101
plist_src_path: scripts/gha-encrypted/qs-authentication.plist.gpg
103102
plist_dst_path: quickstart-ios/authentication/GoogleService-Info.plist
104103
run_tests: false
@@ -141,6 +140,5 @@ jobs:
141140
platforms: '[ "ios", "tvos --skip-tests", "macos --skip-tests", "watchos --skip-tests" ]'
142141
flags: '[ "--use-static-frameworks" ]'
143142
setup_command: scripts/configure_test_keychain.sh
144-
ignore_deprecation_warnings: true
145143
secrets:
146144
plist_secret: ${{ secrets.GHASecretsGPGPassphrase1 }}

.github/workflows/common_quickstart.yml

Lines changed: 12 additions & 17 deletions
Original file line numberDiff line numberDiff line change
@@ -29,10 +29,11 @@ on:
2929
type: string
3030
required: true
3131

32-
# Whether to test the legacy version of the quickstart.
33-
is_legacy:
34-
type: boolean
35-
required: true
32+
# The branch to checkout in the quickstart repo.
33+
quickstart_branch:
34+
type: string
35+
required: false
36+
default: 'main'
3637

3738
# The path to the encrypted `GoogleService-Info.plist` file.
3839
plist_src_path:
@@ -44,14 +45,6 @@ on:
4445
type: string
4546
required: true
4647

47-
# The type of quickstart to test.
48-
#
49-
# Options: [swift, objc]
50-
quickstart_type:
51-
type: string
52-
required: false
53-
default: objc
54-
5548
# Whether to run tests or just build. Defaults to true.
5649
run_tests:
5750
type: boolean
@@ -68,15 +61,18 @@ on:
6861

6962
jobs:
7063
quickstart:
64+
name: quickstart (${{ inputs.product }})
7165
# Run on the main repo's scheduled jobs or pull requests and manual workflow invocations.
7266
if: (github.repository == 'firebase/firebase-ios-sdk' && github.event_name == 'schedule') || contains(fromJSON('["pull_request", "workflow_dispatch"]'), github.event_name)
7367
env:
7468
plist_secret: ${{ secrets.plist_secret }}
75-
LEGACY: ${{ inputs.is_legacy && true || '' }}
69+
QUICKSTART_BRANCH: ${{ inputs.quickstart_branch }}
7670
runs-on: macos-15
7771
steps:
7872
- uses: actions/checkout@v4
7973
- uses: ruby/setup-ruby@354a1ad156761f5ee2b7b13fa8e09943a5e8d252 # v1
74+
- name: Prereqs
75+
run: gem install xcpretty
8076
- name: Xcode
8177
run: sudo xcode-select -s /Applications/Xcode_16.4.app/Contents/Developer
8278
- name: Run setup command.
@@ -87,17 +83,16 @@ jobs:
8783
${{ inputs.plist_src_path }} \
8884
${{ inputs.plist_dst_path }} \
8985
"$plist_secret"
90-
- name: Build ${{ inputs.product }} Quickstart (${{ inputs.quickstart_type }} / ${{ inputs.is_legacy && 'Legacy' || 'Non-Legacy' }})
86+
- name: Build ${{ inputs.product }} Quickstart
9187
uses: nick-fields/retry@ce71cc2ab81d554ebbe88c79ab5975992d79ba08 # v3
9288
with:
9389
timeout_minutes: 15
9490
max_attempts: 3
9591
retry_wait_seconds: 120
9692
command: |
97-
scripts/test_quickstart.sh \
93+
SPM=true DIR=${{ inputs.product }} scripts/test_quickstart.sh \
9894
${{ inputs.product }} \
99-
${{ inputs.run_tests }} \
100-
${{ inputs.quickstart_type }}
95+
${{ inputs.run_tests }}
10196
# Failure sequence to upload artifact.
10297
- id: lowercase_product
10398
if: failure()

.github/workflows/crashlytics.yml

Lines changed: 1 addition & 16 deletions
Original file line numberDiff line numberDiff line change
@@ -47,14 +47,7 @@ jobs:
4747
uses: ./.github/workflows/common_quickstart.yml
4848
with:
4949
product: Crashlytics
50-
is_legacy: true
51-
quickstart_type: swift
52-
setup_command: |
53-
scripts/setup_quickstart.sh crashlytics
54-
mkdir quickstart-ios/crashlytics/LegacyCrashlyticsQuickstart/Pods/FirebaseCrashlytics
55-
# Set the deployed pod location of run and upload-symbols with the development pod version.
56-
cp Crashlytics/run quickstart-ios/crashlytics/LegacyCrashlyticsQuickstart/Pods/FirebaseCrashlytics/
57-
cp Crashlytics/upload-symbols quickstart-ios/crashlytics/LegacyCrashlyticsQuickstart/Pods/FirebaseCrashlytics/
50+
setup_command: scripts/setup_quickstart_spm.sh crashlytics
5851
plist_src_path: scripts/gha-encrypted/qs-crashlytics.plist.gpg
5952
plist_dst_path: quickstart-ios/crashlytics/GoogleService-Info.plist
6053
secrets:
@@ -77,20 +70,12 @@ jobs:
7770
run: sudo xcode-select -s /Applications/Xcode_16.4.app/Contents/Developer
7871
- name: Setup quickstart
7972
run: scripts/setup_quickstart.sh crashlytics
80-
env:
81-
LEGACY: true
8273
- name: Install Secret GoogleService-Info.plist
8374
run: scripts/decrypt_gha_secret.sh scripts/gha-encrypted/qs-crashlytics.plist.gpg \
8475
quickstart-ios/crashlytics/GoogleService-Info.plist "$plist_secret"
8576
- name: Build swift quickstart
8677
run: |
87-
mkdir quickstart-ios/crashlytics/LegacyCrashlyticsQuickstart/Pods/FirebaseCrashlytics
88-
# Set the deployed pod location of run and upload-symbols with the development pod version.
89-
cp Crashlytics/run quickstart-ios/crashlytics/LegacyCrashlyticsQuickstart/Pods/FirebaseCrashlytics/
90-
cp Crashlytics/upload-symbols quickstart-ios/crashlytics/LegacyCrashlyticsQuickstart/Pods/FirebaseCrashlytics/
9178
([ -z $plist_secret ] || scripts/third_party/travis/retry.sh scripts/test_quickstart_ftl.sh Crashlytics swift)
92-
env:
93-
LEGACY: true
9479
- id: ftl_test
9580
uses: FirebaseExtended/github-actions/[email protected]
9681
with:

.github/workflows/database.yml

Lines changed: 1 addition & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -72,16 +72,11 @@ jobs:
7272

7373
quickstart:
7474
uses: ./.github/workflows/common_quickstart.yml
75-
strategy:
76-
matrix:
77-
quickstart_type: [objc, swift]
7875
with:
7976
product: Database
80-
is_legacy: false
81-
setup_command: scripts/setup_quickstart.sh database
77+
setup_command: scripts/setup_quickstart_spm.sh database
8278
plist_src_path: scripts/gha-encrypted/qs-database.plist.gpg
8379
plist_dst_path: quickstart-ios/database/GoogleService-Info.plist
84-
quickstart_type: ${{ matrix.quickstart_type }}
8580
run_tests: false
8681
secrets:
8782
plist_secret: ${{ secrets.GHASecretsGPGPassphrase1 }}

.github/workflows/firestore.yml

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -605,8 +605,7 @@ jobs:
605605
# uses: ./.github/workflows/common_quickstart.yml
606606
# with:
607607
# product: Firestore
608-
# is_legacy: true
609-
# setup_command: scripts/setup_quickstart.sh firestore
608+
# setup_command: scripts/setup_quickstart_spm.sh firestore
610609
# plist_src_path: scripts/gha-encrypted/qs-firestore.plist.gpg
611610
# plist_dst_path: quickstart-ios/firestore/GoogleService-Info.plist
612611
# run_tests: false

.github/workflows/functions.yml

Lines changed: 1 addition & 17 deletions
Original file line numberDiff line numberDiff line change
@@ -51,23 +51,7 @@ jobs:
5151
with:
5252
target: FirebaseFunctionsUnit
5353

54-
# TODO: The legacy quickstart uses material which doesn't build on Xcode 15.
55-
# quickstart:
56-
# uses: ./.github/workflows/common_quickstart.yml
57-
# strategy:
58-
# matrix:
59-
# quickstart_type: [objc, swift]
60-
# with:
61-
# product: Functions
62-
# is_legacy: true
63-
# setup_command: |
64-
# scripts/setup_quickstart.sh functions
65-
# sed -i '' 's/REVERSED_CLIENT_ID/com.googleusercontent.apps.1025801074639-6p6ebi8amuklcjrto20gvpe295smm8u6/' quickstart-ios/functions/LegacyFunctionsQuickstart/FunctionsExample/Info.plist
66-
# plist_src_path: scripts/gha-encrypted/qs-functions.plist.gpg
67-
# plist_dst_path: quickstart-ios/functions/GoogleService-Info.plist
68-
# quickstart_type: ${{ matrix.quickstart_type }}
69-
# secrets:
70-
# plist_secret: ${{ secrets.GHASecretsGPGPassphrase1 }}
54+
# TODO(ncooke3): Add a Functions quickstart test.
7155

7256
# quickstart-ftl-cron-only:
7357
# # Don't run on private repo

.github/workflows/inappmessaging.yml

Lines changed: 2 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -74,15 +74,11 @@ jobs:
7474

7575
quickstart:
7676
uses: ./.github/workflows/common_quickstart.yml
77-
strategy:
78-
matrix:
79-
quickstart_type: [objc, swift]
8077
with:
8178
product: InAppMessaging
82-
is_legacy: false
83-
quickstart_type: ${{ matrix.quickstart_type }}
84-
setup_command: scripts/setup_quickstart.sh inappmessaging
79+
setup_command: scripts/setup_quickstart_spm.sh inappmessaging
8580
plist_src_path: scripts/gha-encrypted/qs-inappmessaging.plist.gpg
8681
plist_dst_path: quickstart-ios/inappmessaging/GoogleService-Info.plist
82+
run_tests: false
8783
secrets:
8884
plist_secret: ${{ secrets.GHASecretsGPGPassphrase1 }}

.github/workflows/installations.yml

Lines changed: 1 addition & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -51,16 +51,11 @@ jobs:
5151

5252
quickstart:
5353
uses: ./.github/workflows/common_quickstart.yml
54-
strategy:
55-
matrix:
56-
quickstart_type: [objc, swift]
5754
with:
5855
product: Installations
59-
is_legacy: false
60-
setup_command: scripts/setup_quickstart.sh installations
56+
setup_command: scripts/setup_quickstart_spm.sh installations
6157
plist_src_path: scripts/gha-encrypted/Installations/GoogleService-Info.plist.gpg
6258
plist_dst_path: quickstart-ios/installations/GoogleService-Info.plist
63-
quickstart_type: ${{ matrix.quickstart_type }}
6459
secrets:
6560
plist_secret: ${{ secrets.GHASecretsGPGPassphrase1 }}
6661

.github/workflows/messaging.yml

Lines changed: 1 addition & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -83,14 +83,9 @@ jobs:
8383

8484
quickstart:
8585
uses: ./.github/workflows/common_quickstart.yml
86-
strategy:
87-
matrix:
88-
quickstart_type: [objc, swift]
8986
with:
9087
product: Messaging
91-
is_legacy: false
92-
quickstart_type: ${{ matrix.quickstart_type }}
93-
setup_command: scripts/setup_quickstart.sh messaging
88+
setup_command: scripts/setup_quickstart_spm.sh messaging
9489
plist_src_path: scripts/gha-encrypted/qs-messaging.plist.gpg
9590
plist_dst_path: quickstart-ios/messaging/GoogleService-Info.plist
9691
run_tests: false

0 commit comments

Comments
 (0)