Skip to content

Commit f6c34ab

Browse files
authored
Revert "infra: Migrate away from ObjC quickstarts" (#15508)
1 parent 436de0b commit f6c34ab

27 files changed

+424
-815
lines changed

.github/workflows/abtesting.yml

Lines changed: 8 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -45,9 +45,10 @@ jobs:
4545
uses: ./.github/workflows/common_quickstart.yml
4646
with:
4747
product: ABTesting
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
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
5152
secrets:
5253
plist_secret: ${{ secrets.GHASecretsGPGPassphrase1 }}
5354

@@ -65,13 +66,17 @@ jobs:
6566
with:
6667
python-version: '3.11'
6768
- name: Setup quickstart
69+
env:
70+
LEGACY: true
6871
run: scripts/setup_quickstart.sh abtesting
6972
- name: Install Secret GoogleService-Info.plist
7073
run: scripts/decrypt_gha_secret.sh scripts/gha-encrypted/qs-abtesting.plist.gpg \
7174
quickstart-ios/abtesting/GoogleService-Info.plist "$plist_secret"
7275
- name: Xcode
7376
run: sudo xcode-select -s /Applications/Xcode_16.4.app/Contents/Developer
7477
- name: Build swift quickstart
78+
env:
79+
LEGACY: true
7580
run: ([ -z $plist_secret ] || scripts/third_party/travis/retry.sh scripts/test_quickstart_ftl.sh ABTesting)
7681
- id: ftl_test
7782
uses: FirebaseExtended/github-actions/[email protected]

.github/workflows/auth.yml

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

.github/workflows/common_quickstart.yml

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

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

3837
# The path to the encrypted `GoogleService-Info.plist` file.
3938
plist_src_path:
@@ -45,6 +44,14 @@ on:
4544
type: string
4645
required: true
4746

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+
4855
# Whether to run tests or just build. Defaults to true.
4956
run_tests:
5057
type: boolean
@@ -61,18 +68,15 @@ on:
6168

6269
jobs:
6370
quickstart:
64-
name: quickstart (${{ inputs.product }})
6571
# Run on the main repo's scheduled jobs or pull requests and manual workflow invocations.
6672
if: (github.repository == 'firebase/firebase-ios-sdk' && github.event_name == 'schedule') || contains(fromJSON('["pull_request", "workflow_dispatch"]'), github.event_name)
6773
env:
6874
plist_secret: ${{ secrets.plist_secret }}
69-
QUICKSTART_BRANCH: ${{ inputs.quickstart_branch }}
75+
LEGACY: ${{ inputs.is_legacy && true || '' }}
7076
runs-on: macos-15
7177
steps:
7278
- uses: actions/checkout@v4
7379
- uses: ruby/setup-ruby@354a1ad156761f5ee2b7b13fa8e09943a5e8d252 # v1
74-
- name: Prereqs
75-
run: gem install xcpretty
7680
- name: Xcode
7781
run: sudo xcode-select -s /Applications/Xcode_16.4.app/Contents/Developer
7882
- name: Run setup command.
@@ -83,16 +87,17 @@ jobs:
8387
${{ inputs.plist_src_path }} \
8488
${{ inputs.plist_dst_path }} \
8589
"$plist_secret"
86-
- name: Build ${{ inputs.product }} Quickstart
90+
- name: Build ${{ inputs.product }} Quickstart (${{ inputs.quickstart_type }} / ${{ inputs.is_legacy && 'Legacy' || 'Non-Legacy' }})
8791
uses: nick-fields/retry@ce71cc2ab81d554ebbe88c79ab5975992d79ba08 # v3
8892
with:
8993
timeout_minutes: 15
9094
max_attempts: 3
9195
retry_wait_seconds: 120
9296
command: |
93-
SPM=true DIR=${{ inputs.product }} scripts/test_quickstart.sh \
97+
scripts/test_quickstart.sh \
9498
${{ inputs.product }} \
95-
${{ inputs.run_tests }}
99+
${{ inputs.run_tests }} \
100+
${{ inputs.quickstart_type }}
96101
# Failure sequence to upload artifact.
97102
- id: lowercase_product
98103
if: failure()

.github/workflows/crashlytics.yml

Lines changed: 16 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -47,7 +47,14 @@ jobs:
4747
uses: ./.github/workflows/common_quickstart.yml
4848
with:
4949
product: Crashlytics
50-
setup_command: scripts/setup_quickstart_spm.sh 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/
5158
plist_src_path: scripts/gha-encrypted/qs-crashlytics.plist.gpg
5259
plist_dst_path: quickstart-ios/crashlytics/GoogleService-Info.plist
5360
secrets:
@@ -70,12 +77,20 @@ jobs:
7077
run: sudo xcode-select -s /Applications/Xcode_16.4.app/Contents/Developer
7178
- name: Setup quickstart
7279
run: scripts/setup_quickstart.sh crashlytics
80+
env:
81+
LEGACY: true
7382
- name: Install Secret GoogleService-Info.plist
7483
run: scripts/decrypt_gha_secret.sh scripts/gha-encrypted/qs-crashlytics.plist.gpg \
7584
quickstart-ios/crashlytics/GoogleService-Info.plist "$plist_secret"
7685
- name: Build swift quickstart
7786
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/
7891
([ -z $plist_secret ] || scripts/third_party/travis/retry.sh scripts/test_quickstart_ftl.sh Crashlytics swift)
92+
env:
93+
LEGACY: true
7994
- id: ftl_test
8095
uses: FirebaseExtended/github-actions/[email protected]
8196
with:

.github/workflows/database.yml

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

7373
quickstart:
7474
uses: ./.github/workflows/common_quickstart.yml
75+
strategy:
76+
matrix:
77+
quickstart_type: [objc, swift]
7578
with:
7679
product: Database
77-
setup_command: scripts/setup_quickstart_spm.sh database
80+
is_legacy: false
81+
setup_command: scripts/setup_quickstart.sh database
7882
plist_src_path: scripts/gha-encrypted/qs-database.plist.gpg
7983
plist_dst_path: quickstart-ios/database/GoogleService-Info.plist
84+
quickstart_type: ${{ matrix.quickstart_type }}
8085
run_tests: false
8186
secrets:
8287
plist_secret: ${{ secrets.GHASecretsGPGPassphrase1 }}

.github/workflows/firestore.yml

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

.github/workflows/functions.yml

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

54-
# TODO(ncooke3): Add a Functions quickstart test.
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 }}
5571

5672
# quickstart-ftl-cron-only:
5773
# # Don't run on private repo

.github/workflows/inappmessaging.yml

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

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

.github/workflows/installations.yml

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

5252
quickstart:
5353
uses: ./.github/workflows/common_quickstart.yml
54+
strategy:
55+
matrix:
56+
quickstart_type: [objc, swift]
5457
with:
5558
product: Installations
56-
setup_command: scripts/setup_quickstart_spm.sh installations
59+
is_legacy: false
60+
setup_command: scripts/setup_quickstart.sh installations
5761
plist_src_path: scripts/gha-encrypted/Installations/GoogleService-Info.plist.gpg
5862
plist_dst_path: quickstart-ios/installations/GoogleService-Info.plist
63+
quickstart_type: ${{ matrix.quickstart_type }}
5964
secrets:
6065
plist_secret: ${{ secrets.GHASecretsGPGPassphrase1 }}
6166

.github/workflows/messaging.yml

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

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

0 commit comments

Comments
 (0)