From 9038ada66664c990d6cbeb4365e2067d14a0dddf Mon Sep 17 00:00:00 2001 From: Nick Cooke <36927374+ncooke3@users.noreply.github.com> Date: Mon, 22 Sep 2025 10:46:19 -0400 Subject: [PATCH 01/29] feat(infra): Add script to set up SPM-based quickstarts (#15338) Co-authored-by: gemini-code-assist[bot] <176961590+gemini-code-assist[bot]@users.noreply.github.com> --- .github/workflows/abtesting.yml | 108 ++++---- .github/workflows/auth.yml | 142 +++++------ .github/workflows/common_quickstart.yml | 25 +- .github/workflows/crashlytics.yml | 115 +++++---- .github/workflows/database.yml | 94 ++++--- .github/workflows/firestore.yml | 2 +- .github/workflows/inappmessaging.yml | 92 ++++--- .github/workflows/installations.yml | 132 +++++----- .github/workflows/messaging.yml | 326 ++++++++++++------------ .github/workflows/performance.yml | 155 ++++++----- .github/workflows/prerelease.yml | 24 +- .github/workflows/release.yml | 24 +- .github/workflows/remoteconfig.yml | 168 ++++++------ .github/workflows/storage.yml | 181 +++++++------ scripts/check_secrets.sh | 1 - scripts/setup_quickstart_spm.sh | 257 +++++++++++++++++++ scripts/test_quickstart.sh | 8 +- 17 files changed, 1017 insertions(+), 837 deletions(-) create mode 100755 scripts/setup_quickstart_spm.sh diff --git a/.github/workflows/abtesting.yml b/.github/workflows/abtesting.yml index 78327c72ca9..93ff19af73b 100644 --- a/.github/workflows/abtesting.yml +++ b/.github/workflows/abtesting.yml @@ -25,70 +25,70 @@ concurrency: cancel-in-progress: true jobs: - spm: - uses: ./.github/workflows/common.yml - with: - target: ABTestingUnit + # spm: + # uses: ./.github/workflows/common.yml + # with: + # target: ABTestingUnit - catalyst: - uses: ./.github/workflows/common_catalyst.yml - with: - product: FirebaseABTesting - target: FirebaseABTesting-Unit-unit + # catalyst: + # uses: ./.github/workflows/common_catalyst.yml + # with: + # product: FirebaseABTesting + # target: FirebaseABTesting-Unit-unit - pod_lib_lint: - uses: ./.github/workflows/common_cocoapods.yml - with: - product: FirebaseABTesting + # pod_lib_lint: + # uses: ./.github/workflows/common_cocoapods.yml + # with: + # product: FirebaseABTesting quickstart: 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 + setup_command: QUICKSTART_BRANCH=mc/spm scripts/setup_quickstart_spm.sh abtesting + plist_src_path: scripts/gha-encrypted/qs-abtesting.plist.gpg + plist_dst_path: quickstart-ios/abtesting/GoogleService-Info.plist secrets: plist_secret: ${{ secrets.GHASecretsGPGPassphrase1 }} - quickstart-ftl-cron-only: - # Don't run on private repo. - if: github.repository == 'Firebase/firebase-ios-sdk' && github.event_name == 'schedule' + # quickstart-ftl-cron-only: + # # Don't run on private repo. + # if: github.repository == 'Firebase/firebase-ios-sdk' && github.event_name == 'schedule' - env: - plist_secret: ${{ secrets.GHASecretsGPGPassphrase1 }} - runs-on: macos-15 - steps: - - uses: actions/checkout@v4 - - uses: ruby/setup-ruby@354a1ad156761f5ee2b7b13fa8e09943a5e8d252 # v1 - - uses: actions/setup-python@v5 - with: - python-version: '3.11' - - 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: Xcode - run: sudo xcode-select -s /Applications/Xcode_16.4.app/Contents/Developer - - name: Build swift quickstart - env: - LEGACY: true - run: ([ -z $plist_secret ] || scripts/third_party/travis/retry.sh scripts/test_quickstart_ftl.sh ABTesting) - - id: ftl_test - uses: FirebaseExtended/github-actions/firebase-test-lab@v1.4 - with: - credentials_json: ${{ secrets.FIREBASE_SERVICE_ACCOUNT_CREDENTIALS }} - testapp_dir: quickstart-ios/build-for-testing - test_type: "xctest" + # env: + # plist_secret: ${{ secrets.GHASecretsGPGPassphrase1 }} + # runs-on: macos-15 + # steps: + # - uses: actions/checkout@v4 + # - uses: ruby/setup-ruby@354a1ad156761f5ee2b7b13fa8e09943a5e8d252 # v1 + # - uses: actions/setup-python@v5 + # with: + # python-version: '3.11' + # - 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: Xcode + # run: sudo xcode-select -s /Applications/Xcode_16.4.app/Contents/Developer + # - name: Build swift quickstart + # env: + # LEGACY: true + # run: ([ -z $plist_secret ] || scripts/third_party/travis/retry.sh scripts/test_quickstart_ftl.sh ABTesting) + # - id: ftl_test + # uses: FirebaseExtended/github-actions/firebase-test-lab@v1.4 + # with: + # credentials_json: ${{ secrets.FIREBASE_SERVICE_ACCOUNT_CREDENTIALS }} + # testapp_dir: quickstart-ios/build-for-testing + # test_type: "xctest" - abtesting-cron-only: - needs: pod_lib_lint - uses: ./.github/workflows/common_cocoapods_cron.yml - with: - product: FirebaseABTesting - platforms: '[ "ios", "tvos", "macos" ]' - flags: '[ "--use-static-frameworks" ]' + # abtesting-cron-only: + # needs: pod_lib_lint + # uses: ./.github/workflows/common_cocoapods_cron.yml + # with: + # product: FirebaseABTesting + # platforms: '[ "ios", "tvos", "macos" ]' + # flags: '[ "--use-static-frameworks" ]' diff --git a/.github/workflows/auth.yml b/.github/workflows/auth.yml index 18fd32f04e9..5a323c339da 100644 --- a/.github/workflows/auth.yml +++ b/.github/workflows/auth.yml @@ -29,76 +29,76 @@ concurrency: cancel-in-progress: true jobs: - spm: - uses: ./.github/workflows/common.yml - with: - target: AuthUnit - buildonly_platforms: macOS + # spm: + # uses: ./.github/workflows/common.yml + # with: + # target: AuthUnit + # buildonly_platforms: macOS - catalyst: - uses: ./.github/workflows/common_catalyst.yml - with: - product: FirebaseAuth - target: FirebaseAuth-Unit-unit - buildonly: true + # catalyst: + # uses: ./.github/workflows/common_catalyst.yml + # with: + # product: FirebaseAuth + # target: FirebaseAuth-Unit-unit + # buildonly: true - pod_lib_lint: - strategy: - matrix: - product: [FirebaseAuthInterop, FirebaseAuth] - uses: ./.github/workflows/common_cocoapods.yml - with: - product: ${{ matrix.product }} - buildonly_platforms: macOS + # pod_lib_lint: + # strategy: + # matrix: + # product: [FirebaseAuthInterop, FirebaseAuth] + # uses: ./.github/workflows/common_cocoapods.yml + # with: + # product: ${{ matrix.product }} + # buildonly_platforms: macOS - integration-tests: - # 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' - needs: spm - strategy: - matrix: - scheme: [ObjCApiTests, SwiftApiTests, AuthenticationExampleUITests] - env: - plist_secret: ${{ secrets.GHASecretsGPGPassphrase1 }} - FIREBASECI_USE_LATEST_GOOGLEAPPMEASUREMENT: 1 - runs-on: macos-15 - steps: - - uses: actions/checkout@v4 - - uses: actions/cache/restore@v4 - with: - path: .build - key: ${{ needs.spm.outputs.cache_key }} - - name: Install Secrets - run: | - scripts/decrypt_gha_secret.sh scripts/gha-encrypted/AuthCredentials.h.gpg \ - FirebaseAuth/Tests/SampleSwift/ObjCApiTests/AuthCredentials.h "$plist_secret" - scripts/decrypt_gha_secret.sh scripts/gha-encrypted/AuthSample/SwiftApplication.plist.gpg \ - FirebaseAuth/Tests/SampleSwift/AuthenticationExample/SwiftApplication.plist "$plist_secret" - scripts/decrypt_gha_secret.sh scripts/gha-encrypted/AuthSample/AuthCredentials.h.gpg \ - FirebaseAuth/Tests/SampleSwift/AuthCredentials.h "$plist_secret" - scripts/decrypt_gha_secret.sh scripts/gha-encrypted/AuthSample/GoogleService-Info.plist.gpg \ - FirebaseAuth/Tests/SampleSwift/GoogleService-Info.plist "$plist_secret" - scripts/decrypt_gha_secret.sh scripts/gha-encrypted/AuthSample/GoogleService-Info_multi.plist.gpg \ - FirebaseAuth/Tests/SampleSwift/GoogleService-Info_multi.plist "$plist_secret" - scripts/decrypt_gha_secret.sh scripts/gha-encrypted/AuthSample/Sample.entitlements.gpg \ - FirebaseAuth/Tests/SampleSwift/Sample.entitlements "$plist_secret" - scripts/decrypt_gha_secret.sh scripts/gha-encrypted/AuthSample/Credentials.swift.gpg \ - FirebaseAuth/Tests/SampleSwift/SwiftApiTests/Credentials.swift "$plist_secret" - - name: Xcode - run: sudo xcode-select -s /Applications/Xcode_16.4.app/Contents/Developer - - uses: nick-fields/retry@ce71cc2ab81d554ebbe88c79ab5975992d79ba08 # v3 - with: - timeout_minutes: 15 - max_attempts: 3 - retry_wait_seconds: 120 - command: ([ -z $plist_secret ] || scripts/build.sh Auth iOS ${{ matrix.scheme }}) + # integration-tests: + # # 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' + # needs: spm + # strategy: + # matrix: + # scheme: [ObjCApiTests, SwiftApiTests, AuthenticationExampleUITests] + # env: + # plist_secret: ${{ secrets.GHASecretsGPGPassphrase1 }} + # FIREBASECI_USE_LATEST_GOOGLEAPPMEASUREMENT: 1 + # runs-on: macos-15 + # steps: + # - uses: actions/checkout@v4 + # - uses: actions/cache/restore@v4 + # with: + # path: .build + # key: ${{ needs.spm.outputs.cache_key }} + # - name: Install Secrets + # run: | + # scripts/decrypt_gha_secret.sh scripts/gha-encrypted/AuthCredentials.h.gpg \ + # FirebaseAuth/Tests/SampleSwift/ObjCApiTests/AuthCredentials.h "$plist_secret" + # scripts/decrypt_gha_secret.sh scripts/gha-encrypted/AuthSample/SwiftApplication.plist.gpg \ + # FirebaseAuth/Tests/SampleSwift/AuthenticationExample/SwiftApplication.plist "$plist_secret" + # scripts/decrypt_gha_secret.sh scripts/gha-encrypted/AuthSample/AuthCredentials.h.gpg \ + # FirebaseAuth/Tests/SampleSwift/AuthCredentials.h "$plist_secret" + # scripts/decrypt_gha_secret.sh scripts/gha-encrypted/AuthSample/GoogleService-Info.plist.gpg \ + # FirebaseAuth/Tests/SampleSwift/GoogleService-Info.plist "$plist_secret" + # scripts/decrypt_gha_secret.sh scripts/gha-encrypted/AuthSample/GoogleService-Info_multi.plist.gpg \ + # FirebaseAuth/Tests/SampleSwift/GoogleService-Info_multi.plist "$plist_secret" + # scripts/decrypt_gha_secret.sh scripts/gha-encrypted/AuthSample/Sample.entitlements.gpg \ + # FirebaseAuth/Tests/SampleSwift/Sample.entitlements "$plist_secret" + # scripts/decrypt_gha_secret.sh scripts/gha-encrypted/AuthSample/Credentials.swift.gpg \ + # FirebaseAuth/Tests/SampleSwift/SwiftApiTests/Credentials.swift "$plist_secret" + # - name: Xcode + # run: sudo xcode-select -s /Applications/Xcode_16.4.app/Contents/Developer + # - uses: nick-fields/retry@ce71cc2ab81d554ebbe88c79ab5975992d79ba08 # v3 + # with: + # timeout_minutes: 15 + # max_attempts: 3 + # retry_wait_seconds: 120 + # command: ([ -z $plist_secret ] || scripts/build.sh Auth iOS ${{ matrix.scheme }}) quickstart: uses: ./.github/workflows/common_quickstart.yml with: product: Authentication is_legacy: false - setup_command: scripts/setup_quickstart.sh authentication + setup_command: QUICKSTART_BRANCH=mc/spm scripts/setup_quickstart_spm.sh authentication plist_src_path: scripts/gha-encrypted/qs-authentication.plist.gpg plist_dst_path: quickstart-ios/authentication/GoogleService-Info.plist run_tests: false @@ -133,13 +133,13 @@ jobs: # testapp_dir: quickstart-ios/build-for-testing # test_type: "xctest" - auth-cron-only: - needs: pod_lib_lint - uses: ./.github/workflows/common_cocoapods_cron.yml - with: - product: FirebaseAuth - platforms: '[ "ios", "tvos --skip-tests", "macos --skip-tests", "watchos --skip-tests" ]' - flags: '[ "--use-static-frameworks" ]' - setup_command: scripts/configure_test_keychain.sh - secrets: - plist_secret: ${{ secrets.GHASecretsGPGPassphrase1 }} + # auth-cron-only: + # needs: pod_lib_lint + # uses: ./.github/workflows/common_cocoapods_cron.yml + # with: + # product: FirebaseAuth + # platforms: '[ "ios", "tvos --skip-tests", "macos --skip-tests", "watchos --skip-tests" ]' + # flags: '[ "--use-static-frameworks" ]' + # setup_command: scripts/configure_test_keychain.sh + # secrets: + # plist_secret: ${{ secrets.GHASecretsGPGPassphrase1 }} diff --git a/.github/workflows/common_quickstart.yml b/.github/workflows/common_quickstart.yml index a3f965796ea..7f2942f6649 100644 --- a/.github/workflows/common_quickstart.yml +++ b/.github/workflows/common_quickstart.yml @@ -44,14 +44,6 @@ on: 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 @@ -77,6 +69,8 @@ jobs: steps: - uses: actions/checkout@v4 - uses: ruby/setup-ruby@354a1ad156761f5ee2b7b13fa8e09943a5e8d252 # v1 + - name: Prereqs + run: gem install xcpretty - name: Xcode run: sudo xcode-select -s /Applications/Xcode_16.4.app/Contents/Developer - name: Run setup command. @@ -87,17 +81,16 @@ jobs: ${{ inputs.plist_src_path }} \ ${{ inputs.plist_dst_path }} \ "$plist_secret" - - name: Build ${{ inputs.product }} Quickstart (${{ inputs.quickstart_type }} / ${{ inputs.is_legacy && 'Legacy' || 'Non-Legacy' }}) + - name: Build ${{ inputs.product }} Quickstart (${{ 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 \ + SPM=true DIR=${{ inputs.product }} scripts/test_quickstart.sh \ ${{ inputs.product }} \ ${{ inputs.run_tests }} \ - ${{ inputs.quickstart_type }} # Failure sequence to upload artifact. - id: lowercase_product if: ${{ failure() }} @@ -107,8 +100,8 @@ jobs: - 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/ + # - uses: actions/upload-artifact@v4 + # if: ${{ failure() }} + # with: + # name: quickstart_artifacts_${{ steps.lowercase_product.outputs.lowercase_product }} + # path: quickstart-ios/ diff --git a/.github/workflows/crashlytics.yml b/.github/workflows/crashlytics.yml index dad83ff1202..9255eec50da 100644 --- a/.github/workflows/crashlytics.yml +++ b/.github/workflows/crashlytics.yml @@ -26,29 +26,28 @@ concurrency: cancel-in-progress: true jobs: - spm: - uses: ./.github/workflows/common.yml - with: - target: FirebaseCrashlyticsUnit + # spm: + # uses: ./.github/workflows/common.yml + # with: + # target: FirebaseCrashlyticsUnit - catalyst: - uses: ./.github/workflows/common_catalyst.yml - with: - product: FirebaseCrashlytics - target: FirebaseCrashlytics-Unit-unit + # catalyst: + # uses: ./.github/workflows/common_catalyst.yml + # with: + # product: FirebaseCrashlytics + # target: FirebaseCrashlytics-Unit-unit - pod_lib_lint: - uses: ./.github/workflows/common_cocoapods.yml - with: - product: FirebaseCrashlytics - buildonly_platforms: tvOS, macOS, watchOS + # pod_lib_lint: + # uses: ./.github/workflows/common_cocoapods.yml + # with: + # product: FirebaseCrashlytics + # buildonly_platforms: tvOS, macOS, watchOS quickstart: 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 @@ -60,48 +59,48 @@ jobs: secrets: plist_secret: ${{ secrets.GHASecretsGPGPassphrase1 }} - quickstart-ftl-cron-only: - # Don't run on private repo. - if: github.repository == 'Firebase/firebase-ios-sdk' && github.event_name == 'schedule' + # quickstart-ftl-cron-only: + # # Don't run on private repo. + # if: github.repository == 'Firebase/firebase-ios-sdk' && github.event_name == 'schedule' - env: - plist_secret: ${{ secrets.GHASecretsGPGPassphrase1 }} - runs-on: macos-15 - steps: - - uses: actions/checkout@v4 - - uses: ruby/setup-ruby@354a1ad156761f5ee2b7b13fa8e09943a5e8d252 # v1 - - uses: actions/setup-python@v5 - with: - python-version: '3.11' - - 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: Build swift quickstart - run: | - 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_ftl.sh Crashlytics swift) - env: - LEGACY: true - - id: ftl_test - uses: FirebaseExtended/github-actions/firebase-test-lab@v1.4 - with: - credentials_json: ${{ secrets.FIREBASE_SERVICE_ACCOUNT_CREDENTIALS }} - testapp_dir: quickstart-ios/build-for-testing - test_type: "xctest" + # env: + # plist_secret: ${{ secrets.GHASecretsGPGPassphrase1 }} + # runs-on: macos-15 + # steps: + # - uses: actions/checkout@v4 + # - uses: ruby/setup-ruby@354a1ad156761f5ee2b7b13fa8e09943a5e8d252 # v1 + # - uses: actions/setup-python@v5 + # with: + # python-version: '3.11' + # - 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: Build swift quickstart + # run: | + # 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_ftl.sh Crashlytics swift) + # env: + # LEGACY: true + # - id: ftl_test + # uses: FirebaseExtended/github-actions/firebase-test-lab@v1.4 + # with: + # credentials_json: ${{ secrets.FIREBASE_SERVICE_ACCOUNT_CREDENTIALS }} + # testapp_dir: quickstart-ios/build-for-testing + # test_type: "xctest" - crashlytics-cron-only: - needs: pod_lib_lint - uses: ./.github/workflows/common_cocoapods_cron.yml - with: - product: FirebaseCrashlytics - platforms: '[ "ios", "tvos", "macos", "watchos --skip-tests" ]' - flags: '[ "--use-static-frameworks", "--use-modular-headers --skip-tests" ]' + # crashlytics-cron-only: + # needs: pod_lib_lint + # uses: ./.github/workflows/common_cocoapods_cron.yml + # with: + # product: FirebaseCrashlytics + # platforms: '[ "ios", "tvos", "macos", "watchos --skip-tests" ]' + # flags: '[ "--use-static-frameworks", "--use-modular-headers --skip-tests" ]' diff --git a/.github/workflows/database.yml b/.github/workflows/database.yml index 04396da47ab..b5f63931a42 100644 --- a/.github/workflows/database.yml +++ b/.github/workflows/database.yml @@ -29,67 +29,63 @@ concurrency: cancel-in-progress: true jobs: - spm: - strategy: - matrix: - target: [DatabaseUnit, DatabaseUnitSwift] - uses: ./.github/workflows/common.yml - with: - target: ${{ matrix.target }} + # spm: + # strategy: + # matrix: + # target: [DatabaseUnit, DatabaseUnitSwift] + # uses: ./.github/workflows/common.yml + # with: + # target: ${{ matrix.target }} - catalyst: - uses: ./.github/workflows/common_catalyst.yml - with: - product: FirebaseDatabase - target: FirebaseDatabase-Unit-unit + # catalyst: + # uses: ./.github/workflows/common_catalyst.yml + # with: + # product: FirebaseDatabase + # target: FirebaseDatabase-Unit-unit - pod_lib_lint: - uses: ./.github/workflows/common_cocoapods.yml - with: - product: FirebaseDatabase - test_specs: unit - buildonly_platforms: macOS + # pod_lib_lint: + # uses: ./.github/workflows/common_cocoapods.yml + # with: + # product: FirebaseDatabase + # test_specs: unit + # buildonly_platforms: macOS - integration: - # 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' - runs-on: macos-15 - steps: - - uses: actions/checkout@v4 - - uses: mikehardy/buildcache-action@c87cea0ccd718971d6cc39e672c4f26815b6c126 - with: - cache_key: integration${{ matrix.os }} - - uses: ruby/setup-ruby@354a1ad156761f5ee2b7b13fa8e09943a5e8d252 # v1 - - name: Setup Bundler - run: scripts/setup_bundler.sh - - name: Install xcpretty - run: gem install xcpretty - - name: Xcode - run: sudo xcode-select -s /Applications/Xcode_16.4.app/Contents/Developer - - name: IntegrationTest - # Only iOS to mitigate flakes. - run: scripts/third_party/travis/retry.sh scripts/build.sh Database iOS integration + # integration: + # # 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' + # runs-on: macos-15 + # steps: + # - uses: actions/checkout@v4 + # - uses: mikehardy/buildcache-action@c87cea0ccd718971d6cc39e672c4f26815b6c126 + # with: + # cache_key: integration${{ matrix.os }} + # - uses: ruby/setup-ruby@354a1ad156761f5ee2b7b13fa8e09943a5e8d252 # v1 + # - name: Setup Bundler + # run: scripts/setup_bundler.sh + # - name: Install xcpretty + # run: gem install xcpretty + # - name: Xcode + # run: sudo xcode-select -s /Applications/Xcode_16.4.app/Contents/Developer + # - name: IntegrationTest + # # Only iOS to mitigate flakes. + # run: scripts/third_party/travis/retry.sh scripts/build.sh Database iOS integration quickstart: 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 + setup_command: QUICKSTART_BRANCH=mc/spm scripts/setup_quickstart_spm.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 }} - database-cron-only: - needs: pod_lib_lint - uses: ./.github/workflows/common_cocoapods_cron.yml - with: - product: FirebaseDatabase - platforms: '[ "ios", "tvos", "macos" ]' - flags: '[ "--skip-tests --use-static-frameworks" ]' + # database-cron-only: + # needs: pod_lib_lint + # uses: ./.github/workflows/common_cocoapods_cron.yml + # with: + # product: FirebaseDatabase + # platforms: '[ "ios", "tvos", "macos" ]' + # flags: '[ "--skip-tests --use-static-frameworks" ]' diff --git a/.github/workflows/firestore.yml b/.github/workflows/firestore.yml index 548153496f4..37fd1fae78a 100644 --- a/.github/workflows/firestore.yml +++ b/.github/workflows/firestore.yml @@ -606,7 +606,7 @@ jobs: # with: # product: Firestore # is_legacy: true - # setup_command: scripts/setup_quickstart.sh firestore + # setup_command: QUICKSTART_BRANCH=mc/spm scripts/setup_quickstart_spm.sh firestore # plist_src_path: scripts/gha-encrypted/qs-firestore.plist.gpg # plist_dst_path: quickstart-ios/firestore/GoogleService-Info.plist # run_tests: false diff --git a/.github/workflows/inappmessaging.yml b/.github/workflows/inappmessaging.yml index d0633743721..7727502c2eb 100644 --- a/.github/workflows/inappmessaging.yml +++ b/.github/workflows/inappmessaging.yml @@ -24,64 +24,60 @@ concurrency: cancel-in-progress: true jobs: - spm: - uses: ./.github/workflows/common.yml - with: - target: FirebaseInAppMessaging-Beta - platforms: iOS - buildonly_platforms: iOS + # spm: + # uses: ./.github/workflows/common.yml + # with: + # target: FirebaseInAppMessaging-Beta + # platforms: iOS + # buildonly_platforms: iOS - pod_lib_lint: - uses: ./.github/workflows/common_cocoapods.yml - with: - product: FirebaseInAppMessaging - platforms: iOS, tvOS + # pod_lib_lint: + # uses: ./.github/workflows/common_cocoapods.yml + # with: + # product: FirebaseInAppMessaging + # platforms: iOS, tvOS - tests: - # 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' + # tests: + # # 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' -# TODO(#12770): Update to macos-14 when tests are updated for Xcode 15. - runs-on: macos-15 - strategy: - matrix: -# TODO(#8682): Reenable iPad after fixing Xcode 13 test failures. -# platform: [iOS, iPad] - platform: [iOS] - xcode: [Xcode_16.4] - steps: - - uses: actions/checkout@v4 - - uses: mikehardy/buildcache-action@c87cea0ccd718971d6cc39e672c4f26815b6c126 - with: - cache_key: ${{ matrix.platform }} - - uses: ruby/setup-ruby@354a1ad156761f5ee2b7b13fa8e09943a5e8d252 # v1 - - name: Setup Bundler - run: scripts/setup_bundler.sh - - name: Xcode - run: sudo xcode-select -s /Applications/${{ matrix.xcode }}.app/Contents/Developer - - name: Prereqs - run: scripts/install_prereqs.sh InAppMessaging ${{ matrix.platform }} xcodebuild - - name: Build and test - run: scripts/third_party/travis/retry.sh scripts/build.sh InAppMessaging ${{ matrix.platform }} xcodebuild + # # TODO(#12770): Update to macos-14 when tests are updated for Xcode 15. + # runs-on: macos-15 + # strategy: + # matrix: + # # TODO(#8682): Reenable iPad after fixing Xcode 13 test failures. + # # platform: [iOS, iPad] + # platform: [iOS] + # xcode: [Xcode_16.4] + # steps: + # - uses: actions/checkout@v4 + # - uses: mikehardy/buildcache-action@c87cea0ccd718971d6cc39e672c4f26815b6c126 + # with: + # cache_key: ${{ matrix.platform }} + # - uses: ruby/setup-ruby@354a1ad156761f5ee2b7b13fa8e09943a5e8d252 # v1 + # - name: Setup Bundler + # run: scripts/setup_bundler.sh + # - name: Xcode + # run: sudo xcode-select -s /Applications/${{ matrix.xcode }}.app/Contents/Developer + # - name: Prereqs + # run: scripts/install_prereqs.sh InAppMessaging ${{ matrix.platform }} xcodebuild + # - name: Build and test + # run: scripts/third_party/travis/retry.sh scripts/build.sh InAppMessaging ${{ matrix.platform }} xcodebuild - fiam-cron-only: - needs: pod_lib_lint - uses: ./.github/workflows/common_cocoapods_cron.yml - with: - product: FirebaseInAppMessaging - platforms: '[ "ios", "tvos" ]' - flags: '[ "--use-static-frameworks" ]' + # fiam-cron-only: + # needs: pod_lib_lint + # uses: ./.github/workflows/common_cocoapods_cron.yml + # with: + # product: FirebaseInAppMessaging + # platforms: '[ "ios", "tvos" ]' + # flags: '[ "--use-static-frameworks" ]' quickstart: uses: ./.github/workflows/common_quickstart.yml - strategy: - matrix: - quickstart_type: [objc, swift] with: product: InAppMessaging is_legacy: false - quickstart_type: ${{ matrix.quickstart_type }} - setup_command: scripts/setup_quickstart.sh inappmessaging + setup_command: QUICKSTART_BRANCH=mc/spm scripts/setup_quickstart_spm.sh inappmessaging plist_src_path: scripts/gha-encrypted/qs-inappmessaging.plist.gpg plist_dst_path: quickstart-ios/inappmessaging/GoogleService-Info.plist secrets: diff --git a/.github/workflows/installations.yml b/.github/workflows/installations.yml index ff7fde15883..9850bb751b3 100644 --- a/.github/workflows/installations.yml +++ b/.github/workflows/installations.yml @@ -24,86 +24,82 @@ concurrency: cancel-in-progress: true jobs: - spm: - uses: ./.github/workflows/common.yml - with: - target: FirebaseInstallations - buildonly_platforms: all + # spm: + # uses: ./.github/workflows/common.yml + # with: + # target: FirebaseInstallations + # buildonly_platforms: all - catalyst: - uses: ./.github/workflows/common_catalyst.yml - with: - product: FirebaseInstallations - target: FirebaseInstallations-Unit-unit + # catalyst: + # uses: ./.github/workflows/common_catalyst.yml + # with: + # product: FirebaseInstallations + # target: FirebaseInstallations-Unit-unit - pod_lib_lint: - uses: ./.github/workflows/common_cocoapods.yml - with: - product: FirebaseInstallations - setup_command: | - scripts/configure_test_keychain.sh - mkdir -p FirebaseInstallations/Source/Tests/Resources - scripts/decrypt_gha_secret.sh scripts/gha-encrypted/Installations/GoogleService-Info.plist.gpg \ - FirebaseInstallations/Source/Tests/Resources/GoogleService-Info.plist "$plist_secret" - echo "FIS_INTEGRATION_TESTS_REQUIRED=1" >> $GITHUB_ENV - secrets: - plist_secret: ${{ secrets.GHASecretsGPGPassphrase1 }} + # pod_lib_lint: + # uses: ./.github/workflows/common_cocoapods.yml + # with: + # product: FirebaseInstallations + # setup_command: | + # scripts/configure_test_keychain.sh + # mkdir -p FirebaseInstallations/Source/Tests/Resources + # scripts/decrypt_gha_secret.sh scripts/gha-encrypted/Installations/GoogleService-Info.plist.gpg \ + # FirebaseInstallations/Source/Tests/Resources/GoogleService-Info.plist "$plist_secret" + # echo "FIS_INTEGRATION_TESTS_REQUIRED=1" >> $GITHUB_ENV + # secrets: + # plist_secret: ${{ secrets.GHASecretsGPGPassphrase1 }} quickstart: uses: ./.github/workflows/common_quickstart.yml - strategy: - matrix: - quickstart_type: [objc, swift] with: product: Installations is_legacy: false - setup_command: scripts/setup_quickstart.sh installations + setup_command: QUICKSTART_BRANCH=mc/spm scripts/setup_quickstart_spm.sh installations plist_src_path: scripts/gha-encrypted/Installations/GoogleService-Info.plist.gpg plist_dst_path: quickstart-ios/installations/GoogleService-Info.plist - quickstart_type: ${{ matrix.quickstart_type }} secrets: plist_secret: ${{ secrets.GHASecretsGPGPassphrase1 }} - quickstart-ftl-cron-only: - # Don't run on private repo. - if: github.repository == 'Firebase/firebase-ios-sdk' && github.event_name == 'schedule' + # quickstart-ftl-cron-only: + # # Don't run on private repo. + # if: github.repository == 'Firebase/firebase-ios-sdk' && github.event_name == 'schedule' - runs-on: macos-15 - steps: - - uses: actions/checkout@v4 - - uses: ruby/setup-ruby@354a1ad156761f5ee2b7b13fa8e09943a5e8d252 # v1 - - uses: actions/setup-python@v5 - with: - python-version: '3.11' - - name: Xcode - run: sudo xcode-select -s /Applications/Xcode_16.4.app/Contents/Developer - - name: Setup quickstart - run: scripts/setup_quickstart.sh installations - - name: Copy mock plist - run: cp quickstart-ios/mock-GoogleService-Info.plist quickstart-ios/installations/GoogleService-Info.plist - - name: Build objc quickstart - run: scripts/third_party/travis/retry.sh scripts/test_quickstart_ftl.sh Installations - - name: Build swift quickstart - run: scripts/third_party/travis/retry.sh scripts/test_quickstart_ftl.sh Installations swift - - id: ftl_test - uses: FirebaseExtended/github-actions/firebase-test-lab@v1.4 - with: - credentials_json: ${{ secrets.FIREBASE_SERVICE_ACCOUNT_CREDENTIALS }} - testapp_dir: quickstart-ios/build-for-testing - test_type: "xctest" + # runs-on: macos-15 + # steps: + # - uses: actions/checkout@v4 + # - uses: ruby/setup-ruby@354a1ad156761f5ee2b7b13fa8e09943a5e8d252 # v1 + # - uses: actions/setup-python@v5 + # with: + # python-version: '3.11' + # - name: Xcode + # run: sudo xcode-select -s /Applications/Xcode_16.4.app/Contents/Developer + # - name: Setup quickstart + # run: scripts/setup_quickstart.sh installations + # - name: Copy mock plist + # run: cp quickstart-ios/mock-GoogleService-Info.plist quickstart-ios/installations/GoogleService-Info.plist + # - name: Build objc quickstart + # run: scripts/third_party/travis/retry.sh scripts/test_quickstart_ftl.sh Installations + # - name: Build swift quickstart + # run: scripts/third_party/travis/retry.sh scripts/test_quickstart_ftl.sh Installations swift + # - id: ftl_test + # uses: FirebaseExtended/github-actions/firebase-test-lab@v1.4 + # with: + # credentials_json: ${{ secrets.FIREBASE_SERVICE_ACCOUNT_CREDENTIALS }} + # testapp_dir: quickstart-ios/build-for-testing + # test_type: "xctest" - installations-cron-only: - needs: pod_lib_lint - uses: ./.github/workflows/common_cocoapods_cron.yml - with: - product: FirebaseInstallations - platforms: '[ "ios", "tvos", "macos" ]' - flags: '[ "--use-static-frameworks" ]' - setup_command: | - scripts/configure_test_keychain.sh - mkdir -p FirebaseInstallations/Source/Tests/Resources - scripts/decrypt_gha_secret.sh scripts/gha-encrypted/Installations/GoogleService-Info.plist.gpg \ - FirebaseInstallations/Source/Tests/Resources/GoogleService-Info.plist "$plist_secret" - echo "FIS_INTEGRATION_TESTS_REQUIRED=1" >> $GITHUB_ENV - secrets: - plist_secret: ${{ secrets.GHASecretsGPGPassphrase1 }} + # installations-cron-only: + # needs: pod_lib_lint + # uses: ./.github/workflows/common_cocoapods_cron.yml + # with: + # product: FirebaseInstallations + # platforms: '[ "ios", "tvos", "macos" ]' + # flags: '[ "--use-static-frameworks" ]' + # setup_command: | + # scripts/configure_test_keychain.sh + # mkdir -p FirebaseInstallations/Source/Tests/Resources + # scripts/decrypt_gha_secret.sh scripts/gha-encrypted/Installations/GoogleService-Info.plist.gpg \ + # FirebaseInstallations/Source/Tests/Resources/GoogleService-Info.plist "$plist_secret" + # echo "FIS_INTEGRATION_TESTS_REQUIRED=1" >> $GITHUB_ENV + # secrets: + # plist_secret: ${{ secrets.GHASecretsGPGPassphrase1 }} diff --git a/.github/workflows/messaging.yml b/.github/workflows/messaging.yml index 993cfb543dd..1cf540ecfee 100644 --- a/.github/workflows/messaging.yml +++ b/.github/workflows/messaging.yml @@ -32,188 +32,184 @@ concurrency: cancel-in-progress: true jobs: - spm: - uses: ./.github/workflows/common.yml - with: - target: MessagingUnit - buildonly_platforms: tvOS, macOS, watchOS, catalyst, visionOS + # spm: + # uses: ./.github/workflows/common.yml + # with: + # target: MessagingUnit + # buildonly_platforms: tvOS, macOS, watchOS, catalyst, visionOS - catalyst: - uses: ./.github/workflows/common_catalyst.yml - with: - product: FirebaseMessaging - target: FirebaseMessaging-Unit-unit + # catalyst: + # uses: ./.github/workflows/common_catalyst.yml + # with: + # product: FirebaseMessaging + # target: FirebaseMessaging-Unit-unit - pod_lib_lint: - strategy: - matrix: - product: [FirebaseMessagingInterop, FirebaseMessaging] - uses: ./.github/workflows/common_cocoapods.yml - with: - product: ${{ matrix.product }} + # pod_lib_lint: + # strategy: + # matrix: + # product: [FirebaseMessagingInterop, FirebaseMessaging] + # uses: ./.github/workflows/common_cocoapods.yml + # with: + # product: ${{ matrix.product }} - # TODO(#12205) Update the build.sh script for this job from "test" instead of "build" - messaging-integration-tests: - # 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: mikehardy/buildcache-action@c87cea0ccd718971d6cc39e672c4f26815b6c126 - with: - cache_key: integration - - name: Configure test keychain - run: scripts/configure_test_keychain.sh - - uses: ruby/setup-ruby@354a1ad156761f5ee2b7b13fa8e09943a5e8d252 # v1 - - name: Xcode - run: sudo xcode-select -s /Applications/Xcode_16.4.app/Contents/Developer - - name: Setup Bundler - run: scripts/setup_bundler.sh - - name: Install xcpretty - run: gem install xcpretty - - name: Install Secret GoogleService-Info.plist - run: | - mkdir FirebaseMessaging/Tests/IntegrationTests/Resources - scripts/decrypt_gha_secret.sh scripts/gha-encrypted/messaging-sample-plist.gpg \ - FirebaseMessaging/Tests/IntegrationTests/Resources/GoogleService-Info.plist "$plist_secret" - - name: BuildAndTest - run: ([ -z $plist_secret ] || scripts/third_party/travis/retry.sh scripts/build.sh Messaging all) + # # TODO(#12205) Update the build.sh script for this job from "test" instead of "build" + # messaging-integration-tests: + # # 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: mikehardy/buildcache-action@c87cea0ccd718971d6cc39e672c4f26815b6c126 + # with: + # cache_key: integration + # - name: Configure test keychain + # run: scripts/configure_test_keychain.sh + # - uses: ruby/setup-ruby@354a1ad156761f5ee2b7b13fa8e09943a5e8d252 # v1 + # - name: Xcode + # run: sudo xcode-select -s /Applications/Xcode_16.4.app/Contents/Developer + # - name: Setup Bundler + # run: scripts/setup_bundler.sh + # - name: Install xcpretty + # run: gem install xcpretty + # - name: Install Secret GoogleService-Info.plist + # run: | + # mkdir FirebaseMessaging/Tests/IntegrationTests/Resources + # scripts/decrypt_gha_secret.sh scripts/gha-encrypted/messaging-sample-plist.gpg \ + # FirebaseMessaging/Tests/IntegrationTests/Resources/GoogleService-Info.plist "$plist_secret" + # - name: BuildAndTest + # run: ([ -z $plist_secret ] || scripts/third_party/travis/retry.sh scripts/build.sh Messaging all) quickstart: uses: ./.github/workflows/common_quickstart.yml - strategy: - matrix: - quickstart_type: [objc, swift] with: product: Messaging is_legacy: false - quickstart_type: ${{ matrix.quickstart_type }} - setup_command: scripts/setup_quickstart.sh messaging + setup_command: QUICKSTART_BRANCH=mc/spm scripts/setup_quickstart_spm.sh messaging plist_src_path: scripts/gha-encrypted/qs-messaging.plist.gpg plist_dst_path: quickstart-ios/messaging/GoogleService-Info.plist run_tests: false secrets: plist_secret: ${{ secrets.GHASecretsGPGPassphrase1 }} - quickstart-ftl-cron-only: - # Don't run on private repo. - if: github.repository == 'Firebase/firebase-ios-sdk' && github.event_name == 'schedule' - env: - plist_secret: ${{ secrets.GHASecretsGPGPassphrase1 }} - runs-on: macos-15 - steps: - - uses: actions/checkout@v4 - - uses: ruby/setup-ruby@354a1ad156761f5ee2b7b13fa8e09943a5e8d252 # v1 - - uses: actions/setup-python@v5 - with: - python-version: '3.11' - - name: Xcode - run: sudo xcode-select -s /Applications/Xcode_16.4.app/Contents/Developer - - name: Setup quickstart - run: scripts/setup_quickstart.sh messaging - - name: Install Secret GoogleService-Info.plist - run: scripts/decrypt_gha_secret.sh scripts/gha-encrypted/qs-messaging.plist.gpg \ - quickstart-ios/messaging/GoogleService-Info.plist "$plist_secret" - - name: Build objc quickstart - run: ([ -z $plist_secret ] || - scripts/third_party/travis/retry.sh scripts/test_quickstart_ftl.sh Messaging) - - name: Build swift quickstart - run: ([ -z $plist_secret ] || - scripts/third_party/travis/retry.sh scripts/test_quickstart_ftl.sh Messaging swift) - - id: ftl_test - uses: FirebaseExtended/github-actions/firebase-test-lab@v1.4 - with: - credentials_json: ${{ secrets.FIREBASE_SERVICE_ACCOUNT_CREDENTIALS }} - testapp_dir: quickstart-ios/build-for-testing - test_type: "xctest" + # quickstart-ftl-cron-only: + # # Don't run on private repo. + # if: github.repository == 'Firebase/firebase-ios-sdk' && github.event_name == 'schedule' + # env: + # plist_secret: ${{ secrets.GHASecretsGPGPassphrase1 }} + # runs-on: macos-15 + # steps: + # - uses: actions/checkout@v4 + # - uses: ruby/setup-ruby@354a1ad156761f5ee2b7b13fa8e09943a5e8d252 # v1 + # - uses: actions/setup-python@v5 + # with: + # python-version: '3.11' + # - name: Xcode + # run: sudo xcode-select -s /Applications/Xcode_16.4.app/Contents/Developer + # - name: Setup quickstart + # run: scripts/setup_quickstart.sh messaging + # - name: Install Secret GoogleService-Info.plist + # run: scripts/decrypt_gha_secret.sh scripts/gha-encrypted/qs-messaging.plist.gpg \ + # quickstart-ios/messaging/GoogleService-Info.plist "$plist_secret" + # - name: Build objc quickstart + # run: ([ -z $plist_secret ] || + # scripts/third_party/travis/retry.sh scripts/test_quickstart_ftl.sh Messaging) + # - name: Build swift quickstart + # run: ([ -z $plist_secret ] || + # scripts/third_party/travis/retry.sh scripts/test_quickstart_ftl.sh Messaging swift) + # - id: ftl_test + # uses: FirebaseExtended/github-actions/firebase-test-lab@v1.4 + # with: + # credentials_json: ${{ secrets.FIREBASE_SERVICE_ACCOUNT_CREDENTIALS }} + # testapp_dir: quickstart-ios/build-for-testing + # test_type: "xctest" - messaging-cron-only: - uses: ./.github/workflows/common_cocoapods_cron.yml - with: - product: FirebaseMessaging - platforms: '[ "ios", "tvos", "macos --skip-tests", "watchos --skip-tests" ]' - flags: '[ "--use-static-frameworks" ]' + # messaging-cron-only: + # uses: ./.github/workflows/common_cocoapods_cron.yml + # with: + # product: FirebaseMessaging + # platforms: '[ "ios", "tvos", "macos --skip-tests", "watchos --skip-tests" ]' + # flags: '[ "--use-static-frameworks" ]' - messaging-sample-build-test: - # 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: mikehardy/buildcache-action@c87cea0ccd718971d6cc39e672c4f26815b6c126 - with: - cache_key: sample${{ matrix.os }} - - uses: ruby/setup-ruby@354a1ad156761f5ee2b7b13fa8e09943a5e8d252 # v1 - - name: Xcode - run: sudo xcode-select -s /Applications/Xcode_16.4.app/Contents/Developer - - name: Setup Bundler - run: scripts/setup_bundler.sh - - name: Install Secret GoogleService-Info.plist - run: | - scripts/decrypt_gha_secret.sh scripts/gha-encrypted/messaging-sample-plist.gpg \ - FirebaseMessaging/Apps/Shared/GoogleService-Info.plist "$plist_secret" - - name: Prereqs - run: scripts/install_prereqs.sh MessagingSample iOS - - name: Build - run: ([ -z $plist_secret ] || scripts/build.sh MessagingSample iOS) + # messaging-sample-build-test: + # # 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: mikehardy/buildcache-action@c87cea0ccd718971d6cc39e672c4f26815b6c126 + # with: + # cache_key: sample${{ matrix.os }} + # - uses: ruby/setup-ruby@354a1ad156761f5ee2b7b13fa8e09943a5e8d252 # v1 + # - name: Xcode + # run: sudo xcode-select -s /Applications/Xcode_16.4.app/Contents/Developer + # - name: Setup Bundler + # run: scripts/setup_bundler.sh + # - name: Install Secret GoogleService-Info.plist + # run: | + # scripts/decrypt_gha_secret.sh scripts/gha-encrypted/messaging-sample-plist.gpg \ + # FirebaseMessaging/Apps/Shared/GoogleService-Info.plist "$plist_secret" + # - name: Prereqs + # run: scripts/install_prereqs.sh MessagingSample iOS + # - name: Build + # run: ([ -z $plist_secret ] || scripts/build.sh MessagingSample iOS) - messaging-swiftui-sample-build-test: - # 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: mikehardy/buildcache-action@c87cea0ccd718971d6cc39e672c4f26815b6c126 - with: - cache_key: sample${{ matrix.os }} - - uses: ruby/setup-ruby@354a1ad156761f5ee2b7b13fa8e09943a5e8d252 # v1 - - name: Setup Bundler - run: scripts/setup_bundler.sh - - name: Install Secret GoogleService-Info.plist - run: | - scripts/decrypt_gha_secret.sh scripts/gha-encrypted/messaging-sample-plist.gpg \ - FirebaseMessaging/Apps/Shared/GoogleService-Info.plist "$plist_secret" - - name: Prereqs - run: scripts/install_prereqs.sh SwiftUISample iOS - - name: Xcode - run: sudo xcode-select -s /Applications/Xcode_16.4.app/Contents/Developer - - name: Build - run: ([ -z $plist_secret ] || scripts/build.sh SwiftUISample iOS) + # messaging-swiftui-sample-build-test: + # # 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: mikehardy/buildcache-action@c87cea0ccd718971d6cc39e672c4f26815b6c126 + # with: + # cache_key: sample${{ matrix.os }} + # - uses: ruby/setup-ruby@354a1ad156761f5ee2b7b13fa8e09943a5e8d252 # v1 + # - name: Setup Bundler + # run: scripts/setup_bundler.sh + # - name: Install Secret GoogleService-Info.plist + # run: | + # scripts/decrypt_gha_secret.sh scripts/gha-encrypted/messaging-sample-plist.gpg \ + # FirebaseMessaging/Apps/Shared/GoogleService-Info.plist "$plist_secret" + # - name: Prereqs + # run: scripts/install_prereqs.sh SwiftUISample iOS + # - name: Xcode + # run: sudo xcode-select -s /Applications/Xcode_16.4.app/Contents/Developer + # - name: Build + # run: ([ -z $plist_secret ] || scripts/build.sh SwiftUISample iOS) - messaging-watchos-standalone-sample-build-test: - # 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: mikehardy/buildcache-action@c87cea0ccd718971d6cc39e672c4f26815b6c126 - with: - cache_key: watch-sample${{ matrix.os }} - - uses: ruby/setup-ruby@354a1ad156761f5ee2b7b13fa8e09943a5e8d252 # v1 - - name: Setup Bundler - run: scripts/setup_bundler.sh - - name: Install Secret GoogleService-Info.plist - run: | - scripts/decrypt_gha_secret.sh scripts/gha-encrypted/messaging-sample-plist.gpg \ - FirebaseMessaging/Apps/Shared/GoogleService-Info.plist "$plist_secret" - - name: Prereqs - run: scripts/install_prereqs.sh MessagingSampleStandaloneWatchApp watchOS - - name: Xcode - run: sudo xcode-select -s /Applications/Xcode_16.4.app/Contents/Developer - - name: Build - run: ([ -z $plist_secret ] || scripts/build.sh MessagingSampleStandaloneWatchApp watchOS) - - name: Upload xcodebuild logs - if: failure() - uses: actions/upload-artifact@v4 - with: - name: xcodebuild-logs-${{ matrix.target }} - path: xcodebuild-*.log + # messaging-watchos-standalone-sample-build-test: + # # 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: mikehardy/buildcache-action@c87cea0ccd718971d6cc39e672c4f26815b6c126 + # with: + # cache_key: watch-sample${{ matrix.os }} + # - uses: ruby/setup-ruby@354a1ad156761f5ee2b7b13fa8e09943a5e8d252 # v1 + # - name: Setup Bundler + # run: scripts/setup_bundler.sh + # - name: Install Secret GoogleService-Info.plist + # run: | + # scripts/decrypt_gha_secret.sh scripts/gha-encrypted/messaging-sample-plist.gpg \ + # FirebaseMessaging/Apps/Shared/GoogleService-Info.plist "$plist_secret" + # - name: Prereqs + # run: scripts/install_prereqs.sh MessagingSampleStandaloneWatchApp watchOS + # - name: Xcode + # run: sudo xcode-select -s /Applications/Xcode_16.4.app/Contents/Developer + # - name: Build + # run: ([ -z $plist_secret ] || scripts/build.sh MessagingSampleStandaloneWatchApp watchOS) + # - name: Upload xcodebuild logs + # if: failure() + # uses: actions/upload-artifact@v4 + # with: + # name: xcodebuild-logs-${{ matrix.target }} + # path: xcodebuild-*.log diff --git a/.github/workflows/performance.yml b/.github/workflows/performance.yml index 9d1f35594e6..efbdf10685f 100644 --- a/.github/workflows/performance.yml +++ b/.github/workflows/performance.yml @@ -33,50 +33,50 @@ concurrency: cancel-in-progress: true jobs: - spm: - uses: ./.github/workflows/common.yml - with: - target: PerformanceUnit - platforms: iOS, tvOS + # spm: + # uses: ./.github/workflows/common.yml + # with: + # target: PerformanceUnit + # platforms: iOS, tvOS - catalyst: - uses: ./.github/workflows/common_catalyst.yml - with: - product: FirebasePerformance - target: - buildonly: true + # catalyst: + # uses: ./.github/workflows/common_catalyst.yml + # with: + # product: FirebasePerformance + # target: + # buildonly: true - # Build and run the unit tests for Firebase performance SDK. - performance: - # 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' - runs-on: macos-15 - strategy: - matrix: - target: [iOS, tvOS] - test: [unit, proddev] - steps: - - uses: actions/checkout@v4 - - uses: mikehardy/buildcache-action@c87cea0ccd718971d6cc39e672c4f26815b6c126 - with: - cache_key: ${{ matrix.target }}${{ matrix.test }} - - uses: ruby/setup-ruby@354a1ad156761f5ee2b7b13fa8e09943a5e8d252 # v1 - - name: Xcode - run: sudo xcode-select -s /Applications/Xcode_16.4.app/Contents/Developer - - name: Setup Bundler - run: scripts/setup_bundler.sh - - name: Install xcpretty - run: gem install xcpretty - - name: BuildAndTest # can be replaced with pod lib lint with CocoaPods 1.10 - run: scripts/third_party/travis/retry.sh scripts/build.sh Performance ${{ matrix.target }} ${{ matrix.test }} + # # Build and run the unit tests for Firebase performance SDK. + # performance: + # # 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' + # runs-on: macos-15 + # strategy: + # matrix: + # target: [iOS, tvOS] + # test: [unit, proddev] + # steps: + # - uses: actions/checkout@v4 + # - uses: mikehardy/buildcache-action@c87cea0ccd718971d6cc39e672c4f26815b6c126 + # with: + # cache_key: ${{ matrix.target }}${{ matrix.test }} + # - uses: ruby/setup-ruby@354a1ad156761f5ee2b7b13fa8e09943a5e8d252 # v1 + # - name: Xcode + # run: sudo xcode-select -s /Applications/Xcode_16.4.app/Contents/Developer + # - name: Setup Bundler + # run: scripts/setup_bundler.sh + # - name: Install xcpretty + # run: gem install xcpretty + # - name: BuildAndTest # can be replaced with pod lib lint with CocoaPods 1.10 + # run: scripts/third_party/travis/retry.sh scripts/build.sh Performance ${{ matrix.target }} ${{ matrix.test }} - pod_lib_lint: - uses: ./.github/workflows/common_cocoapods.yml - with: - product: FirebasePerformance - platforms: iOS, tvOS - #TODO: tests are not supported with Xcode 15 because the test spec depends on the iOS 8 GDCWebServer - buildonly_platforms: iOS, tvOS + # pod_lib_lint: + # uses: ./.github/workflows/common_cocoapods.yml + # with: + # product: FirebasePerformance + # platforms: iOS, tvOS + # #TODO: tests are not supported with Xcode 15 because the test spec depends on the iOS 8 GDCWebServer + # buildonly_platforms: iOS, tvOS # TODO: The legacy ObjC quickstarts don't run with Xcode 15, re-able if we get these working. quickstart: @@ -84,47 +84,46 @@ jobs: with: product: Performance is_legacy: false - quickstart_type: swift - setup_command: scripts/setup_quickstart.sh performance + setup_command: QUICKSTART_BRANCH=mc/spm scripts/setup_quickstart_spm.sh performance plist_src_path: scripts/gha-encrypted/qs-performance.plist.gpg plist_dst_path: quickstart-ios/performance/GoogleService-Info.plist secrets: plist_secret: ${{ secrets.GHASecretsGPGPassphrase1 }} - quickstart-ftl-cron-only: - if: github.repository == 'Firebase/firebase-ios-sdk' && github.event_name == 'schedule' + # quickstart-ftl-cron-only: + # if: github.repository == 'Firebase/firebase-ios-sdk' && github.event_name == 'schedule' - env: - plist_secret: ${{ secrets.GHASecretsGPGPassphrase1 }} - runs-on: macos-15 - steps: - - uses: actions/checkout@v4 - - uses: ruby/setup-ruby@354a1ad156761f5ee2b7b13fa8e09943a5e8d252 # v1 - - uses: actions/setup-python@v5 - with: - python-version: '3.11' - - name: Xcode - run: sudo xcode-select -s /Applications/Xcode_16.4.app/Contents/Developer - - name: Setup quickstart - run: scripts/setup_quickstart.sh performance - - name: Install Secret GoogleService-Info.plist - run: scripts/decrypt_gha_secret.sh scripts/gha-encrypted/qs-performance.plist.gpg \ - quickstart-ios/performance/GoogleService-Info.plist "$plist_secret" - - name: Build swift quickstart - run: ([ -z $plist_secret ] || scripts/third_party/travis/retry.sh scripts/test_quickstart_ftl.sh Performance swift) - # - name: Build objc quickstart - # run: ([ -z $plist_secret ] || scripts/third_party/travis/retry.sh scripts/test_quickstart_ftl.sh Performance) - - id: ftl_test - uses: FirebaseExtended/github-actions/firebase-test-lab@v1.4 - with: - credentials_json: ${{ secrets.FIREBASE_SERVICE_ACCOUNT_CREDENTIALS }} - testapp_dir: quickstart-ios/build-for-testing - test_type: "xctest" + # env: + # plist_secret: ${{ secrets.GHASecretsGPGPassphrase1 }} + # runs-on: macos-15 + # steps: + # - uses: actions/checkout@v4 + # - uses: ruby/setup-ruby@354a1ad156761f5ee2b7b13fa8e09943a5e8d252 # v1 + # - uses: actions/setup-python@v5 + # with: + # python-version: '3.11' + # - name: Xcode + # run: sudo xcode-select -s /Applications/Xcode_16.4.app/Contents/Developer + # - name: Setup quickstart + # run: scripts/setup_quickstart.sh performance + # - name: Install Secret GoogleService-Info.plist + # run: scripts/decrypt_gha_secret.sh scripts/gha-encrypted/qs-performance.plist.gpg \ + # quickstart-ios/performance/GoogleService-Info.plist "$plist_secret" + # - name: Build swift quickstart + # run: ([ -z $plist_secret ] || scripts/third_party/travis/retry.sh scripts/test_quickstart_ftl.sh Performance swift) + # # - name: Build objc quickstart + # # run: ([ -z $plist_secret ] || scripts/third_party/travis/retry.sh scripts/test_quickstart_ftl.sh Performance) + # - id: ftl_test + # uses: FirebaseExtended/github-actions/firebase-test-lab@v1.4 + # with: + # credentials_json: ${{ secrets.FIREBASE_SERVICE_ACCOUNT_CREDENTIALS }} + # testapp_dir: quickstart-ios/build-for-testing + # test_type: "xctest" - performance-cron-only: - needs: pod_lib_lint - uses: ./.github/workflows/common_cocoapods_cron.yml - with: - product: FirebasePerformance - platforms: '[ "ios", "tvos" ]' - flags: '[ "--skip-tests --use-static-frameworks" ]' + # performance-cron-only: + # needs: pod_lib_lint + # uses: ./.github/workflows/common_cocoapods_cron.yml + # with: + # product: FirebasePerformance + # platforms: '[ "ios", "tvos" ]' + # flags: '[ "--skip-tests --use-static-frameworks" ]' diff --git a/.github/workflows/prerelease.yml b/.github/workflows/prerelease.yml index b87499a0fc4..1de043c598f 100644 --- a/.github/workflows/prerelease.yml +++ b/.github/workflows/prerelease.yml @@ -262,36 +262,24 @@ jobs: include: - product: Performance run_tests: true - swift: true - product: Storage is_legacy: true run_tests: true - swift: true - product: Config run_tests: true - objc: true - product: Messaging run_tests: false - swift: true - objc: true - product: InAppMessaging run_tests: true - swift: true - objc: true - product: Firestore run_tests: false - product: Database run_tests: false - swift: true - objc: true - product: Authentication run_tests: false - objc: true - product: Crashlytics is_legacy: true run_tests: true - objc: false - swift: true setup_command: | mkdir -p quickstart-ios/crashlytics/LegacyCrashlyticsQuickstart/Pods/FirebaseCrashlytics # Set the deployed pod location of run and upload-symbols with the development pod version. @@ -300,7 +288,6 @@ jobs: - product: ABTesting is_legacy: true run_tests: true - objc: true env: plist_secret: ${{ secrets.GHASecretsGPGPassphrase1 }} botaccess: ${{ secrets.PRERELEASE_TESTING_PAT }} @@ -322,16 +309,7 @@ jobs: - name: Run setup command, if needed. if: matrix.setup_command != '' run: ${{ matrix.setup_command }} - - name: Build Swift quickstart - if: matrix.swift == true - uses: nick-fields/retry@ce71cc2ab81d554ebbe88c79ab5975992d79ba08 # v3 - with: - timeout_minutes: 15 - max_attempts: 3 - retry_wait_seconds: 120 - command: scripts/test_quickstart.sh ${{ matrix.product }} ${{ matrix.run_tests }} swift - - name: Build Obj-C quickstart - if: matrix.objc == true + - name: Build Quickstart uses: nick-fields/retry@ce71cc2ab81d554ebbe88c79ab5975992d79ba08 # v3 with: timeout_minutes: 15 diff --git a/.github/workflows/release.yml b/.github/workflows/release.yml index 32c40274ecc..7441a5a5dba 100644 --- a/.github/workflows/release.yml +++ b/.github/workflows/release.yml @@ -162,35 +162,23 @@ jobs: include: - product: Performance run_tests: true - swift: true - product: Storage run_tests: true - swift: true is_legacy: true - product: Config run_tests: true - objc: true - product: Messaging run_tests: false - objc: true - swift: true - product: InAppMessaging run_tests: true - objc: true - swift: true - product: Firestore run_tests: false - objc: true - product: Database run_tests: false - objc: true - swift: true - product: Authentication run_tests: false - objc: true - product: Crashlytics run_tests: true - swift: true is_legacy: true setup_command: | mkdir -p quickstart-ios/crashlytics/LegacyCrashlyticsQuickstart/Pods/FirebaseCrashlytics @@ -199,7 +187,6 @@ jobs: cp Crashlytics/upload-symbols quickstart-ios/crashlytics/LegacyCrashlyticsQuickstart/Pods/FirebaseCrashlytics/ - product: ABTesting run_tests: true - objc: true is_legacy: true env: plist_secret: ${{ secrets.GHASecretsGPGPassphrase1 }} @@ -220,22 +207,13 @@ jobs: - name: Run setup command, if needed. if: matrix.setup_command != '' run: ${{ matrix.setup_command }} - - name: Build Obj-C quickstart - if: matrix.objc == true + - name: Build Quickstart uses: nick-fields/retry@ce71cc2ab81d554ebbe88c79ab5975992d79ba08 # v3 with: timeout_minutes: 15 max_attempts: 3 retry_wait_seconds: 120 command: scripts/test_quickstart.sh ${{ matrix.product }} ${{ matrix.run_tests }} - - name: Build Swift quickstart - if: matrix.swift == true - uses: nick-fields/retry@ce71cc2ab81d554ebbe88c79ab5975992d79ba08 # v3 - with: - timeout_minutes: 15 - max_attempts: 3 - retry_wait_seconds: 120 - command: scripts/test_quickstart.sh ${{ matrix.product }} ${{ matrix.run_tests }} swift - name: Remove data before upload if: ${{ failure() }} run: scripts/remove_data.sh ${{ matrix.product }} diff --git a/.github/workflows/remoteconfig.yml b/.github/workflows/remoteconfig.yml index 9d6fe55f330..a5cd9744c29 100644 --- a/.github/workflows/remoteconfig.yml +++ b/.github/workflows/remoteconfig.yml @@ -27,75 +27,75 @@ concurrency: cancel-in-progress: true jobs: - spm_1: - uses: ./.github/workflows/common.yml - with: - target: RemoteConfigUnit + # spm_1: + # uses: ./.github/workflows/common.yml + # with: + # target: RemoteConfigUnit - spm_2: - uses: ./.github/workflows/common.yml - with: - target: RemoteConfigFakeConsole - buildonly_platforms: watchOS + # spm_2: + # uses: ./.github/workflows/common.yml + # with: + # target: RemoteConfigFakeConsole + # buildonly_platforms: watchOS - catalyst: - uses: ./.github/workflows/common_catalyst.yml - with: - product: FirebaseRemoteConfig - target: FirebaseRemoteConfig-Unit-unit + # catalyst: + # uses: ./.github/workflows/common_catalyst.yml + # with: + # product: FirebaseRemoteConfig + # target: FirebaseRemoteConfig-Unit-unit - remoteconfig: - # 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 }} - USE_REAL_CONSOLE: true - runs-on: macos-15 - strategy: - matrix: - target: [iOS] - steps: - - uses: actions/checkout@v4 - - uses: mikehardy/buildcache-action@c87cea0ccd718971d6cc39e672c4f26815b6c126 - with: - cache_key: rc${{ matrix.target }} - - uses: ruby/setup-ruby@354a1ad156761f5ee2b7b13fa8e09943a5e8d252 # v1 - - name: Setup Bundler - run: scripts/setup_bundler.sh - - name: Install xcpretty - run: gem install xcpretty - - name: Install Secret GoogleService-Info.plist - run: scripts/decrypt_gha_secret.sh scripts/gha-encrypted/RemoteConfigSwiftAPI/GoogleService-Info.plist.gpg \ - FirebaseRemoteConfig/Tests/Swift/SwiftAPI/GoogleService-Info.plist "$plist_secret" - - name: Generate Access Token for RemoteConfigConsoleAPI in IntegrationTests - if: matrix.target == 'iOS' - run: ([ -z $plist_secret ] || scripts/generate_access_token.sh "$plist_secret" scripts/gha-encrypted/RemoteConfigSwiftAPI/ServiceAccount.json.gpg - FirebaseRemoteConfig/Tests/Swift/AccessToken.json) - - name: Xcode - run: sudo xcode-select -s /Applications/Xcode_16.4.app/Contents/Developer - - name: Fake Console API Tests - uses: nick-fields/retry@ce71cc2ab81d554ebbe88c79ab5975992d79ba08 # v3 - with: - timeout_minutes: 15 - max_attempts: 3 - retry_wait_seconds: 120 - command: scripts/build.sh RemoteConfig ${{ matrix.target }} fakeconsole - - name: IntegrationTest - if: matrix.target == 'iOS' - # No retry to avoid exhausting AccessToken quota. - run: ([ -z $plist_secret ] || scripts/build.sh RemoteConfig iOS integration) + # remoteconfig: + # # 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 }} + # USE_REAL_CONSOLE: true + # runs-on: macos-15 + # strategy: + # matrix: + # target: [iOS] + # steps: + # - uses: actions/checkout@v4 + # - uses: mikehardy/buildcache-action@c87cea0ccd718971d6cc39e672c4f26815b6c126 + # with: + # cache_key: rc${{ matrix.target }} + # - uses: ruby/setup-ruby@354a1ad156761f5ee2b7b13fa8e09943a5e8d252 # v1 + # - name: Setup Bundler + # run: scripts/setup_bundler.sh + # - name: Install xcpretty + # run: gem install xcpretty + # - name: Install Secret GoogleService-Info.plist + # run: scripts/decrypt_gha_secret.sh scripts/gha-encrypted/RemoteConfigSwiftAPI/GoogleService-Info.plist.gpg \ + # FirebaseRemoteConfig/Tests/Swift/SwiftAPI/GoogleService-Info.plist "$plist_secret" + # - name: Generate Access Token for RemoteConfigConsoleAPI in IntegrationTests + # if: matrix.target == 'iOS' + # run: ([ -z $plist_secret ] || scripts/generate_access_token.sh "$plist_secret" scripts/gha-encrypted/RemoteConfigSwiftAPI/ServiceAccount.json.gpg + # FirebaseRemoteConfig/Tests/Swift/AccessToken.json) + # - name: Xcode + # run: sudo xcode-select -s /Applications/Xcode_16.4.app/Contents/Developer + # - name: Fake Console API Tests + # uses: nick-fields/retry@ce71cc2ab81d554ebbe88c79ab5975992d79ba08 # v3 + # with: + # timeout_minutes: 15 + # max_attempts: 3 + # retry_wait_seconds: 120 + # command: scripts/build.sh RemoteConfig ${{ matrix.target }} fakeconsole + # - name: IntegrationTest + # if: matrix.target == 'iOS' + # # No retry to avoid exhausting AccessToken quota. + # run: ([ -z $plist_secret ] || scripts/build.sh RemoteConfig iOS integration) - pod_lib_lint: - uses: ./.github/workflows/common_cocoapods.yml - with: - product: FirebaseRemoteConfig + # pod_lib_lint: + # uses: ./.github/workflows/common_cocoapods.yml + # with: + # product: FirebaseRemoteConfig quickstart: uses: ./.github/workflows/common_quickstart.yml with: product: Config is_legacy: false - setup_command: scripts/setup_quickstart.sh config + setup_command: QUICKSTART_BRANCH=mc/spm scripts/setup_quickstart_spm.sh config plist_src_path: scripts/gha-encrypted/qs-config.plist.gpg plist_dst_path: quickstart-ios/config/GoogleService-Info.plist secrets: @@ -128,29 +128,29 @@ jobs: # testapp_dir: quickstart-ios/build-for-testing # test_type: "xctest" - sample-build-test: - # 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' - runs-on: macos-15 - steps: - - uses: actions/checkout@v4 - - uses: mikehardy/buildcache-action@c87cea0ccd718971d6cc39e672c4f26815b6c126 - with: - cache_key: build-test - - uses: ruby/setup-ruby@354a1ad156761f5ee2b7b13fa8e09943a5e8d252 # v1 - - name: Setup Bundler - run: scripts/setup_bundler.sh - - name: Xcode - run: sudo xcode-select -s /Applications/Xcode_16.4.app/Contents/Developer - - name: Prereqs - run: scripts/install_prereqs.sh RemoteConfigSample iOS - - name: Build - run: scripts/build.sh RemoteConfigSample iOS + # sample-build-test: + # # 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' + # runs-on: macos-15 + # steps: + # - uses: actions/checkout@v4 + # - uses: mikehardy/buildcache-action@c87cea0ccd718971d6cc39e672c4f26815b6c126 + # with: + # cache_key: build-test + # - uses: ruby/setup-ruby@354a1ad156761f5ee2b7b13fa8e09943a5e8d252 # v1 + # - name: Setup Bundler + # run: scripts/setup_bundler.sh + # - name: Xcode + # run: sudo xcode-select -s /Applications/Xcode_16.4.app/Contents/Developer + # - name: Prereqs + # run: scripts/install_prereqs.sh RemoteConfigSample iOS + # - name: Build + # run: scripts/build.sh RemoteConfigSample iOS - remoteconfig-cron-only: - needs: pod_lib_lint - uses: ./.github/workflows/common_cocoapods_cron.yml - with: - product: FirebaseRemoteConfig - platforms: '[ "ios", "tvos", "macos" ]' - flags: '[ "--skip-tests --use-static-frameworks" ]' + # remoteconfig-cron-only: + # needs: pod_lib_lint + # uses: ./.github/workflows/common_cocoapods_cron.yml + # with: + # product: FirebaseRemoteConfig + # platforms: '[ "ios", "tvos", "macos" ]' + # flags: '[ "--skip-tests --use-static-frameworks" ]' diff --git a/.github/workflows/storage.yml b/.github/workflows/storage.yml index 12bbb9bf86d..b310e3aa47f 100644 --- a/.github/workflows/storage.yml +++ b/.github/workflows/storage.yml @@ -26,111 +26,110 @@ concurrency: cancel-in-progress: true jobs: - spm: - uses: ./.github/workflows/common.yml - with: - target: FirebaseStorageUnit + # spm: + # uses: ./.github/workflows/common.yml + # with: + # target: FirebaseStorageUnit - catalyst: - uses: ./.github/workflows/common_catalyst.yml - with: - product: FirebaseStorage - target: FirebaseStorage-Unit-unit + # catalyst: + # uses: ./.github/workflows/common_catalyst.yml + # with: + # product: FirebaseStorage + # target: FirebaseStorage-Unit-unit - storage-integration-tests: - # 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' - strategy: - matrix: - language: [Swift, ObjC] - include: - - os: macos-15 - xcode: Xcode_16.4 - env: - plist_secret: ${{ secrets.GHASecretsGPGPassphrase1 }} - runs-on: ${{ matrix.os }} - steps: - - uses: actions/checkout@v4 - - uses: mikehardy/buildcache-action@c87cea0ccd718971d6cc39e672c4f26815b6c126 - with: - cache_key: integration${{ matrix.os }} - - uses: ruby/setup-ruby@354a1ad156761f5ee2b7b13fa8e09943a5e8d252 # v1 - - name: Setup Bundler - run: scripts/setup_bundler.sh - - name: Install xcpretty - run: gem install xcpretty - - name: Install Secret GoogleService-Info.plist - run: scripts/decrypt_gha_secret.sh scripts/gha-encrypted/storage-db-plist.gpg \ - FirebaseStorage/Tests/Integration/Resources/GoogleService-Info.plist "$plist_secret" - - name: Install Credentials.h - run: scripts/decrypt_gha_secret.sh scripts/gha-encrypted/Storage/Credentials.h.gpg \ - FirebaseStorage/Tests/ObjCIntegration/Credentials.h "$plist_secret" - - name: Install Credentials.swift - run: | - scripts/decrypt_gha_secret.sh scripts/gha-encrypted/Storage/Credentials.swift.gpg \ - FirebaseStorage/Tests/Integration/Credentials.swift "$plist_secret" - - name: Xcode - run: sudo xcode-select -s /Applications/${{ matrix.xcode }}.app/Contents/Developer - - uses: nick-fields/retry@ce71cc2ab81d554ebbe88c79ab5975992d79ba08 # v3 - with: - timeout_minutes: 15 - max_attempts: 3 - retry_wait_seconds: 120 - command: ([ -z $plist_secret ] || scripts/build.sh Storage${{ matrix.language }} all) + # storage-integration-tests: + # # 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' + # strategy: + # matrix: + # language: [Swift, ObjC] + # include: + # - os: macos-15 + # xcode: Xcode_16.4 + # env: + # plist_secret: ${{ secrets.GHASecretsGPGPassphrase1 }} + # runs-on: ${{ matrix.os }} + # steps: + # - uses: actions/checkout@v4 + # - uses: mikehardy/buildcache-action@c87cea0ccd718971d6cc39e672c4f26815b6c126 + # with: + # cache_key: integration${{ matrix.os }} + # - uses: ruby/setup-ruby@354a1ad156761f5ee2b7b13fa8e09943a5e8d252 # v1 + # - name: Setup Bundler + # run: scripts/setup_bundler.sh + # - name: Install xcpretty + # run: gem install xcpretty + # - name: Install Secret GoogleService-Info.plist + # run: scripts/decrypt_gha_secret.sh scripts/gha-encrypted/storage-db-plist.gpg \ + # FirebaseStorage/Tests/Integration/Resources/GoogleService-Info.plist "$plist_secret" + # - name: Install Credentials.h + # run: scripts/decrypt_gha_secret.sh scripts/gha-encrypted/Storage/Credentials.h.gpg \ + # FirebaseStorage/Tests/ObjCIntegration/Credentials.h "$plist_secret" + # - name: Install Credentials.swift + # run: |\ + # scripts/decrypt_gha_secret.sh scripts/gha-encrypted/Storage/Credentials.swift.gpg \ + # FirebaseStorage/Tests/Integration/Credentials.swift "$plist_secret" + # - name: Xcode + # run: sudo xcode-select -s /Applications/${{ matrix.xcode }}.app/Contents/Developer + # - uses: nick-fields/retry@ce71cc2ab81d554ebbe88c79ab5975992d79ba08 # v3 + # with: + # timeout_minutes: 15 + # max_attempts: 3 + # retry_wait_seconds: 120 + # command: ([ -z $plist_secret ] || scripts/build.sh Storage${{ matrix.language }} all) quickstart: # TODO: See #12399 and restore Objective-C testing for Xcode 15 if GHA is fixed. uses: ./.github/workflows/common_quickstart.yml with: product: Storage - quickstart_type: swift is_legacy: true - setup_command: scripts/setup_quickstart.sh storage + setup_command: QUICKSTART_BRANCH=mc/spm scripts/setup_quickstart_spm.sh storage plist_src_path: scripts/gha-encrypted/qs-storage.plist.gpg plist_dst_path: quickstart-ios/storage/GoogleService-Info.plist run_tests: false secrets: plist_secret: ${{ secrets.GHASecretsGPGPassphrase1 }} - quickstart-ftl-cron-only: - # Don't run on private repo. - if: github.repository == 'Firebase/firebase-ios-sdk' && github.event_name == 'schedule' - env: - plist_secret: ${{ secrets.GHASecretsGPGPassphrase1 }} - LEGACY: true - runs-on: macos-15 - steps: - - uses: actions/checkout@v4 - - uses: ruby/setup-ruby@354a1ad156761f5ee2b7b13fa8e09943a5e8d252 # v1 - - uses: actions/setup-python@v5 - with: - python-version: '3.11' - - name: Setup quickstart - run: scripts/setup_quickstart.sh storage - - name: Install Secret GoogleService-Info.plist - run: scripts/decrypt_gha_secret.sh scripts/gha-encrypted/qs-storage.plist.gpg \ - quickstart-ios/storage/GoogleService-Info.plist "$plist_secret" - # - name: Build objc quickstart - # run: ([ -z $plist_secret ] || scripts/third_party/travis/retry.sh scripts/test_quickstart_ftl.sh Storage) - - name: Build swift quickstart - run: ([ -z $plist_secret ] || scripts/third_party/travis/retry.sh scripts/test_quickstart_ftl.sh Storage swift) - - id: ftl_test - uses: FirebaseExtended/github-actions/firebase-test-lab@v1.4 - with: - credentials_json: ${{ secrets.FIREBASE_SERVICE_ACCOUNT_CREDENTIALS }} - testapp_dir: quickstart-ios/build-for-testing - test_type: "xctest" + # quickstart-ftl-cron-only: + # # Don't run on private repo. + # if: github.repository == 'Firebase/firebase-ios-sdk' && github.event_name == 'schedule' + # env: + # plist_secret: ${{ secrets.GHASecretsGPGPassphrase1 }} + # LEGACY: true + # runs-on: macos-15 + # steps: + # - uses: actions/checkout@v4 + # - uses: ruby/setup-ruby@354a1ad156761f5ee2b7b13fa8e09943a5e8d252 # v1 + # - uses: actions/setup-python@v5 + # with: + # python-version: '3.11' + # - name: Setup quickstart + # run: scripts/setup_quickstart.sh storage + # - name: Install Secret GoogleService-Info.plist + # run: scripts/decrypt_gha_secret.sh scripts/gha-encrypted/qs-storage.plist.gpg \ + # quickstart-ios/storage/GoogleService-Info.plist "$plist_secret" + # # - name: Build objc quickstart + # # run: ([ -z $plist_secret ] || scripts/third_party/travis/retry.sh scripts/test_quickstart_ftl.sh Storage) + # - name: Build swift quickstart + # run: ([ -z $plist_secret ] || scripts/third_party/travis/retry.sh scripts/test_quickstart_ftl.sh Storage swift) + # - id: ftl_test + # uses: FirebaseExtended/github-actions/firebase-test-lab@v1.4 + # with: + # credentials_json: ${{ secrets.FIREBASE_SERVICE_ACCOUNT_CREDENTIALS }} + # testapp_dir: quickstart-ios/build-for-testing + # test_type: "xctest" - pod_lib_lint: - uses: ./.github/workflows/common_cocoapods.yml - with: - product: FirebaseStorage - test_specs: unit + # pod_lib_lint: + # uses: ./.github/workflows/common_cocoapods.yml + # with: + # product: FirebaseStorage + # test_specs: unit - storage-cron-only: - needs: pod_lib_lint - uses: ./.github/workflows/common_cocoapods_cron.yml - with: - product: FirebaseStorage - platforms: '[ "ios", "tvos", "macos", "watchos" ]' - flags: '[ "--use-static-frameworks --skip-tests" ]' + # storage-cron-only: + # needs: pod_lib_lint + # uses: ./.github/workflows/common_cocoapods_cron.yml + # with: + # product: FirebaseStorage + # platforms: '[ "ios", "tvos", "macos", "watchos" ]' + # flags: '[ "--use-static-frameworks --skip-tests" ]' diff --git a/scripts/check_secrets.sh b/scripts/check_secrets.sh index 4db1540f00c..ea289feb4b4 100755 --- a/scripts/check_secrets.sh +++ b/scripts/check_secrets.sh @@ -17,7 +17,6 @@ # Check if secrets are available for multiple CI's -set -x echo "GITHUB_BASE_REF: ${GITHUB_BASE_REF:-}" echo "GITHUB_HEAD_REF: ${GITHUB_HEAD_REF:-}" diff --git a/scripts/setup_quickstart_spm.sh b/scripts/setup_quickstart_spm.sh new file mode 100755 index 00000000000..4c3145e2d33 --- /dev/null +++ b/scripts/setup_quickstart_spm.sh @@ -0,0 +1,257 @@ +#!/usr/bin/env bash + +# Copyright 2025 Google LLC +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# http://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. + +# Script to run in a CI `before_install` phase to setup a SPM-based +# quickstart repo so that it can be used for integration testing. + +set -euo pipefail + +# Define testing mode constants. +readonly NIGHTLY_RELEASE_TESTING="nightly_release_testing" +readonly PRERELEASE_TESTING="prerelease_testing" + +# All script logic is contained in functions. The main function is called at +# the end. +# Global variables: +# - readonly constants are defined at the top. +# - scripts_dir and root_dir are set after constants. + +scripts_dir="$(cd "$(dirname "${BASH_SOURCE[0]}")" && pwd)" +root_dir="$(dirname "$scripts_dir")" + +print_usage() { + cat < [testing_mode] + +This script sets up a quickstart sample for SPM integration testing. + +ARGUMENTS: + The name of the quickstart sample directory + (e.g., "authentication"). + [testing_mode] Optional. Specifies the testing mode. Can be one of: + - "${NIGHTLY_RELEASE_TESTING}": Points SPM to the latest + CocoaPods tag. + - "${PRERELEASE_TESTING}": Points SPM to the tip of the main + branch. + - (default): Points SPM to the current commit for PR testing. + +ENVIRONMENT VARIABLES: + QUICKSTART_REPO: Optional. Path to a local clone of the quickstart-ios repo. + If not set, the script will clone it from GitHub. + Example: + QUICKSTART_REPO=/path/to/quickstart-ios $(basename "$0") authentication + + QUICKSTART_BRANCH: Optional. The branch to checkout in the quickstart repo. + Defaults to the repo's default branch. + Example: + QUICKSTART_BRANCH=my-feature-branch $(basename "$0") authentication + + BYPASS_SECRET_CHECK: Optional. Set to "true" to bypass the CI secret check + for local runs. + Example: + BYPASS_SECRET_CHECK=true $(basename "$0") authentication + + DEBUG: Optional. Set to "true" to enable shell trace mode (`set -x`). + Example: DEBUG=true $(basename "$0") authentication +EOF +} + +# Clones or locates the quickstart repo. +# +# Globals: +# - QUICKSTART_REPO (read-only) +# Arguments: +# - $1: The name of the sample. +# Outputs: +# - Echoes the absolute path to the quickstart directory. +setup_quickstart_repo() { + local sample_name="$1" + local quickstart_dir + + # If QUICKSTART_REPO is set, use it. Otherwise, clone the repo. + if [[ -n "${QUICKSTART_REPO:-}" ]]; then + # If the user provided a path, it must be a valid directory. + if [[ ! -d "${QUICKSTART_REPO}" ]]; then + echo "Error: QUICKSTART_REPO is set to '${QUICKSTART_REPO}'," \ + "but this is not a valid directory." >&2 + exit 1 + fi + echo "Using local quickstart repository at ${QUICKSTART_REPO}" >&2 + quickstart_dir="${QUICKSTART_REPO}" + if ! (cd "${quickstart_dir}" && \ + git rev-parse --is-inside-work-tree >/dev/null 2>&1); then + echo "Error: QUICKSTART_REPO ('${quickstart_dir}') is not a git" \ + "repository." >&2 + exit 1 + fi + else + # QUICKSTART_REPO is not set, so clone it. + quickstart_dir="quickstart-ios" + if [[ -d "${quickstart_dir}" ]]; then + echo "Quickstart repository already exists at ${quickstart_dir}" >&2 + else + echo "Cloning quickstart repository into '${quickstart_dir}' directory..." >&2 + # Do a partial, sparse clone to speed up CI. See + # https://github.blog/2020-12-21-get-up-to-speed-with-partial-clone-and-shallow-clone/ + git clone --filter=blob:none --sparse \ + https://github.com/firebase/quickstart-ios.git "${quickstart_dir}" + fi + ( + cd "${quickstart_dir}" + echo "Ensuring sparse checkout is set for ${sample_name}..." >&2 + # Checkout the sample and scripts directories. + git sparse-checkout set "${sample_name}" scripts shared + ) + fi + + # If a branch is specified, check it out. + if [[ -n "${QUICKSTART_BRANCH:-}" ]]; then + echo "Checking out quickstart branch: ${QUICKSTART_BRANCH}" >&2 + ( + cd "${quickstart_dir}" + git fetch --quiet + git checkout --quiet "${QUICKSTART_BRANCH}" + ) + fi + + # Return the absolute path to the quickstart directory. + (cd "$quickstart_dir" && pwd) +} + +# Updates the SPM dependency in the Xcode project based on the testing mode. +# +# Globals: +# - NIGHTLY_RELEASE_TESTING (read-only) +# - PRERELEASE_TESTING (read-only) +# - scripts_dir (read-only) +# - root_dir (read-only) +# Arguments: +# - $1: The testing mode. +# - $2: The absolute path to the .xcodeproj file. +update_spm_dependency() { + local release_testing_mode="$1" + local absolute_project_file="$2" + + case "$release_testing_mode" in + "${NIGHTLY_RELEASE_TESTING}") + # For release testing, find the latest CocoaPods tag. + local latest_tag + latest_tag=$(git -C "$root_dir" tag -l "CocoaPods-*" --sort=-v:refname | \ + grep -E '^CocoaPods-[0-9]+\.[0-9]+\.[0-9]+$' | head -n 1) + if [[ -z "$latest_tag" ]]; then + echo "Error: Could not find a 'CocoaPods-X.Y.Z' tag." >&2 + exit 1 + fi + local tag_revision + tag_revision=$(git -C "$root_dir" rev-list -n 1 "$latest_tag") + echo "Setting SPM dependency to revision for tag ${latest_tag}:" \ + "${tag_revision}" + "$scripts_dir/update_firebase_spm_dependency.sh" \ + "$absolute_project_file" --revision "$tag_revision" + ;; + + "${PRERELEASE_TESTING}") + # For prerelease testing, point to the tip of the main branch. + echo "Setting SPM dependency to the tip of the main branch." + "$scripts_dir/update_firebase_spm_dependency.sh" \ + "$absolute_project_file" --prerelease + ;; + + *) + # For PR testing, point to the current commit. + local current_revision + current_revision=$(git -C "$root_dir" rev-parse HEAD) + echo "Setting SPM dependency to current revision: ${current_revision}" + "$scripts_dir/update_firebase_spm_dependency.sh" \ + "$absolute_project_file" --revision "$current_revision" + ;; + esac +} + +main() { + # --- Argument Parsing --- + if [[ -z "${1:-}" ]]; then + print_usage + exit 1 + fi + + local sample="$1" + local release_testing="${2-}" + + # Validate release_testing argument. + case "$release_testing" in + "" | "${NIGHTLY_RELEASE_TESTING}" | "${PRERELEASE_TESTING}") + # This is a valid value (or empty), so do nothing. + ;; + *) + # This is an invalid value. + echo "Error: Invalid testing_mode: '${release_testing}'" >&2 + print_usage + exit 1 + ;; + esac + + # --- Environment Setup and Validation --- + # Enable trace mode if DEBUG is set to 'true' + if [[ "${DEBUG:-false}" == "true" ]]; then + set -x + fi + + # Source function to check if CI secrets are available. + source "$scripts_dir/check_secrets.sh" + + # Some quickstarts may not need a real GoogleService-Info.plist for their + # tests. When QUICKSTART_REPO is set (for local runs) or BYPASS_SECRET_CHECK + # is true, the secrets check is skipped. + if [[ -z "${QUICKSTART_REPO:-}" ]] && \ + [[ "${BYPASS_SECRET_CHECK:-}" != "true" ]] && \ + ! check_secrets && \ + [[ "${sample}" != "installations" ]]; then + echo "Skipping quickstart setup: CI secrets are not available." + exit 0 + fi + + # --- Main Logic --- + local quickstart_dir + quickstart_dir=$(setup_quickstart_repo "$sample") + + local quickstart_project_dir="${quickstart_dir}/${sample}" + + if [[ ! -d "${quickstart_project_dir}" ]]; then + echo "Error: Sample directory not found at '${quickstart_project_dir}'" >&2 + exit 1 + fi + + # Find the .xcodeproj file within the sample directory. + # Fail if there isn't exactly one. + # Enable nullglob to ensure the glob expands to an empty list if no files + # are found. + shopt -s nullglob + local project_files=("${quickstart_project_dir}"/*.xcodeproj) + # Restore default globbing behavior. + shopt -u nullglob + if [[ "${#project_files[@]}" -ne 1 ]]; then + echo "Error: Expected 1 .xcodeproj file in" \ + "'${quickstart_project_dir}', but found ${#project_files[@]}." >&2 + exit 1 + fi + local project_file="${project_files[0]}" + + update_spm_dependency "$release_testing" "$project_file" +} + +# Run the main function with all provided arguments. +main "$@" diff --git a/scripts/test_quickstart.sh b/scripts/test_quickstart.sh index 4db82009d3f..2a3f533fc1d 100755 --- a/scripts/test_quickstart.sh +++ b/scripts/test_quickstart.sh @@ -20,17 +20,11 @@ set -xeuo pipefail sample="$1" test="$2" -language="${3-}" # Source function to check if CI secrets are available. source scripts/check_secrets.sh if check_secrets; then cd quickstart-ios - if [ "$language" = "swift" ]; then - have_secrets=true SAMPLE="$sample" TEST="$test" SWIFT_SUFFIX="Swift" ./scripts/test.sh - else - have_secrets=true SAMPLE="$sample" TEST="$test" ./scripts/test.sh - fi - + have_secrets=true SAMPLE="$sample" TEST="$test" ./scripts/test.sh fi From 8a9676eb6c00c226f79a805f64280d205d7d557a Mon Sep 17 00:00:00 2001 From: Nick Cooke Date: Mon, 22 Sep 2025 11:00:29 -0400 Subject: [PATCH 02/29] chore(ci): Update dependency on WIP QS branch --- .github/workflows/abtesting.yml | 2 +- .github/workflows/auth.yml | 2 +- .github/workflows/database.yml | 2 +- .github/workflows/firestore.yml | 2 +- .github/workflows/inappmessaging.yml | 2 +- .github/workflows/installations.yml | 2 +- .github/workflows/messaging.yml | 2 +- .github/workflows/performance.yml | 2 +- .github/workflows/remoteconfig.yml | 2 +- .github/workflows/storage.yml | 2 +- 10 files changed, 10 insertions(+), 10 deletions(-) diff --git a/.github/workflows/abtesting.yml b/.github/workflows/abtesting.yml index 93ff19af73b..c2bd61dc3ea 100644 --- a/.github/workflows/abtesting.yml +++ b/.github/workflows/abtesting.yml @@ -46,7 +46,7 @@ jobs: with: product: ABTesting is_legacy: true - setup_command: QUICKSTART_BRANCH=mc/spm scripts/setup_quickstart_spm.sh abtesting + setup_command: QUICKSTART_BRANCH=nc/quickstarts scripts/setup_quickstart_spm.sh abtesting plist_src_path: scripts/gha-encrypted/qs-abtesting.plist.gpg plist_dst_path: quickstart-ios/abtesting/GoogleService-Info.plist secrets: diff --git a/.github/workflows/auth.yml b/.github/workflows/auth.yml index 5a323c339da..d7880557bf0 100644 --- a/.github/workflows/auth.yml +++ b/.github/workflows/auth.yml @@ -98,7 +98,7 @@ jobs: with: product: Authentication is_legacy: false - setup_command: QUICKSTART_BRANCH=mc/spm scripts/setup_quickstart_spm.sh authentication + setup_command: QUICKSTART_BRANCH=nc/quickstarts scripts/setup_quickstart_spm.sh authentication plist_src_path: scripts/gha-encrypted/qs-authentication.plist.gpg plist_dst_path: quickstart-ios/authentication/GoogleService-Info.plist run_tests: false diff --git a/.github/workflows/database.yml b/.github/workflows/database.yml index b5f63931a42..451b230d167 100644 --- a/.github/workflows/database.yml +++ b/.github/workflows/database.yml @@ -75,7 +75,7 @@ jobs: with: product: Database is_legacy: false - setup_command: QUICKSTART_BRANCH=mc/spm scripts/setup_quickstart_spm.sh database + setup_command: QUICKSTART_BRANCH=nc/quickstarts scripts/setup_quickstart_spm.sh database plist_src_path: scripts/gha-encrypted/qs-database.plist.gpg plist_dst_path: quickstart-ios/database/GoogleService-Info.plist run_tests: false diff --git a/.github/workflows/firestore.yml b/.github/workflows/firestore.yml index 37fd1fae78a..92d1a53c9dc 100644 --- a/.github/workflows/firestore.yml +++ b/.github/workflows/firestore.yml @@ -606,7 +606,7 @@ jobs: # with: # product: Firestore # is_legacy: true - # setup_command: QUICKSTART_BRANCH=mc/spm scripts/setup_quickstart_spm.sh firestore + # setup_command: QUICKSTART_BRANCH=nc/quickstarts scripts/setup_quickstart_spm.sh firestore # plist_src_path: scripts/gha-encrypted/qs-firestore.plist.gpg # plist_dst_path: quickstart-ios/firestore/GoogleService-Info.plist # run_tests: false diff --git a/.github/workflows/inappmessaging.yml b/.github/workflows/inappmessaging.yml index 7727502c2eb..f0bbd9597d4 100644 --- a/.github/workflows/inappmessaging.yml +++ b/.github/workflows/inappmessaging.yml @@ -77,7 +77,7 @@ jobs: with: product: InAppMessaging is_legacy: false - setup_command: QUICKSTART_BRANCH=mc/spm scripts/setup_quickstart_spm.sh inappmessaging + setup_command: QUICKSTART_BRANCH=nc/quickstarts scripts/setup_quickstart_spm.sh inappmessaging plist_src_path: scripts/gha-encrypted/qs-inappmessaging.plist.gpg plist_dst_path: quickstart-ios/inappmessaging/GoogleService-Info.plist secrets: diff --git a/.github/workflows/installations.yml b/.github/workflows/installations.yml index 9850bb751b3..4d407c9507c 100644 --- a/.github/workflows/installations.yml +++ b/.github/workflows/installations.yml @@ -54,7 +54,7 @@ jobs: with: product: Installations is_legacy: false - setup_command: QUICKSTART_BRANCH=mc/spm scripts/setup_quickstart_spm.sh installations + setup_command: QUICKSTART_BRANCH=nc/quickstarts scripts/setup_quickstart_spm.sh installations plist_src_path: scripts/gha-encrypted/Installations/GoogleService-Info.plist.gpg plist_dst_path: quickstart-ios/installations/GoogleService-Info.plist secrets: diff --git a/.github/workflows/messaging.yml b/.github/workflows/messaging.yml index 1cf540ecfee..6b9aa970cc4 100644 --- a/.github/workflows/messaging.yml +++ b/.github/workflows/messaging.yml @@ -86,7 +86,7 @@ jobs: with: product: Messaging is_legacy: false - setup_command: QUICKSTART_BRANCH=mc/spm scripts/setup_quickstart_spm.sh messaging + setup_command: QUICKSTART_BRANCH=nc/quickstarts scripts/setup_quickstart_spm.sh messaging plist_src_path: scripts/gha-encrypted/qs-messaging.plist.gpg plist_dst_path: quickstart-ios/messaging/GoogleService-Info.plist run_tests: false diff --git a/.github/workflows/performance.yml b/.github/workflows/performance.yml index efbdf10685f..e14a3c44235 100644 --- a/.github/workflows/performance.yml +++ b/.github/workflows/performance.yml @@ -84,7 +84,7 @@ jobs: with: product: Performance is_legacy: false - setup_command: QUICKSTART_BRANCH=mc/spm scripts/setup_quickstart_spm.sh performance + setup_command: QUICKSTART_BRANCH=nc/quickstarts scripts/setup_quickstart_spm.sh performance plist_src_path: scripts/gha-encrypted/qs-performance.plist.gpg plist_dst_path: quickstart-ios/performance/GoogleService-Info.plist secrets: diff --git a/.github/workflows/remoteconfig.yml b/.github/workflows/remoteconfig.yml index a5cd9744c29..5588a70ce5b 100644 --- a/.github/workflows/remoteconfig.yml +++ b/.github/workflows/remoteconfig.yml @@ -95,7 +95,7 @@ jobs: with: product: Config is_legacy: false - setup_command: QUICKSTART_BRANCH=mc/spm scripts/setup_quickstart_spm.sh config + setup_command: QUICKSTART_BRANCH=nc/quickstarts scripts/setup_quickstart_spm.sh config plist_src_path: scripts/gha-encrypted/qs-config.plist.gpg plist_dst_path: quickstart-ios/config/GoogleService-Info.plist secrets: diff --git a/.github/workflows/storage.yml b/.github/workflows/storage.yml index b310e3aa47f..6e61def84d8 100644 --- a/.github/workflows/storage.yml +++ b/.github/workflows/storage.yml @@ -84,7 +84,7 @@ jobs: with: product: Storage is_legacy: true - setup_command: QUICKSTART_BRANCH=mc/spm scripts/setup_quickstart_spm.sh storage + setup_command: QUICKSTART_BRANCH=nc/quickstarts scripts/setup_quickstart_spm.sh storage plist_src_path: scripts/gha-encrypted/qs-storage.plist.gpg plist_dst_path: quickstart-ios/storage/GoogleService-Info.plist run_tests: false From 9569aa40196ed95e2e1b40d1e4d8a237196ae7c1 Mon Sep 17 00:00:00 2001 From: Nick Cooke <36927374+ncooke3@users.noreply.github.com> Date: Wed, 24 Sep 2025 17:33:11 -0400 Subject: [PATCH 03/29] refactor: Remove is_legacy QS testing flags (#15353) --- .github/workflows/abtesting.yml | 5 +- .github/workflows/auth.yml | 3 +- .github/workflows/common_quickstart.yml | 17 +- .github/workflows/crashlytics.yml | 16 +- .github/workflows/database.yml | 3 +- .github/workflows/firestore.yml | 3 +- .github/workflows/functions.yml | 18 +- .github/workflows/inappmessaging.yml | 3 +- .github/workflows/installations.yml | 3 +- .github/workflows/messaging.yml | 3 +- .github/workflows/performance.yml | 3 +- .github/workflows/prerelease.yml | 237 ++------------------ .github/workflows/prerelease_cocoapods.yml | 216 ++++++++++++++++++ .github/workflows/release.yml | 241 +++++---------------- .github/workflows/release_cocoapods.yml | 154 +++++++++++++ .github/workflows/remoteconfig.yml | 3 +- .github/workflows/storage.yml | 4 +- .github/workflows/zip.yml | 114 ++++------ scripts/remove_data.sh | 16 +- scripts/setup_quickstart_spm.sh | 9 +- 20 files changed, 527 insertions(+), 544 deletions(-) create mode 100644 .github/workflows/prerelease_cocoapods.yml create mode 100644 .github/workflows/release_cocoapods.yml diff --git a/.github/workflows/abtesting.yml b/.github/workflows/abtesting.yml index c2bd61dc3ea..448fadbe5fe 100644 --- a/.github/workflows/abtesting.yml +++ b/.github/workflows/abtesting.yml @@ -45,8 +45,7 @@ jobs: uses: ./.github/workflows/common_quickstart.yml with: product: ABTesting - is_legacy: true - setup_command: QUICKSTART_BRANCH=nc/quickstarts scripts/setup_quickstart_spm.sh abtesting + setup_command: scripts/setup_quickstart_spm.sh abtesting plist_src_path: scripts/gha-encrypted/qs-abtesting.plist.gpg plist_dst_path: quickstart-ios/abtesting/GoogleService-Info.plist secrets: @@ -67,7 +66,6 @@ jobs: # python-version: '3.11' # - 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 \ @@ -76,7 +74,6 @@ jobs: # run: sudo xcode-select -s /Applications/Xcode_16.4.app/Contents/Developer # - name: Build swift quickstart # env: - # LEGACY: true # run: ([ -z $plist_secret ] || scripts/third_party/travis/retry.sh scripts/test_quickstart_ftl.sh ABTesting) # - id: ftl_test # uses: FirebaseExtended/github-actions/firebase-test-lab@v1.4 diff --git a/.github/workflows/auth.yml b/.github/workflows/auth.yml index d7880557bf0..700767b6ef2 100644 --- a/.github/workflows/auth.yml +++ b/.github/workflows/auth.yml @@ -97,8 +97,7 @@ jobs: uses: ./.github/workflows/common_quickstart.yml with: product: Authentication - is_legacy: false - setup_command: QUICKSTART_BRANCH=nc/quickstarts scripts/setup_quickstart_spm.sh authentication + setup_command: scripts/setup_quickstart_spm.sh authentication plist_src_path: scripts/gha-encrypted/qs-authentication.plist.gpg plist_dst_path: quickstart-ios/authentication/GoogleService-Info.plist run_tests: false diff --git a/.github/workflows/common_quickstart.yml b/.github/workflows/common_quickstart.yml index 7f2942f6649..6cd964d4f6c 100644 --- a/.github/workflows/common_quickstart.yml +++ b/.github/workflows/common_quickstart.yml @@ -29,10 +29,12 @@ on: type: string required: true - # Whether to test the legacy version of the quickstart. - is_legacy: - type: boolean - required: true + # The branch to checkout in the quickstart repo. + quickstart_branch: + type: string + required: false + # default: 'main' # TODO: Revert to main before merging. + default: 'nc/quickstarts' # The path to the encrypted `GoogleService-Info.plist` file. plist_src_path: @@ -60,11 +62,12 @@ on: jobs: quickstart: + name: quickstart (${{ inputs.product }}) # 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 || '' }} + QUICKSTART_BRANCH: ${{ inputs.quickstart_branch }} runs-on: macos-15 steps: - uses: actions/checkout@v4 @@ -81,7 +84,7 @@ jobs: ${{ inputs.plist_src_path }} \ ${{ inputs.plist_dst_path }} \ "$plist_secret" - - name: Build ${{ inputs.product }} Quickstart (${{ inputs.is_legacy && 'Legacy' || 'Non-Legacy' }}) + - name: Build ${{ inputs.product }} Quickstart uses: nick-fields/retry@ce71cc2ab81d554ebbe88c79ab5975992d79ba08 # v3 with: timeout_minutes: 15 @@ -90,7 +93,7 @@ jobs: command: | SPM=true DIR=${{ inputs.product }} scripts/test_quickstart.sh \ ${{ inputs.product }} \ - ${{ inputs.run_tests }} \ + ${{ inputs.run_tests }} # Failure sequence to upload artifact. - id: lowercase_product if: ${{ failure() }} diff --git a/.github/workflows/crashlytics.yml b/.github/workflows/crashlytics.yml index 9255eec50da..105ef5bdd7f 100644 --- a/.github/workflows/crashlytics.yml +++ b/.github/workflows/crashlytics.yml @@ -47,13 +47,7 @@ jobs: uses: ./.github/workflows/common_quickstart.yml with: product: Crashlytics - is_legacy: true - 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/ + setup_command: scripts/setup_quickstart_spm.sh crashlytics plist_src_path: scripts/gha-encrypted/qs-crashlytics.plist.gpg plist_dst_path: quickstart-ios/crashlytics/GoogleService-Info.plist secrets: @@ -76,20 +70,12 @@ jobs: # 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: Build swift quickstart # run: | - # 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_ftl.sh Crashlytics swift) - # env: - # LEGACY: true # - id: ftl_test # uses: FirebaseExtended/github-actions/firebase-test-lab@v1.4 # with: diff --git a/.github/workflows/database.yml b/.github/workflows/database.yml index 451b230d167..e6db2321c99 100644 --- a/.github/workflows/database.yml +++ b/.github/workflows/database.yml @@ -74,8 +74,7 @@ jobs: uses: ./.github/workflows/common_quickstart.yml with: product: Database - is_legacy: false - setup_command: QUICKSTART_BRANCH=nc/quickstarts scripts/setup_quickstart_spm.sh database + setup_command: scripts/setup_quickstart_spm.sh database plist_src_path: scripts/gha-encrypted/qs-database.plist.gpg plist_dst_path: quickstart-ios/database/GoogleService-Info.plist run_tests: false diff --git a/.github/workflows/firestore.yml b/.github/workflows/firestore.yml index 92d1a53c9dc..4c3e9726425 100644 --- a/.github/workflows/firestore.yml +++ b/.github/workflows/firestore.yml @@ -605,8 +605,7 @@ jobs: # uses: ./.github/workflows/common_quickstart.yml # with: # product: Firestore - # is_legacy: true - # setup_command: QUICKSTART_BRANCH=nc/quickstarts scripts/setup_quickstart_spm.sh firestore + # setup_command: scripts/setup_quickstart_spm.sh firestore # plist_src_path: scripts/gha-encrypted/qs-firestore.plist.gpg # plist_dst_path: quickstart-ios/firestore/GoogleService-Info.plist # run_tests: false diff --git a/.github/workflows/functions.yml b/.github/workflows/functions.yml index 42d7b0c1395..07cafd50e4e 100644 --- a/.github/workflows/functions.yml +++ b/.github/workflows/functions.yml @@ -51,23 +51,7 @@ jobs: with: target: FirebaseFunctionsUnit - # TODO: The legacy quickstart uses material which doesn't build on Xcode 15. - # quickstart: - # uses: ./.github/workflows/common_quickstart.yml - # strategy: - # matrix: - # quickstart_type: [objc, swift] - # with: - # product: Functions - # is_legacy: true - # setup_command: | - # scripts/setup_quickstart.sh functions - # sed -i '' 's/REVERSED_CLIENT_ID/com.googleusercontent.apps.1025801074639-6p6ebi8amuklcjrto20gvpe295smm8u6/' quickstart-ios/functions/LegacyFunctionsQuickstart/FunctionsExample/Info.plist - # plist_src_path: scripts/gha-encrypted/qs-functions.plist.gpg - # plist_dst_path: quickstart-ios/functions/GoogleService-Info.plist - # quickstart_type: ${{ matrix.quickstart_type }} - # secrets: - # plist_secret: ${{ secrets.GHASecretsGPGPassphrase1 }} + # TODO(ncooke3): Add a Functions quickstart test. # quickstart-ftl-cron-only: # # Don't run on private repo diff --git a/.github/workflows/inappmessaging.yml b/.github/workflows/inappmessaging.yml index f0bbd9597d4..9275f825492 100644 --- a/.github/workflows/inappmessaging.yml +++ b/.github/workflows/inappmessaging.yml @@ -76,8 +76,7 @@ jobs: uses: ./.github/workflows/common_quickstart.yml with: product: InAppMessaging - is_legacy: false - setup_command: QUICKSTART_BRANCH=nc/quickstarts scripts/setup_quickstart_spm.sh inappmessaging + setup_command: scripts/setup_quickstart_spm.sh inappmessaging plist_src_path: scripts/gha-encrypted/qs-inappmessaging.plist.gpg plist_dst_path: quickstart-ios/inappmessaging/GoogleService-Info.plist secrets: diff --git a/.github/workflows/installations.yml b/.github/workflows/installations.yml index 4d407c9507c..b8bbb69d6d3 100644 --- a/.github/workflows/installations.yml +++ b/.github/workflows/installations.yml @@ -53,8 +53,7 @@ jobs: uses: ./.github/workflows/common_quickstart.yml with: product: Installations - is_legacy: false - setup_command: QUICKSTART_BRANCH=nc/quickstarts scripts/setup_quickstart_spm.sh installations + setup_command: scripts/setup_quickstart_spm.sh installations plist_src_path: scripts/gha-encrypted/Installations/GoogleService-Info.plist.gpg plist_dst_path: quickstart-ios/installations/GoogleService-Info.plist secrets: diff --git a/.github/workflows/messaging.yml b/.github/workflows/messaging.yml index 6b9aa970cc4..4663b6355b8 100644 --- a/.github/workflows/messaging.yml +++ b/.github/workflows/messaging.yml @@ -85,8 +85,7 @@ jobs: uses: ./.github/workflows/common_quickstart.yml with: product: Messaging - is_legacy: false - setup_command: QUICKSTART_BRANCH=nc/quickstarts scripts/setup_quickstart_spm.sh messaging + setup_command: scripts/setup_quickstart_spm.sh messaging plist_src_path: scripts/gha-encrypted/qs-messaging.plist.gpg plist_dst_path: quickstart-ios/messaging/GoogleService-Info.plist run_tests: false diff --git a/.github/workflows/performance.yml b/.github/workflows/performance.yml index e14a3c44235..28447841b87 100644 --- a/.github/workflows/performance.yml +++ b/.github/workflows/performance.yml @@ -83,8 +83,7 @@ jobs: uses: ./.github/workflows/common_quickstart.yml with: product: Performance - is_legacy: false - setup_command: QUICKSTART_BRANCH=nc/quickstarts scripts/setup_quickstart_spm.sh performance + setup_command: scripts/setup_quickstart_spm.sh performance plist_src_path: scripts/gha-encrypted/qs-performance.plist.gpg plist_dst_path: quickstart-ios/performance/GoogleService-Info.plist secrets: diff --git a/.github/workflows/prerelease.yml b/.github/workflows/prerelease.yml index 1de043c598f..b26e22cde33 100644 --- a/.github/workflows/prerelease.yml +++ b/.github/workflows/prerelease.yml @@ -1,12 +1,12 @@ name: prerelease permissions: - contents: write + contents: read on: pull_request: # closed will be triggered when a pull request is merged. This is to keep https://github.com/firebase/SpecsTesting up to date. - types: [closed] + # types: [closed] # TODO(ncooke3): Uncomment. paths: - '.github/workflows/prerelease.yml' workflow_dispatch: @@ -22,199 +22,6 @@ concurrency: cancel-in-progress: true jobs: - specs_checking: - # 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 == 'workflow_dispatch' - runs-on: macos-15 - env: - botaccess: ${{ secrets.PRERELEASE_TESTING_PAT }} - local_repo: specstesting - podspec_repo_branch: main - outputs: - matrix: ${{ steps.generate_matrix.outputs.matrix }} - steps: - - name: Checkout code - uses: actions/checkout@v4 - with: - fetch-depth: 0 - - name: Xcode - run: sudo xcode-select -s /Applications/Xcode_16.4.app/Contents/Developer - - name: Generate matrix - id: generate_matrix - run: | - cd "${GITHUB_WORKSPACE}/ReleaseTooling" - swift run manifest --sdk-repo-url "${GITHUB_WORKSPACE}" --output-file-path ./output.json --for-gha-matrix-generation - echo "::set-output name=matrix::{\"include\":$( cat output.json )}" - - name: Update SpecsTesting repo setup - run: | - podspec_repo_branch="${podspec_repo_branch}" \ - scripts/release_testing_setup.sh prerelease_testing - env: - BOT_TOKEN: ${{ secrets.GITHUB_TOKEN }} - - name: Clean spec repo - run: | - git clone --quiet https://${botaccess}@github.com/Firebase/SpecsTesting.git "${local_repo}" - cd "${local_repo}" - # Remove all unhidden dirs, i.e. all podspec dir from the spec repo. - rm -Rf -- */ - git add . - # commit without diff will throw an error. `git diff --exit-code` can avoid such error. - git diff --staged --exit-code || git commit -m "Empty spec repo." - # Attempt to push. If it fails, print a detailed error message and exit. - git push || { - echo "--------------------------------------------------------------------------------" - echo "ERROR: Failed to push to Firebase/SpecsTesting." - echo "This is likely due to an expired Personal Access Token (PAT)." - echo "Please take the following steps to resolve this:" - echo "1. Refresh the OSS bot's scoped access token for the Firebase/SpecsTesting repo." - echo " This can be done in the OSS bot's GitHub account settings. Ensure the token " - echo " has the 'public_repo' scope." - echo "2. Update the 'PRERELEASE_TESTING_PAT' secret in this repo's settings." - echo " (https://github.com/Firebase/firebase-ios-sdk/settings/secrets/actions)" - echo "--------------------------------------------------------------------------------" - exit 1 - } - - name: Clean Artifacts - if: ${{ always() }} - run: | - rm -rf prerelease-testing-token.txt - - uses: actions/upload-artifact@v4 - with: - name: firebase-ios-sdk - path: | - *.podspec - *.podspec.json - - buildup_SpecsTesting_repo_FirebaseCore: - needs: specs_checking - # 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 == 'workflow_dispatch' - runs-on: macos-15 - env: - botaccess: ${{ secrets.PRERELEASE_TESTING_PAT }} - local_repo: specstesting - local_sdk_repo_dir: /tmp/test/firebase-ios-sdk - targeted_pod: FirebaseCore - steps: - - uses: actions/checkout@v4 - - name: Xcode - run: sudo xcode-select -s /Applications/Xcode_16.4.app/Contents/Developer - - uses: actions/download-artifact@v4.1.7 - with: - name: firebase-ios-sdk - path: ${{ env.local_sdk_repo_dir }} - # Addresses flaky pushes due to missing git config on runner. - - name: Set git config - run: | - git config --global user.email "google-oss-bot@example.com" - git config --global user.name "google-oss-bot" - - name: Update SpecsTesting repo - run: | - cd scripts/create_spec_repo/ - swift build - pod repo add --silent "${local_repo}" https://"$botaccess"@github.com/Firebase/SpecsTesting.git - BOT_TOKEN="${botaccess}" ${GITHUB_WORKSPACE}/scripts/third_party/travis/retry.sh .build/debug/spec-repo-builder \ - --sdk-repo "${local_sdk_repo_dir}" \ - --local-spec-repo-name "${local_repo}" \ - --sdk-repo-name SpecsTesting \ - --github-account Firebase \ - --pod-sources 'https://${BOT_TOKEN}@github.com/Firebase/SpecsTesting' "https://github.com/firebase/SpecsDev.git" "https://github.com/firebase/SpecsStaging.git" "https://github.com/CocoaPods/Specs.git" \ - --include-pods "${targeted_pod}" --keep-repo - - name: Clean Artifacts - if: ${{ always() }} - run: pod repo remove "${local_repo}" - - buildup_SpecsTesting_repo: - needs: [buildup_SpecsTesting_repo_FirebaseCore, specs_checking] - # 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 == 'workflow_dispatch' - runs-on: macos-15 - strategy: - fail-fast: false - matrix: ${{fromJson(needs.specs_checking.outputs.matrix)}} - env: - botaccess: ${{ secrets.PRERELEASE_TESTING_PAT }} - local_repo: specstesting - local_sdk_repo_dir: /tmp/test/firebase-ios-sdk - targeted_pod: ${{ matrix.podspec }} - steps: - - uses: actions/checkout@v4 - - name: Xcode - run: sudo xcode-select -s /Applications/Xcode_16.4.app/Contents/Developer - - uses: actions/download-artifact@v4.1.7 - with: - name: firebase-ios-sdk - path: ${{ env.local_sdk_repo_dir }} - # Addresses flaky pushes due to missing git config on runner. - - name: Set git config - run: | - git config --global user.email "google-oss-bot@example.com" - git config --global user.name "google-oss-bot" - - name: Update SpecsTesting repo - run: | - [[ ${{ matrix.allowwarnings }} == true ]] && ALLOWWARNINGS=true - cd scripts/create_spec_repo/ - swift build - pod repo add --silent "${local_repo}" https://"$botaccess"@github.com/Firebase/SpecsTesting.git - # ${ALLOWWARNINGS:+--allow-warnings} will add --allow-warnings to the - # command if ${ALLOWWARNINGS} is not null. - BOT_TOKEN="${botaccess}" ${GITHUB_WORKSPACE}/scripts/third_party/travis/retry.sh .build/debug/spec-repo-builder \ - --sdk-repo "${local_sdk_repo_dir}" \ - --local-spec-repo-name "${local_repo}" \ - --sdk-repo-name SpecsTesting \ - --github-account Firebase \ - --pod-sources 'https://${BOT_TOKEN}@github.com/Firebase/SpecsTesting' "https://github.com/firebase/SpecsDev.git" "https://github.com/firebase/SpecsStaging.git" "https://github.com/CocoaPods/Specs.git" \ - --include-pods "${targeted_pod}" \ - --keep-repo ${ALLOWWARNINGS:+--allow-warnings} - - name: Clean Artifacts - if: ${{ always() }} - run: pod repo remove "${local_repo}" - - update_SpecsTesting_repo: - # Don't run on private repo unless it is a PR. - if: github.repository == 'Firebase/firebase-ios-sdk' && github.event.pull_request.merged == true - runs-on: macos-15 - env: - botaccess: ${{ secrets.PRERELEASE_TESTING_PAT }} - local_repo: specstesting - podspec_repo_branch: main - steps: - - uses: actions/checkout@v4 - with: - fetch-depth: 0 - - name: Xcode - run: sudo xcode-select -s /Applications/Xcode_16.4.app/Contents/Developer - - name: Update SpecsTesting repo setup - run: | - # Update/create a nightly tag to the head of the main branch. - podspec_repo_branch="${podspec_repo_branch}" \ - scripts/release_testing_setup.sh prerelease_testing - env: - BOT_TOKEN: ${{ secrets.GITHUB_TOKEN }} - - name: Push updated podspecs - run: | - # Changes in post submit tests will be fetched by getting diff between - # the HEAD and HEAD^ of the main branch. - common_commit=$(git rev-parse HEAD^) - git diff --name-only $common_commit remotes/origin/${podspec_repo_branch} > updated_files.txt - updated_podspecs=() - while IFS= read -r line; - do - echo $line - if [ ${line: -8} == ".podspec" ] - then - updated_podspecs+=("$(basename -s .podspec ${line})") - fi - done < updated_files.txt - if [ -z "$updated_podspecs" ] - then - exit - fi - cd scripts/create_spec_repo/ - swift build - pod repo add --silent "${local_repo}" https://"$botaccess"@github.com/Firebase/SpecsTesting.git - BOT_TOKEN="${botaccess}" .build/debug/spec-repo-builder --sdk-repo $(pwd) --local-spec-repo-name "${local_repo}" --sdk-repo-name SpecsTesting --github-account Firebase --pod-sources 'https://${BOT_TOKEN}@github.com/Firebase/SpecsTesting' "https://github.com/firebase/SpecsDev.git" "https://github.com/firebase/SpecsStaging.git" "https://cdn.cocoapods.org/" "FirebaseFirestoreTestingSupport" "FirebaseAuthTestingSupport" "FirebaseCombineSwift" --keep-repo --include-pods "${updated_podspecs[@]}" - # TODO: The functions quickstart uses Material which isn't supported by Xcode 15 #functions_quickstart: # Don't run on private repo unless it is a PR. @@ -223,7 +30,6 @@ jobs: # env: # plist_secret: ${{ secrets.GHASecretsGPGPassphrase1 }} # botaccess: ${{ secrets.PRERELEASE_TESTING_PAT }} - # LEGACY: true # # TODO: The functions quickstart uses Material which isn't supported by Xcode 15 # runs-on: macos-12 # steps: @@ -255,16 +61,17 @@ jobs: 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 == 'workflow_dispatch' - needs: buildup_SpecsTesting_repo + if: | + github.repository == 'firebase/firebase-ios-sdk' && + contains(fromJSON('["schedule", "pull_request", "workflow_dispatch"]'), github.event_name) strategy: + fail-fast: false matrix: include: - product: Performance run_tests: true - product: Storage - is_legacy: true - run_tests: true + run_tests: false - product: Config run_tests: true - product: Messaging @@ -278,50 +85,42 @@ jobs: - product: Authentication run_tests: false - product: Crashlytics - is_legacy: true run_tests: true - setup_command: | - mkdir -p 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/ - product: ABTesting - is_legacy: true run_tests: true + name: 'quickstart (prerelease, ${{ matrix.product }}, run_tests: ${{ matrix.run_tests }})' env: plist_secret: ${{ secrets.GHASecretsGPGPassphrase1 }} botaccess: ${{ secrets.PRERELEASE_TESTING_PAT }} - LEGACY: ${{ matrix.is_legacy && true || '' }} runs-on: macos-15 steps: - uses: actions/checkout@v4 - uses: ruby/setup-ruby@354a1ad156761f5ee2b7b13fa8e09943a5e8d252 # v1 + - name: Prereqs + run: gem install xcpretty - name: Xcode run: sudo xcode-select -s /Applications/Xcode_16.4.app/Contents/Developer - name: Setup testing repo and quickstart - run: BOT_TOKEN="${botaccess}" scripts/setup_quickstart.sh ${{ matrix.product }} prerelease_testing + run: QUICKSTART_BRANCH=nc/quickstarts scripts/setup_quickstart_spm.sh ${{ matrix.product }} prerelease_testing - name: Install Secret GoogleService-Info.plist run: | scripts/decrypt_gha_secret.sh \ scripts/gha-encrypted/qs-${{ matrix.product }}.plist.gpg \ quickstart-ios/${{ matrix.product }}/GoogleService-Info.plist \ "$plist_secret" - - name: Run setup command, if needed. - if: matrix.setup_command != '' - run: ${{ matrix.setup_command }} - name: Build Quickstart uses: nick-fields/retry@ce71cc2ab81d554ebbe88c79ab5975992d79ba08 # v3 with: timeout_minutes: 15 max_attempts: 3 retry_wait_seconds: 120 - command: scripts/test_quickstart.sh ${{ matrix.product }} ${{ matrix.run_tests }} + command: DIR=${{ matrix.product }} scripts/test_quickstart.sh ${{ matrix.product }} ${{ matrix.run_tests }} # Failure sequence to upload artifact. - name: Remove data before upload. - if: ${{ failure() }} + # if: ${{ failure() }} run: scripts/remove_data.sh ${{ matrix.product }} - - uses: actions/upload-artifact@v4 - if: ${{ failure() }} - with: - name: quickstart_artifacts_${{ matrix.product }} - path: quickstart-ios/ + # - uses: actions/upload-artifact@v4 + # if: ${{ failure() }} + # with: + # name: quickstart_artifacts_${{ matrix.product }} + # path: quickstart-ios/ diff --git a/.github/workflows/prerelease_cocoapods.yml b/.github/workflows/prerelease_cocoapods.yml new file mode 100644 index 00000000000..684716b9c8b --- /dev/null +++ b/.github/workflows/prerelease_cocoapods.yml @@ -0,0 +1,216 @@ +name: prerelease_cocoapods + +permissions: + contents: write + +on: + pull_request: + # closed will be triggered when a pull request is merged. This is to keep https://github.com/firebase/SpecsTesting up to date. + types: [closed] + paths: + - '.github/workflows/prerelease_cocoapods.yml' + workflow_dispatch: + schedule: + # Run every day at 10pm (PDT) / 1am (EDT) - cron uses UTC times + - cron: '0 5 * * *' + +env: + FIREBASE_CI: true + +concurrency: + group: ${{ github.workflow }}-${{ github.head_ref || github.ref }} + cancel-in-progress: true + +jobs: + specs_checking: + # 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 == 'workflow_dispatch' + runs-on: macos-15 + env: + botaccess: ${{ secrets.PRERELEASE_TESTING_PAT }} + local_repo: specstesting + podspec_repo_branch: main + outputs: + matrix: ${{ steps.generate_matrix.outputs.matrix }} + steps: + - name: Checkout code + uses: actions/checkout@v4 + with: + fetch-depth: 0 # Required for pulling down repo tags. + - name: Xcode + run: sudo xcode-select -s /Applications/Xcode_16.4.app/Contents/Developer + - name: Generate matrix + id: generate_matrix + run: | + cd "${GITHUB_WORKSPACE}/ReleaseTooling" + swift run manifest --sdk-repo-url "${GITHUB_WORKSPACE}" --output-file-path ./output.json --for-gha-matrix-generation + echo "::set-output name=matrix::{\"include\":$( cat output.json )}" + - name: Update SpecsTesting repo setup + run: | + podspec_repo_branch="${podspec_repo_branch}" \ + scripts/release_testing_setup.sh prerelease_testing + env: + BOT_TOKEN: ${{ secrets.GITHUB_TOKEN }} + - name: Clean spec repo + run: | + git clone --quiet https://${botaccess}@github.com/Firebase/SpecsTesting.git "${local_repo}" + cd "${local_repo}" + # Remove all unhidden dirs, i.e. all podspec dir from the spec repo. + rm -Rf -- */ + git add . + # commit without diff will throw an error. `git diff --exit-code` can avoid such error. + git diff --staged --exit-code || git commit -m "Empty spec repo." + # Attempt to push. If it fails, print a detailed error message and exit. + git push || { + echo "--------------------------------------------------------------------------------" + echo "ERROR: Failed to push to Firebase/SpecsTesting." + echo "This is likely due to an expired Personal Access Token (PAT)." + echo "Please take the following steps to resolve this:" + echo "1. Refresh the OSS bot's scoped access token for the Firebase/SpecsTesting repo." + echo " This can be done in the OSS bot's GitHub account settings. Ensure the token " + echo " has the 'public_repo' scope." + echo "2. Update the 'PRERELEASE_TESTING_PAT' secret in this repo's settings." + echo " (https://github.com/Firebase/firebase-ios-sdk/settings/secrets/actions)" + echo "--------------------------------------------------------------------------------" + exit 1 + } + - name: Clean Artifacts + if: ${{ always() }} + run: | + rm -rf prerelease-testing-token.txt + - uses: actions/upload-artifact@v4 + with: + name: firebase-ios-sdk + path: | + *.podspec + *.podspec.json + + buildup_SpecsTesting_repo_FirebaseCore: + needs: specs_checking + # 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 == 'workflow_dispatch' + runs-on: macos-15 + env: + botaccess: ${{ secrets.PRERELEASE_TESTING_PAT }} + local_repo: specstesting + local_sdk_repo_dir: /tmp/test/firebase-ios-sdk + targeted_pod: FirebaseCore + steps: + - uses: actions/checkout@v4 + - name: Xcode + run: sudo xcode-select -s /Applications/Xcode_16.4.app/Contents/Developer + - uses: actions/download-artifact@v4.1.7 + with: + name: firebase-ios-sdk + path: ${{ env.local_sdk_repo_dir }} + # Addresses flaky pushes due to missing git config on runner. + - name: Set git config + run: | + git config --global user.email "google-oss-bot@example.com" + git config --global user.name "google-oss-bot" + - name: Update SpecsTesting repo + run: | + cd scripts/create_spec_repo/ + swift build + pod repo add --silent "${local_repo}" https://"$botaccess"@github.com/Firebase/SpecsTesting.git + BOT_TOKEN="${botaccess}" ${GITHUB_WORKSPACE}/scripts/third_party/travis/retry.sh .build/debug/spec-repo-builder \ + --sdk-repo "${local_sdk_repo_dir}" \ + --local-spec-repo-name "${local_repo}" \ + --sdk-repo-name SpecsTesting \ + --github-account Firebase \ + --pod-sources 'https://${BOT_TOKEN}@github.com/Firebase/SpecsTesting' "https://github.com/firebase/SpecsDev.git" "https://github.com/firebase/SpecsStaging.git" "https://github.com/CocoaPods/Specs.git" \ + --include-pods "${targeted_pod}" --keep-repo + - name: Clean Artifacts + if: ${{ always() }} + run: pod repo remove "${local_repo}" + + buildup_SpecsTesting_repo: + needs: [buildup_SpecsTesting_repo_FirebaseCore, specs_checking] + # 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 == 'workflow_dispatch' + runs-on: macos-15 + strategy: + fail-fast: false + matrix: ${{fromJson(needs.specs_checking.outputs.matrix)}} + env: + botaccess: ${{ secrets.PRERELEASE_TESTING_PAT }} + local_repo: specstesting + local_sdk_repo_dir: /tmp/test/firebase-ios-sdk + targeted_pod: ${{ matrix.podspec }} + steps: + - uses: actions/checkout@v4 + - name: Xcode + run: sudo xcode-select -s /Applications/Xcode_16.4.app/Contents/Developer + - uses: actions/download-artifact@v4.1.7 + with: + name: firebase-ios-sdk + path: ${{ env.local_sdk_repo_dir }} + # Addresses flaky pushes due to missing git config on runner. + - name: Set git config + run: | + git config --global user.email "google-oss-bot@example.com" + git config --global user.name "google-oss-bot" + - name: Update SpecsTesting repo + run: | + [[ ${{ matrix.allowwarnings }} == true ]] && ALLOWWARNINGS=true + cd scripts/create_spec_repo/ + swift build + pod repo add --silent "${local_repo}" https://"$botaccess"@github.com/Firebase/SpecsTesting.git + # ${ALLOWWARNINGS:+--allow-warnings} will add --allow-warnings to the + # command if ${ALLOWWARNINGS} is not null. + BOT_TOKEN="${botaccess}" ${GITHUB_WORKSPACE}/scripts/third_party/travis/retry.sh .build/debug/spec-repo-builder \ + --sdk-repo "${local_sdk_repo_dir}" \ + --local-spec-repo-name "${local_repo}" \ + --sdk-repo-name SpecsTesting \ + --github-account Firebase \ + --pod-sources 'https://${BOT_TOKEN}@github.com/Firebase/SpecsTesting' "https://github.com/firebase/SpecsDev.git" "https://github.com/firebase/SpecsStaging.git" "https://github.com/CocoaPods/Specs.git" \ + --include-pods "${targeted_pod}" \ + --keep-repo ${ALLOWWARNINGS:+--allow-warnings} + - name: Clean Artifacts + if: ${{ always() }} + run: pod repo remove "${local_repo}" + + update_SpecsTesting_repo: + # Don't run on private repo unless it is a PR. + if: github.repository == 'Firebase/firebase-ios-sdk' && github.event.pull_request.merged == true + runs-on: macos-15 + env: + botaccess: ${{ secrets.PRERELEASE_TESTING_PAT }} + local_repo: specstesting + podspec_repo_branch: main + steps: + - uses: actions/checkout@v4 + with: + fetch-depth: 0 # Required for pulling down repo tags. + - name: Xcode + run: sudo xcode-select -s /Applications/Xcode_16.4.app/Contents/Developer + - name: Update SpecsTesting repo setup + run: | + # Update/create a nightly tag to the head of the main branch. + podspec_repo_branch="${podspec_repo_branch}" \ + scripts/release_testing_setup.sh prerelease_testing + env: + BOT_TOKEN: ${{ secrets.GITHUB_TOKEN }} + - name: Push updated podspecs + run: | + # Changes in post submit tests will be fetched by getting diff between + # the HEAD and HEAD^ of the main branch. + common_commit=$(git rev-parse HEAD^) + git diff --name-only $common_commit remotes/origin/${podspec_repo_branch} > updated_files.txt + updated_podspecs=() + while IFS= read -r line; + do + echo $line + if [ ${line: -8} == ".podspec" ] + then + updated_podspecs+=("$(basename -s .podspec ${line})") + fi + done < updated_files.txt + if [ -z "$updated_podspecs" ] + then + exit + fi + cd scripts/create_spec_repo/ + swift build + pod repo add --silent "${local_repo}" https://"$botaccess"@github.com/Firebase/SpecsTesting.git + BOT_TOKEN="${botaccess}" .build/debug/spec-repo-builder --sdk-repo $(pwd) --local-spec-repo-name "${local_repo}" --sdk-repo-name SpecsTesting --github-account Firebase --pod-sources 'https://${BOT_TOKEN}@github.com/Firebase/SpecsTesting' "https://github.com/firebase/SpecsDev.git" "https://github.com/firebase/SpecsStaging.git" "https://cdn.cocoapods.org/" "FirebaseFirestoreTestingSupport" "FirebaseAuthTestingSupport" "FirebaseCombineSwift" --keep-repo --include-pods "${updated_podspecs[@]}" diff --git a/.github/workflows/release.yml b/.github/workflows/release.yml index 7441a5a5dba..92a71e0f392 100644 --- a/.github/workflows/release.yml +++ b/.github/workflows/release.yml @@ -6,7 +6,6 @@ permissions: on: pull_request: paths: - - 'scripts/release_testing_setup.sh' - '.github/workflows/release.yml' - 'Gemfile*' workflow_dispatch: @@ -22,149 +21,52 @@ concurrency: cancel-in-progress: true jobs: - specs_checking: - # 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 == 'workflow_dispatch' - runs-on: macos-14 - env: - botaccess: ${{ secrets.RELEASE_TESTING_PAT }} - local_repo: specsreleasing - podspec_repo_branch: main - outputs: - matrix: ${{ steps.generate_matrix.outputs.matrix }} - steps: - - name: Checkout code - uses: actions/checkout@v4 - with: - fetch-depth: 0 - - name: Generate matrix - id: generate_matrix - run: | - cd "${GITHUB_WORKSPACE}/ReleaseTooling" - swift run manifest --sdk-repo-url "${GITHUB_WORKSPACE}" --output-file-path ./output.json --for-gha-matrix-generation - echo "::set-output name=matrix::{\"include\":$( cat output.json )}" - - name: Update SpecsReleasing repo setup - run: | - podspec_repo_branch="${podspec_repo_branch}" \ - scripts/release_testing_setup.sh release_testing - - name: Clean spec repo - run: | - git clone --quiet https://"$botaccess"@github.com/Firebase/SpecsReleasing.git "${local_repo}" - cd "${local_repo}" - # Remove all unhidden dirs, i.e. all podspec dir from the spec repo. - rm -Rf -- */ - git add . - # commit without diff will throw an error. `git diff --exit-code` can avoid such error. - git diff --staged --exit-code || git commit -m "Empty spec repo." - # Attempt to push. If it fails, print a detailed error message and exit. - git push || { - echo "--------------------------------------------------------------------------------" - echo "ERROR: Failed to push to Firebase/SpecsReleasing." - echo "This is likely due to an expired Personal Access Token (PAT)." - echo "Please take the following steps to resolve this:" - echo "1. Refresh the OSS bot's scoped access token for the Firebase/SpecsReleasing repo." - echo " This can be done in the OSS bot's GitHub account settings. Ensure the token " - echo " has the 'public_repo' scope." - echo "2. Update the 'RELEASE_TESTING_PAT' secret in this repo's settings." - echo " (https://github.com/Firebase/firebase-ios-sdk/settings/secrets/actions)" - echo "--------------------------------------------------------------------------------" - exit 1 - } - - uses: actions/upload-artifact@v4 - with: - name: firebase-ios-sdk - path: | - *.podspec - *.podspec.json - - buildup_SpecsReleasing_repo_FirebaseCore: - needs: specs_checking - # Don't run on private repo unless it is a PR. - if: github.repository == 'Firebase/firebase-ios-sdk' - runs-on: macos-15 - env: - botaccess: ${{ secrets.RELEASE_TESTING_PAT }} - local_repo: specsreleasing - local_sdk_repo_dir: /tmp/test/firebase-ios-sdk - targeted_pod: FirebaseCore - steps: - - uses: actions/checkout@v4 - - name: Set Xcode version - run: sudo xcode-select -s /Applications/Xcode_16.4.app - - uses: actions/download-artifact@v4.1.7 - with: - name: firebase-ios-sdk - path: ${{ env.local_sdk_repo_dir }} - - name: Update SpecsReleasing repo - run: | - cd scripts/create_spec_repo/ - swift build - pod repo add --silent "${local_repo}" https://"$botaccess"@github.com/Firebase/SpecsReleasing.git - BOT_TOKEN="${botaccess}" ${GITHUB_WORKSPACE}/scripts/third_party/travis/retry.sh .build/debug/spec-repo-builder \ - --sdk-repo "${local_sdk_repo_dir}" \ - --local-spec-repo-name "${local_repo}" \ - --pod-sources 'https://github.com/Firebase/SpecsReleasing' "https://github.com/firebase/SpecsStaging.git" "https://github.com/CocoaPods/Specs.git" \ - --include-pods "${targeted_pod}" --keep-repo - - name: Clean Artifacts - if: ${{ always() }} - run: pod repo remove "${local_repo}" - - buildup_SpecsReleasing_repo: - needs: [buildup_SpecsReleasing_repo_FirebaseCore, specs_checking] - # Don't run on private repo unless it is a PR. - if: github.repository == 'Firebase/firebase-ios-sdk' || github.event_name == 'workflow_dispatch' - runs-on: macos-15 - strategy: - fail-fast: false - matrix: ${{fromJson(needs.specs_checking.outputs.matrix)}} - env: - botaccess: ${{ secrets.RELEASE_TESTING_PAT }} - local_repo: specsreleasing - local_sdk_repo_dir: /tmp/test/firebase-ios-sdk - targeted_pod: ${{ matrix.podspec }} - steps: - - uses: actions/checkout@v4 - - name: Set Xcode version - run: sudo xcode-select -s /Applications/Xcode_16.4.app - - uses: actions/download-artifact@v4.1.7 - with: - name: firebase-ios-sdk - path: ${{ env.local_sdk_repo_dir }} - # Addresses flaky pushes due to missing git config on runner. - - name: Set git config - run: | - git config --global user.email "google-oss-bot@example.com" - git config --global user.name "google-oss-bot" - - name: Update SpecsReleasing repo - run: | - [[ ${{ matrix.allowwarnings }} == true ]] && ALLOWWARNINGS=true - cd scripts/create_spec_repo/ - swift build - pod repo add --silent "${local_repo}" https://"$botaccess"@github.com/Firebase/SpecsReleasing.git - # ${ALLOWWARNINGS:+--allow-warnings} will add --allow-warnings to the - # command if ${ALLOWWARNINGS} is not null. - BOT_TOKEN="${botaccess}" ${GITHUB_WORKSPACE}/scripts/third_party/travis/retry.sh .build/debug/spec-repo-builder \ - --sdk-repo "${local_sdk_repo_dir}" \ - --local-spec-repo-name "${local_repo}" \ - --pod-sources 'https://github.com/Firebase/SpecsReleasing' "https://github.com/firebase/SpecsStaging.git" "https://github.com/CocoaPods/Specs.git" \ - --include-pods "${targeted_pod}" \ - --keep-repo ${ALLOWWARNINGS:+--allow-warnings} - - name: Clean Artifacts - if: ${{ always() }} - run: pod repo remove "${local_repo}" + # TODO: The functions quickstart uses Material which isn't supported by Xcode 15 + # functions_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' || github.event_name == 'workflow_dispatch' + # needs: buildup_SpecsReleasing_repo + # env: + # plist_secret: ${{ secrets.GHASecretsGPGPassphrase1 }} + # botaccess: ${{ secrets.RELEASE_TESTING_PAT }} + # runs-on: macos-12 + # steps: + # - uses: actions/checkout@v4 + # - uses: ruby/setup-ruby@354a1ad156761f5ee2b7b13fa8e09943a5e8d252 # v1 + # - name: Setup testing repo and quickstart + # run: BOT_TOKEN="${botaccess}" scripts/setup_quickstart.sh functions nightly_release_testing + # - name: install secret googleservice-info.plist + # run: scripts/decrypt_gha_secret.sh scripts/gha-encrypted/qs-functions.plist.gpg \ + # quickstart-ios/functions/GoogleService-Info.plist "$plist_secret" + # - name: Setup custom URL scheme + # run: sed -i '' 's/REVERSED_CLIENT_ID/com.googleusercontent.apps.1025801074639-6p6ebi8amuklcjrto20gvpe295smm8u6/' quickstart-ios/functions/LegacyFunctionsQuickstart/FunctionsExample/Info.plist + # - name: Test objc quickstart + # run: ([ -z $plist_secret ] || + # scripts/third_party/travis/retry.sh scripts/test_quickstart.sh Functions true) + # - name: Test swift quickstart + # run: ([ -z $plist_secret ] || + # scripts/third_party/travis/retry.sh scripts/test_quickstart.sh Functions true swift) + # - name: Remove data before upload + # if: ${{ failure() }} + # run: scripts/remove_data.sh functions + # - uses: actions/upload-artifact@v4 + # if: ${{ failure() }} + # with: + # name: quickstart_artifacts_functions + # path: quickstart-ios/ 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 == 'workflow_dispatch' - needs: buildup_SpecsReleasing_repo + if: | + github.repository == 'firebase/firebase-ios-sdk' && + contains(fromJSON('["schedule", "pull_request", "workflow_dispatch"]'), github.event_name) strategy: + fail-fast: false matrix: include: - product: Performance run_tests: true - product: Storage - run_tests: true - is_legacy: true + run_tests: false - product: Config run_tests: true - product: Messaging @@ -179,81 +81,40 @@ jobs: run_tests: false - product: Crashlytics run_tests: true - is_legacy: true - setup_command: | - mkdir -p 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/ - product: ABTesting run_tests: true - is_legacy: true + name: 'quickstart (release, ${{ matrix.product }}, run_tests: ${{ matrix.run_tests }})' env: plist_secret: ${{ secrets.GHASecretsGPGPassphrase1 }} botaccess: ${{ secrets.RELEASE_TESTING_PAT }} - LEGACY: ${{ matrix.is_legacy && true || '' }} runs-on: macos-15 steps: - uses: actions/checkout@v4 + with: + fetch-depth: 0 # Required for pulling down repo tags. - name: Set Xcode version run: sudo xcode-select -s /Applications/Xcode_16.4.app - uses: ruby/setup-ruby@354a1ad156761f5ee2b7b13fa8e09943a5e8d252 # v1 + - name: Prereqs + run: gem install xcpretty - name: Setup testing repo and quickstart - run: BOT_TOKEN="${botaccess}" scripts/setup_quickstart.sh ${{ matrix.product }} nightly_release_testing + run: QUICKSTART_BRANCH=nc/quickstarts scripts/setup_quickstart_spm.sh ${{ matrix.product }} nightly_release_testing - name: Install Secret GoogleService-Info.plist run: | scripts/decrypt_gha_secret.sh scripts/gha-encrypted/qs-${{ matrix.product }}.plist.gpg \ quickstart-ios/${{ matrix.product }}/GoogleService-Info.plist "$plist_secret" - - name: Run setup command, if needed. - if: matrix.setup_command != '' - run: ${{ matrix.setup_command }} - name: Build Quickstart uses: nick-fields/retry@ce71cc2ab81d554ebbe88c79ab5975992d79ba08 # v3 with: timeout_minutes: 15 max_attempts: 3 retry_wait_seconds: 120 - command: scripts/test_quickstart.sh ${{ matrix.product }} ${{ matrix.run_tests }} + command: DIR=${{ matrix.product }} scripts/test_quickstart.sh ${{ matrix.product }} ${{ matrix.run_tests }} - name: Remove data before upload - if: ${{ failure() }} + # if: ${{ failure() }} run: scripts/remove_data.sh ${{ matrix.product }} - - uses: actions/upload-artifact@v4 - if: ${{ failure() }} - with: - name: quickstart_artifacts_${{ matrix.product }} - path: quickstart-ios/ - - # TODO: The functions quickstart uses Material which isn't supported by Xcode 15 - # functions_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' || github.event_name == 'workflow_dispatch' - # needs: buildup_SpecsReleasing_repo - # env: - # plist_secret: ${{ secrets.GHASecretsGPGPassphrase1 }} - # botaccess: ${{ secrets.RELEASE_TESTING_PAT }} - # LEGACY: true - # runs-on: macos-12 - # steps: - # - uses: actions/checkout@v4 - # - uses: ruby/setup-ruby@354a1ad156761f5ee2b7b13fa8e09943a5e8d252 # v1 - # - name: Setup testing repo and quickstart - # run: BOT_TOKEN="${botaccess}" scripts/setup_quickstart.sh functions nightly_release_testing - # - name: install secret googleservice-info.plist - # run: scripts/decrypt_gha_secret.sh scripts/gha-encrypted/qs-functions.plist.gpg \ - # quickstart-ios/functions/GoogleService-Info.plist "$plist_secret" - # - name: Setup custom URL scheme - # run: sed -i '' 's/REVERSED_CLIENT_ID/com.googleusercontent.apps.1025801074639-6p6ebi8amuklcjrto20gvpe295smm8u6/' quickstart-ios/functions/LegacyFunctionsQuickstart/FunctionsExample/Info.plist - # - name: Test objc quickstart - # run: ([ -z $plist_secret ] || - # scripts/third_party/travis/retry.sh scripts/test_quickstart.sh Functions true) - # - name: Test swift quickstart - # run: ([ -z $plist_secret ] || - # scripts/third_party/travis/retry.sh scripts/test_quickstart.sh Functions true swift) - # - name: Remove data before upload - # if: ${{ failure() }} - # run: scripts/remove_data.sh functions - # - uses: actions/upload-artifact@v4 - # if: ${{ failure() }} - # with: - # name: quickstart_artifacts_functions - # path: quickstart-ios/ + # - uses: actions/upload-artifact@v4 + # if: ${{ failure() }} + # with: + # name: quickstart_artifacts_${{ matrix.product }} + # path: quickstart-ios/ diff --git a/.github/workflows/release_cocoapods.yml b/.github/workflows/release_cocoapods.yml new file mode 100644 index 00000000000..c75b089802c --- /dev/null +++ b/.github/workflows/release_cocoapods.yml @@ -0,0 +1,154 @@ +name: release_cocoapods + +permissions: + contents: read + +on: + pull_request: + paths: + - 'scripts/release_testing_setup.sh' + - '.github/workflows/release_cocoapods.yml' + - 'Gemfile*' + workflow_dispatch: + schedule: + # Run every day at 10pm (PDT) / 1am (EDT) - cron uses UTC times + - cron: '0 5 * * *' + +env: + FIREBASE_CI: true + +concurrency: + group: ${{ github.workflow }}-${{ github.head_ref || github.ref }} + cancel-in-progress: true + +jobs: + specs_checking: + # 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 == 'workflow_dispatch' + runs-on: macos-14 + env: + botaccess: ${{ secrets.RELEASE_TESTING_PAT }} + local_repo: specsreleasing + podspec_repo_branch: main + outputs: + matrix: ${{ steps.generate_matrix.outputs.matrix }} + steps: + - name: Checkout code + uses: actions/checkout@v4 + with: + fetch-depth: 0 # Required for pulling down repo tags. + - name: Generate matrix + id: generate_matrix + run: | + cd "${GITHUB_WORKSPACE}/ReleaseTooling" + swift run manifest --sdk-repo-url "${GITHUB_WORKSPACE}" --output-file-path ./output.json --for-gha-matrix-generation + echo "::set-output name=matrix::{\"include\":$( cat output.json )}" + - name: Update SpecsReleasing repo setup + run: | + podspec_repo_branch="${podspec_repo_branch}" \ + scripts/release_testing_setup.sh release_testing + - name: Clean spec repo + run: | + git clone --quiet https://"$botaccess"@github.com/Firebase/SpecsReleasing.git "${local_repo}" + cd "${local_repo}" + # Remove all unhidden dirs, i.e. all podspec dir from the spec repo. + rm -Rf -- */ + git add . + # commit without diff will throw an error. `git diff --exit-code` can avoid such error. + git diff --staged --exit-code || git commit -m "Empty spec repo." + # Attempt to push. If it fails, print a detailed error message and exit. + git push || { + echo "--------------------------------------------------------------------------------" + echo "ERROR: Failed to push to Firebase/SpecsReleasing." + echo "This is likely due to an expired Personal Access Token (PAT)." + echo "Please take the following steps to resolve this:" + echo "1. Refresh the OSS bot's scoped access token for the Firebase/SpecsReleasing repo." + echo " This can be done in the OSS bot's GitHub account settings. Ensure the token " + echo " has the 'public_repo' scope." + echo "2. Update the 'RELEASE_TESTING_PAT' secret in this repo's settings." + echo " (https://github.com/Firebase/firebase-ios-sdk/settings/secrets/actions)" + echo "--------------------------------------------------------------------------------" + exit 1 + } + - uses: actions/upload-artifact@v4 + with: + name: firebase-ios-sdk + path: | + *.podspec + *.podspec.json + + buildup_SpecsReleasing_repo_FirebaseCore: + needs: specs_checking + # Don't run on private repo unless it is a PR. + if: github.repository == 'Firebase/firebase-ios-sdk' + runs-on: macos-15 + env: + botaccess: ${{ secrets.RELEASE_TESTING_PAT }} + local_repo: specsreleasing + local_sdk_repo_dir: /tmp/test/firebase-ios-sdk + targeted_pod: FirebaseCore + steps: + - uses: actions/checkout@v4 + - name: Set Xcode version + run: sudo xcode-select -s /Applications/Xcode_16.4.app + - uses: actions/download-artifact@v4.1.7 + with: + name: firebase-ios-sdk + path: ${{ env.local_sdk_repo_dir }} + - name: Update SpecsReleasing repo + run: | + cd scripts/create_spec_repo/ + swift build + pod repo add --silent "${local_repo}" https://"$botaccess"@github.com/Firebase/SpecsReleasing.git + BOT_TOKEN="${botaccess}" ${GITHUB_WORKSPACE}/scripts/third_party/travis/retry.sh .build/debug/spec-repo-builder \ + --sdk-repo "${local_sdk_repo_dir}" \ + --local-spec-repo-name "${local_repo}" \ + --pod-sources 'https://github.com/Firebase/SpecsReleasing' "https://github.com/firebase/SpecsStaging.git" "https://github.com/CocoaPods/Specs.git" \ + --include-pods "${targeted_pod}" --keep-repo + - name: Clean Artifacts + if: ${{ always() }} + run: pod repo remove "${local_repo}" + + buildup_SpecsReleasing_repo: + needs: [buildup_SpecsReleasing_repo_FirebaseCore, specs_checking] + # Don't run on private repo unless it is a PR. + if: github.repository == 'Firebase/firebase-ios-sdk' || github.event_name == 'workflow_dispatch' + runs-on: macos-15 + strategy: + fail-fast: false + matrix: ${{fromJson(needs.specs_checking.outputs.matrix)}} + env: + botaccess: ${{ secrets.RELEASE_TESTING_PAT }} + local_repo: specsreleasing + local_sdk_repo_dir: /tmp/test/firebase-ios-sdk + targeted_pod: ${{ matrix.podspec }} + steps: + - uses: actions/checkout@v4 + - name: Set Xcode version + run: sudo xcode-select -s /Applications/Xcode_16.4.app + - uses: actions/download-artifact@v4.1.7 + with: + name: firebase-ios-sdk + path: ${{ env.local_sdk_repo_dir }} + # Addresses flaky pushes due to missing git config on runner. + - name: Set git config + run: | + git config --global user.email "google-oss-bot@example.com" + git config --global user.name "google-oss-bot" + - name: Update SpecsReleasing repo + run: | + [[ ${{ matrix.allowwarnings }} == true ]] && ALLOWWARNINGS=true + cd scripts/create_spec_repo/ + swift build + pod repo add --silent "${local_repo}" https://"$botaccess"@github.com/Firebase/SpecsReleasing.git + # ${ALLOWWARNINGS:+--allow-warnings} will add --allow-warnings to the + # command if ${ALLOWWARNINGS} is not null. + BOT_TOKEN="${botaccess}" ${GITHUB_WORKSPACE}/scripts/third_party/travis/retry.sh .build/debug/spec-repo-builder \ + --sdk-repo "${local_sdk_repo_dir}" \ + --local-spec-repo-name "${local_repo}" \ + --pod-sources 'https://github.com/Firebase/SpecsReleasing' "https://github.com/firebase/SpecsStaging.git" "https://github.com/CocoaPods/Specs.git" \ + --include-pods "${targeted_pod}" \ + --keep-repo ${ALLOWWARNINGS:+--allow-warnings} + - name: Clean Artifacts + if: ${{ always() }} + run: pod repo remove "${local_repo}" diff --git a/.github/workflows/remoteconfig.yml b/.github/workflows/remoteconfig.yml index 5588a70ce5b..68d0bb7512a 100644 --- a/.github/workflows/remoteconfig.yml +++ b/.github/workflows/remoteconfig.yml @@ -94,8 +94,7 @@ jobs: uses: ./.github/workflows/common_quickstart.yml with: product: Config - is_legacy: false - setup_command: QUICKSTART_BRANCH=nc/quickstarts scripts/setup_quickstart_spm.sh config + setup_command: scripts/setup_quickstart_spm.sh config plist_src_path: scripts/gha-encrypted/qs-config.plist.gpg plist_dst_path: quickstart-ios/config/GoogleService-Info.plist secrets: diff --git a/.github/workflows/storage.yml b/.github/workflows/storage.yml index 6e61def84d8..95545b39a97 100644 --- a/.github/workflows/storage.yml +++ b/.github/workflows/storage.yml @@ -83,8 +83,7 @@ jobs: uses: ./.github/workflows/common_quickstart.yml with: product: Storage - is_legacy: true - setup_command: QUICKSTART_BRANCH=nc/quickstarts scripts/setup_quickstart_spm.sh storage + setup_command: scripts/setup_quickstart_spm.sh storage plist_src_path: scripts/gha-encrypted/qs-storage.plist.gpg plist_dst_path: quickstart-ios/storage/GoogleService-Info.plist run_tests: false @@ -96,7 +95,6 @@ jobs: # if: github.repository == 'Firebase/firebase-ios-sdk' && github.event_name == 'schedule' # env: # plist_secret: ${{ secrets.GHASecretsGPGPassphrase1 }} - # LEGACY: true # runs-on: macos-15 # steps: # - uses: actions/checkout@v4 diff --git a/.github/workflows/zip.yml b/.github/workflows/zip.yml index eba3c5b61b5..570bce868fd 100644 --- a/.github/workflows/zip.yml +++ b/.github/workflows/zip.yml @@ -1,5 +1,7 @@ name: zip +# TODO(ncooke3): Add FirebaseAI test. + permissions: actions: read contents: read @@ -147,8 +149,6 @@ jobs: find "${GITHUB_WORKSPACE}" -name "Firebase*latest.zip" -exec unzip -d "${HOME}"/ios_frameworks/ {} + - uses: actions/checkout@v4 - name: Setup quickstart - env: - LEGACY: true run: SAMPLE="$SDK" TARGET="${SDK}Example" scripts/setup_quickstart_framework.sh \ "${HOME}"/ios_frameworks/Firebase/FirebaseRemoteConfig/* \ "${HOME}"/ios_frameworks/Firebase/FirebaseAnalytics/FirebaseCore.xcframework \ @@ -160,19 +160,15 @@ jobs: run: scripts/decrypt_gha_secret.sh scripts/gha-encrypted/qs-abtesting.plist.gpg \ quickstart-ios/abtesting/GoogleService-Info.plist "$plist_secret" - name: Test Quickstart - env: - LEGACY: true run: ([ -z $plist_secret ] || scripts/third_party/travis/retry.sh scripts/test_quickstart_framework.sh "${SDK}") - name: Remove data before upload - env: - LEGACY: true if: ${{ failure() }} run: scripts/remove_data.sh abtesting - - uses: actions/upload-artifact@v4 - if: ${{ failure() }} - with: - name: quickstart_artifacts_abtesting - path: quickstart-ios/ + # - uses: actions/upload-artifact@v4 + # if: ${{ failure() }} + # with: + # name: quickstart_artifacts_abtesting + # path: quickstart-ios/ quickstart_framework_auth: needs: package-head @@ -219,11 +215,11 @@ jobs: - name: Remove data before upload if: ${{ failure() }} run: scripts/remove_data.sh authentiation - - uses: actions/upload-artifact@v4 - if: ${{ failure() }} - with: - name: quickstart_artifacts_auth - path: quickstart-ios/ + # - uses: actions/upload-artifact@v4 + # if: ${{ failure() }} + # with: + # name: quickstart_artifacts_auth + # path: quickstart-ios/ quickstart_framework_config: needs: package-head @@ -268,11 +264,11 @@ jobs: - name: Remove data before upload if: ${{ failure() }} run: scripts/remove_data.sh config - - uses: actions/upload-artifact@v4 - if: ${{ failure() }} - with: - name: quickstart_artifacts_config - path: quickstart-ios/ + # - uses: actions/upload-artifact@v4 + # if: ${{ failure() }} + # with: + # name: quickstart_artifacts_config + # path: quickstart-ios/ quickstart_framework_crashlytics: needs: package-head @@ -306,8 +302,6 @@ jobs: find "${GITHUB_WORKSPACE}" -name "Firebase*latest.zip" -exec unzip -d "${HOME}"/ios_frameworks/ {} + - uses: actions/checkout@v4 - name: Setup quickstart - env: - LEGACY: true run: | SAMPLE="$SDK" TARGET="${SDK}Example" scripts/setup_quickstart_framework.sh \ "${HOME}"/ios_frameworks/Firebase/FirebaseCrashlytics/* \ @@ -327,8 +321,6 @@ jobs: run: scripts/decrypt_gha_secret.sh scripts/gha-encrypted/qs-crashlytics.plist.gpg \ quickstart-ios/crashlytics/GoogleService-Info.plist "$plist_secret" - name: Test Quickstart - env: - LEGACY: true run: ([ -z $plist_secret ] || scripts/third_party/travis/retry.sh scripts/test_quickstart_framework.sh "${SDK}") # TODO(#8057): Restore Swift Quickstart # - name: Test Swift Quickstart @@ -336,15 +328,13 @@ jobs: # LEGACY: true # run: ([ -z $plist_secret ] || scripts/third_party/travis/retry.sh scripts/test_quickstart_framework.sh "${SDK}" swift) - name: Remove data before upload - env: - LEGACY: true if: ${{ failure() }} run: scripts/remove_data.sh crashlytics - - uses: actions/upload-artifact@v4 - if: ${{ failure() }} - with: - name: quickstart_artifacts_crashlytics - path: quickstart-ios/ + # - uses: actions/upload-artifact@v4 + # if: ${{ failure() }} + # with: + # name: quickstart_artifacts_crashlytics + # path: quickstart-ios/ quickstart_framework_database: needs: package-head @@ -392,11 +382,11 @@ jobs: - name: Remove data before upload if: ${{ failure() }} run: scripts/remove_data.sh database - - uses: actions/upload-artifact@v4 - if: ${{ failure() }} - with: - name: quickstart_artifacts database - path: quickstart-ios/ + # - uses: actions/upload-artifact@v4 + # if: ${{ failure() }} + # with: + # name: quickstart_artifacts database + # path: quickstart-ios/ quickstart_framework_firestore: needs: package-head @@ -449,11 +439,11 @@ jobs: - name: Remove data before upload and zip directory to reduce upload size. if: ${{ failure() }} run: scripts/remove_data.sh firestore; zip -r --symlinks quickstart_artifacts_firestore.zip quickstart-ios/ - - uses: actions/upload-artifact@v4 - if: ${{ failure() }} - with: - name: quickstart_artifacts_firestore_${{ matrix.artifact }}_${{ matrix.build-env.os }} - path: quickstart_artifacts_firestore.zip + # - uses: actions/upload-artifact@v4 + # if: ${{ failure() }} + # with: + # name: quickstart_artifacts_firestore_${{ matrix.artifact }}_${{ matrix.build-env.os }} + # path: quickstart_artifacts_firestore.zip check_framework_firestore_symbols: needs: package-head @@ -534,11 +524,11 @@ jobs: - name: Remove data before upload if: ${{ failure() }} run: scripts/remove_data.sh inappmessaging - - uses: actions/upload-artifact@v4 - if: ${{ failure() }} - with: - name: quickstart_artifacts_inappmessaging - path: quickstart-ios/ + # - uses: actions/upload-artifact@v4 + # if: ${{ failure() }} + # with: + # name: quickstart_artifacts_inappmessaging + # path: quickstart-ios/ quickstart_framework_messaging: needs: package-head @@ -587,11 +577,11 @@ jobs: - name: Remove data before upload if: ${{ failure() }} run: scripts/remove_data.sh messaging - - uses: actions/upload-artifact@v4 - if: ${{ failure() }} - with: - name: quickstart_artifacts_messaging - path: quickstart-ios/ + # - uses: actions/upload-artifact@v4 + # if: ${{ failure() }} + # with: + # name: quickstart_artifacts_messaging + # path: quickstart-ios/ quickstart_framework_storage: needs: package-head @@ -625,34 +615,24 @@ jobs: find "${GITHUB_WORKSPACE}" -name "Firebase*latest.zip" -exec unzip -d "${HOME}"/ios_frameworks/ {} + - uses: actions/checkout@v4 - name: Setup quickstart - env: - LEGACY: true run: SAMPLE="$SDK" TARGET="${SDK}Example" scripts/setup_quickstart_framework.sh \ "${HOME}"/ios_frameworks/Firebase/FirebaseStorage/* \ "${HOME}"/ios_frameworks/Firebase/FirebaseAuth/* \ "${HOME}"/ios_frameworks/Firebase/FirebaseAnalytics/* - name: Setup swift quickstart - env: - LEGACY: true run: SAMPLE="$SDK" TARGET="${SDK}ExampleSwift" scripts/setup_quickstart_framework.sh - name: Install Secret GoogleService-Info.plist run: scripts/decrypt_gha_secret.sh scripts/gha-encrypted/qs-storage.plist.gpg \ quickstart-ios/storage/GoogleService-Info.plist "$plist_secret" - name: Test Quickstart - env: - LEGACY: true run: ([ -z $plist_secret ] || scripts/third_party/travis/retry.sh scripts/test_quickstart_framework.sh "${SDK}") - name: Test Swift Quickstart - env: - LEGACY: true run: ([ -z $plist_secret ] || scripts/third_party/travis/retry.sh scripts/test_quickstart_framework.sh "${SDK}" swift) - name: Remove data before upload - env: - LEGACY: true if: ${{ failure() }} run: scripts/remove_data.sh storage - - uses: actions/upload-artifact@v4 - if: ${{ failure() }} - with: - name: quickstart_artifacts_storage - path: quickstart-ios/ + # - uses: actions/upload-artifact@v4 + # if: ${{ failure() }} + # with: + # name: quickstart_artifacts_storage + # path: quickstart-ios/ diff --git a/scripts/remove_data.sh b/scripts/remove_data.sh index 04dcf25ae8f..90abf99b50b 100755 --- a/scripts/remove_data.sh +++ b/scripts/remove_data.sh @@ -16,10 +16,20 @@ set -xe SDK="$1" +if [[ -z "$SDK" ]]; then + echo "Error: SDK name not provided." >&2 + echo "Usage: $0 " >&2 + exit 1 +fi + DIR="${SDK}" -if [[ ! -z "$LEGACY" ]]; then - DIR="${SDK}/Legacy${SDK}Quickstart" +TARGET_DIR="quickstart-ios/${DIR}" + +if [ ! -d "$TARGET_DIR" ]; then + echo "Error: Directory '$TARGET_DIR' not found." >&2 + echo "Please provide a valid SDK name." >&2 + exit 1 fi -rm -f quickstart-ios/"${DIR}"/GoogleService-Info.plist +rm -f "${TARGET_DIR}"/GoogleService-Info.plist diff --git a/scripts/setup_quickstart_spm.sh b/scripts/setup_quickstart_spm.sh index 4c3145e2d33..faf0224fec8 100755 --- a/scripts/setup_quickstart_spm.sh +++ b/scripts/setup_quickstart_spm.sh @@ -149,10 +149,13 @@ update_spm_dependency() { "${NIGHTLY_RELEASE_TESTING}") # For release testing, find the latest CocoaPods tag. local latest_tag - latest_tag=$(git -C "$root_dir" tag -l "CocoaPods-*" --sort=-v:refname | \ - grep -E '^CocoaPods-[0-9]+\.[0-9]+\.[0-9]+$' | head -n 1) + latest_tag=$(git -C "$root_dir" tag -l "CocoaPods-*" --sort=-v:refname | + awk '/^CocoaPods-[0-9]+\.[0-9]+\.[0-9]+$/{print; exit}') if [[ -z "$latest_tag" ]]; then - echo "Error: Could not find a 'CocoaPods-X.Y.Z' tag." >&2 + echo "Error: Could not find the latest CocoaPods tag." >&2 + echo "This is often caused by a shallow git clone in a CI environment." >&2 + echo "If you are running in GitHub Actions, please ensure your checkout" >&2 + echo "step includes 'fetch-depth: 0' to fetch the full git history." >&2 exit 1 fi local tag_revision From 5349b87bb2441dcd86a5dc134950fdc65eba156c Mon Sep 17 00:00:00 2001 From: Nick Cooke <36927374+ncooke3@users.noreply.github.com> Date: Thu, 16 Oct 2025 16:26:02 -0400 Subject: [PATCH 04/29] fix: zip qs testing workflows (#15358) --- .github/workflows/zip.yml | 331 +++++++++++++++----------- scripts/patch_crashlytics_run_path.rb | 41 ++++ scripts/remove_spm_dependencies.rb | 112 +++++++++ scripts/setup_quickstart_framework.sh | 5 + scripts/zip_quickstart_test.sh | 17 +- 5 files changed, 367 insertions(+), 139 deletions(-) create mode 100755 scripts/patch_crashlytics_run_path.rb create mode 100755 scripts/remove_spm_dependencies.rb diff --git a/.github/workflows/zip.yml b/.github/workflows/zip.yml index 570bce868fd..1ed20a09658 100644 --- a/.github/workflows/zip.yml +++ b/.github/workflows/zip.yml @@ -1,3 +1,12 @@ +# This workflow tests the zip distribution of the SDK. +# There are three ways to configure the source of the zip file for testing: +# 1. To iterate on a PR: Set the `PINNED_RUN_ID` environment variable in this +# file to a successful zip packaging run. This is useful for avoiding +# re-running the packaging jobs on every commit. +# 2. For manual runs: Trigger the workflow via the GitHub UI (`workflow_dispatch`) +# and provide a "Run ID of a previous successful zip workflow" in the input. +# 3. By default (for scheduled and other PR runs): The workflow will build the +# zip from the current commit (HEAD). name: zip # TODO(ncooke3): Add FirebaseAI test. @@ -6,6 +15,11 @@ permissions: actions: read contents: read +env: + # When a run_id is specified, build jobs will be skipped and the specified + # run's artifacts will be used for testing. + PINNED_RUN_ID: '17965877651' + on: pull_request: paths: @@ -39,12 +53,27 @@ concurrency: cancel-in-progress: true jobs: + should_package: + runs-on: ubuntu-latest + outputs: + should_package: ${{ steps.check.outputs.should_package }} + steps: + - name: Check if packaging should be skipped + id: check + run: | + if [[ -n "${{ env.PINNED_RUN_ID }}" || -n "${{ github.event.inputs.zip_run_id }}" ]]; then + echo "should_package=false" >> $GITHUB_OUTPUT + else + echo "should_package=true" >> $GITHUB_OUTPUT + fi + package-release: + needs: should_package # Don't run on private repo. if: | github.repository == 'firebase/firebase-ios-sdk' && contains(fromJSON('["schedule", "pull_request", "workflow_dispatch"]'), github.event_name) && - github.event.inputs.zip_run_id == '' + needs.should_package.outputs.should_package == 'true' runs-on: macos-14 steps: - uses: actions/checkout@v4 @@ -71,11 +100,12 @@ jobs: path: release_zip_dir build: + needs: should_package # Don't run on private repo unless it is a PR. if: | github.repository == 'firebase/firebase-ios-sdk' && contains(fromJSON('["schedule", "pull_request", "workflow_dispatch"]'), github.event_name) && - github.event.inputs.zip_run_id == '' + needs.should_package.outputs.should_package == 'true' runs-on: macos-14 steps: - uses: actions/checkout@v4 @@ -87,7 +117,8 @@ jobs: swift build -v package-head: - needs: build + needs: [build, should_package] + if: needs.should_package.outputs.should_package == 'true' strategy: matrix: linking_type: [static, dynamic] @@ -110,16 +141,71 @@ jobs: build-head \ ${{ matrix.linking_type }} - uses: actions/upload-artifact@v4 - if: ${{ always() }} + if: always() with: name: ${{ matrix.linking_type == 'static' && 'Firebase-actions-dir' || 'Firebase-actions-dir-dynamic' }} # Zip the entire output directory since the builder adds subdirectories we don't know the # name of. path: zip_output_dir + packaging_done: + runs-on: ubuntu-latest + needs: [package-head] + if: always() + outputs: + run_id: ${{ steps.get_run_id.outputs.run_id }} + steps: + - name: Check packaging result + if: ${{ needs.package-head.result == 'failure' }} + run: | + echo "Packaging failed. Aborting." + exit 1 + - name: Get Run ID + id: get_run_id + run: | + if [[ -n "${{ github.event.inputs.zip_run_id }}" ]]; then + echo "run_id=${{ github.event.inputs.zip_run_id }}" >> $GITHUB_OUTPUT + elif [[ -n "${{ env.PINNED_RUN_ID }}" ]]; then + echo "run_id=${{ env.PINNED_RUN_ID }}" >> $GITHUB_OUTPUT + else + echo "run_id=${{ github.run_id }}" >> $GITHUB_OUTPUT + fi + + check_framework_firestore_symbols: + needs: packaging_done + if: ${{ !cancelled() }} + env: + FIREBASECI_USE_LATEST_GOOGLEAPPMEASUREMENT: 1 + runs-on: macos-14 + steps: + - name: Xcode 16.2 + run: sudo xcode-select -s /Applications/Xcode_16.2.app/Contents/Developer + - uses: actions/checkout@v4 + - name: Get framework dir + uses: actions/download-artifact@v4.1.7 + with: + name: Firebase-actions-dir + run-id: ${{ needs.packaging_done.outputs.run_id }} + github-token: ${{ secrets.GITHUB_TOKEN }} + - uses: ruby/setup-ruby@354a1ad156761f5ee2b7b13fa8e09943a5e8d252 # v1 + - name: Setup Bundler + run: ./scripts/setup_bundler.sh + - name: Install xcpretty + run: gem install xcpretty + - name: Move frameworks + run: | + mkdir -p "${HOME}"/ios_frameworks/ + find "${GITHUB_WORKSPACE}" -name "Firebase*latest.zip" -exec unzip -d "${HOME}"/ios_frameworks/ {} + + - uses: actions/checkout@v4 + - name: Check linked Firestore.xcframework for unlinked symbols. + run: | + scripts/check_firestore_symbols.sh \ + $(pwd) \ + "${HOME}"/ios_frameworks/Firebase/FirebaseFirestore/FirebaseFirestoreInternal.xcframework + quickstart_framework_abtesting: - needs: package-head - if: ${{ !cancelled() && (success() || github.event.inputs.zip_run_id != '') }} + needs: packaging_done + if: ${{ !cancelled() }} env: plist_secret: ${{ secrets.GHASecretsGPGPassphrase1 }} SDK: "ABTesting" @@ -136,7 +222,7 @@ jobs: uses: actions/download-artifact@v4.1.7 with: name: ${{ matrix.artifact }} - run-id: ${{ github.event.inputs.zip_run_id || github.run_id }} + run-id: ${{ needs.packaging_done.outputs.run_id }} github-token: ${{ secrets.GITHUB_TOKEN }} - uses: ruby/setup-ruby@354a1ad156761f5ee2b7b13fa8e09943a5e8d252 # v1 - name: Xcode @@ -162,24 +248,30 @@ jobs: - name: Test Quickstart run: ([ -z $plist_secret ] || scripts/third_party/travis/retry.sh scripts/test_quickstart_framework.sh "${SDK}") - name: Remove data before upload - if: ${{ failure() }} + if: always() run: scripts/remove_data.sh abtesting # - uses: actions/upload-artifact@v4 - # if: ${{ failure() }} + # if: failure() # with: # name: quickstart_artifacts_abtesting - # path: quickstart-ios/ + - uses: actions/upload-artifact@v4 + if: failure() + with: + name: quickstart_artifacts_abtesting + path: | + quickstart-ios/ + !quickstart-ios/**/GoogleService-Info.plist quickstart_framework_auth: - needs: package-head - if: ${{ !cancelled() && (success() || github.event.inputs.zip_run_id != '') }} + needs: packaging_done + if: ${{ !cancelled() }} env: plist_secret: ${{ secrets.GHASecretsGPGPassphrase1 }} SDK: "Authentication" strategy: matrix: os: [macos-15] - artifact: [Firebase-actions-dir, Firebase-actions-dir-dynamic] + artifact: [Firebase-actions-dir] , Firebase-actions-dir-dynamic] include: - os: macos-15 xcode: Xcode_16.4 @@ -190,7 +282,7 @@ jobs: uses: actions/download-artifact@v4.1.7 with: name: ${{ matrix.artifact }} - run-id: ${{ github.event.inputs.zip_run_id || github.run_id }} + run-id: ${{ needs.packaging_done.outputs.run_id }} github-token: ${{ secrets.GITHUB_TOKEN }} - uses: ruby/setup-ruby@354a1ad156761f5ee2b7b13fa8e09943a5e8d252 # v1 - name: Xcode @@ -212,18 +304,17 @@ jobs: 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_framework.sh "${SDK}") - - name: Remove data before upload - if: ${{ failure() }} - run: scripts/remove_data.sh authentiation - # - uses: actions/upload-artifact@v4 - # if: ${{ failure() }} - # with: - # name: quickstart_artifacts_auth - # path: quickstart-ios/ + - uses: actions/upload-artifact@v4 + if: failure() + with: + name: quickstart_artifacts_auth + path: | + quickstart-ios/ + !quickstart-ios/**/GoogleService-Info.plist quickstart_framework_config: - needs: package-head - if: ${{ !cancelled() && (success() || github.event.inputs.zip_run_id != '') }} + needs: packaging_done + if: ${{ !cancelled() }} env: plist_secret: ${{ secrets.GHASecretsGPGPassphrase1 }} SDK: "Config" @@ -240,7 +331,7 @@ jobs: uses: actions/download-artifact@v4.1.7 with: name: ${{ matrix.artifact }} - run-id: ${{ github.event.inputs.zip_run_id || github.run_id }} + run-id: ${{ needs.packaging_done.outputs.run_id }} github-token: ${{ secrets.GITHUB_TOKEN }} - uses: ruby/setup-ruby@354a1ad156761f5ee2b7b13fa8e09943a5e8d252 # v1 - name: Xcode @@ -262,17 +353,17 @@ jobs: - name: Test Swift Quickstart run: ([ -z $plist_secret ] || scripts/third_party/travis/retry.sh scripts/test_quickstart_framework.sh "${SDK}") - name: Remove data before upload - if: ${{ failure() }} + if: always() run: scripts/remove_data.sh config - # - uses: actions/upload-artifact@v4 - # if: ${{ failure() }} - # with: - # name: quickstart_artifacts_config - # path: quickstart-ios/ + - uses: actions/upload-artifact@v4 + if: failure() + with: + name: quickstart_artifacts_config + path: quickstart-ios/ quickstart_framework_crashlytics: - needs: package-head - if: ${{ !cancelled() && (success() || github.event.inputs.zip_run_id != '') }} + needs: packaging_done + if: ${{ !cancelled() }} env: plist_secret: ${{ secrets.GHASecretsGPGPassphrase1 }} SDK: "Crashlytics" @@ -289,7 +380,7 @@ jobs: uses: actions/download-artifact@v4.1.7 with: name: ${{ matrix.artifact }} - run-id: ${{ github.event.inputs.zip_run_id || github.run_id }} + run-id: ${{ needs.packaging_done.outputs.run_id }} github-token: ${{ secrets.GITHUB_TOKEN }} - uses: ruby/setup-ruby@354a1ad156761f5ee2b7b13fa8e09943a5e8d252 # v1 - name: Xcode @@ -303,13 +394,18 @@ jobs: - uses: actions/checkout@v4 - name: Setup quickstart run: | - SAMPLE="$SDK" TARGET="${SDK}Example" scripts/setup_quickstart_framework.sh \ - "${HOME}"/ios_frameworks/Firebase/FirebaseCrashlytics/* \ - "${HOME}"/ios_frameworks/Firebase/FirebaseAnalytics/* - cp quickstart-ios/crashlytics/LegacyCrashlyticsQuickstart/Firebase/run quickstart-ios/crashlytics/LegacyCrashlyticsQuickstart - cp quickstart-ios/crashlytics/LegacyCrashlyticsQuickstart/Firebase/upload-symbols quickstart-ios/crashlytics/LegacyCrashlyticsQuickstart - chmod +x quickstart-ios/crashlytics/LegacyCrashlyticsQuickstart/run - chmod +x quickstart-ios/crashlytics/LegacyCrashlyticsQuickstart/upload-symbols + rm -rf "${HOME}"/ios_frameworks/Firebase/FirebaseAnalytics/FirebaseAnalytics* + rm -rf "${HOME}"/ios_frameworks/Firebase/FirebaseAnalytics/GoogleAppMeasurement* + rm -rf "${HOME}"/ios_frameworks/Firebase/FirebaseAnalytics/GoogleAds* + SAMPLE="$SDK" TARGET="${SDK}Example" scripts/setup_quickstart_framework.sh \ + "${HOME}"/ios_frameworks/Firebase/FirebaseCrashlytics/* \ + "${HOME}"/ios_frameworks/Firebase/FirebaseAnalytics/* + - name: Add frameworks to Crashlytics watchOS target + run: | + cd quickstart-ios/crashlytics + "${GITHUB_WORKSPACE}"/quickstart-ios/scripts/add_framework_script.rb --sdk "Crashlytics" --target "CrashlyticsExample_(watchOS)_Extension" --framework_path Firebase/ + - name: Patch Crashlytics Run Script Path + run: scripts/patch_crashlytics_run_path.rb # TODO(#8057): Restore Swift Quickstart # - name: Setup swift quickstart # env: @@ -327,18 +423,17 @@ jobs: # env: # LEGACY: true # run: ([ -z $plist_secret ] || scripts/third_party/travis/retry.sh scripts/test_quickstart_framework.sh "${SDK}" swift) - - name: Remove data before upload - if: ${{ failure() }} - run: scripts/remove_data.sh crashlytics - # - uses: actions/upload-artifact@v4 - # if: ${{ failure() }} - # with: - # name: quickstart_artifacts_crashlytics - # path: quickstart-ios/ + - uses: actions/upload-artifact@v4 + if: failure() + with: + name: quickstart_artifacts_crashlytics + path: | + quickstart-ios/ + !quickstart-ios/**/GoogleService-Info.plist quickstart_framework_database: - needs: package-head - if: ${{ !cancelled() && (success() || github.event.inputs.zip_run_id != '') }} + needs: packaging_done + if: ${{ !cancelled() }} env: plist_secret: ${{ secrets.GHASecretsGPGPassphrase1 }} SDK: "Database" @@ -354,7 +449,7 @@ jobs: uses: actions/download-artifact@v4.1.7 with: name: ${{ matrix.artifact }} - run-id: ${{ github.event.inputs.zip_run_id || github.run_id }} + run-id: ${{ needs.packaging_done.outputs.run_id }} github-token: ${{ secrets.GITHUB_TOKEN }} - uses: ruby/setup-ruby@354a1ad156761f5ee2b7b13fa8e09943a5e8d252 # v1 - name: Xcode @@ -379,18 +474,17 @@ jobs: quickstart-ios/database/GoogleService-Info.plist "$plist_secret" - name: Test Quickstart run: ([ -z $plist_secret ] || scripts/third_party/travis/retry.sh scripts/test_quickstart_framework.sh "${SDK}") - - name: Remove data before upload - if: ${{ failure() }} - run: scripts/remove_data.sh database - # - uses: actions/upload-artifact@v4 - # if: ${{ failure() }} - # with: - # name: quickstart_artifacts database - # path: quickstart-ios/ + - uses: actions/upload-artifact@v4 + if: failure() + with: + name: quickstart_artifacts_database + path: | + quickstart-ios/ + !quickstart-ios/**/GoogleService-Info.plist quickstart_framework_firestore: - needs: package-head - if: ${{ !cancelled() && (success() || github.event.inputs.zip_run_id != '') }} + needs: packaging_done + if: ${{ !cancelled() }} env: plist_secret: ${{ secrets.GHASecretsGPGPassphrase1 }} SDK: "Firestore" @@ -407,7 +501,7 @@ jobs: uses: actions/download-artifact@v4.1.7 with: name: ${{ matrix.artifact }} - run-id: ${{ github.event.inputs.zip_run_id || github.run_id }} + run-id: ${{ needs.packaging_done.outputs.run_id }} github-token: ${{ secrets.GITHUB_TOKEN }} - uses: ruby/setup-ruby@354a1ad156761f5ee2b7b13fa8e09943a5e8d252 # v1 - name: Xcode @@ -426,7 +520,7 @@ jobs: "${HOME}"/ios_frameworks/Firebase/FirebaseAuth/* \ "${HOME}"/ios_frameworks/Firebase/FirebaseAnalytics/* - name: Upload build logs on failure - if: ${{ failure() }} + if: failure() uses: actions/upload-artifact@v4 with: name: build_logs_firestore_${{ matrix.artifact }}_${{ matrix.build-env.os }} @@ -437,49 +531,17 @@ jobs: - name: Test Quickstart run: ([ -z $plist_secret ] || scripts/third_party/travis/retry.sh scripts/test_quickstart_framework.sh "${SDK}") - name: Remove data before upload and zip directory to reduce upload size. - if: ${{ failure() }} + if: always() run: scripts/remove_data.sh firestore; zip -r --symlinks quickstart_artifacts_firestore.zip quickstart-ios/ - # - uses: actions/upload-artifact@v4 - # if: ${{ failure() }} - # with: - # name: quickstart_artifacts_firestore_${{ matrix.artifact }}_${{ matrix.build-env.os }} - # path: quickstart_artifacts_firestore.zip - - check_framework_firestore_symbols: - needs: package-head - if: ${{ !cancelled() && (success() || github.event.inputs.zip_run_id != '') }} - env: - FIREBASECI_USE_LATEST_GOOGLEAPPMEASUREMENT: 1 - runs-on: macos-14 - steps: - - name: Xcode 16.2 - run: sudo xcode-select -s /Applications/Xcode_16.2.app/Contents/Developer - - uses: actions/checkout@v4 - - name: Get framework dir - uses: actions/download-artifact@v4.1.7 - with: - name: Firebase-actions-dir - run-id: ${{ github.event.inputs.zip_run_id || github.run_id }} - github-token: ${{ secrets.GITHUB_TOKEN }} - - uses: ruby/setup-ruby@354a1ad156761f5ee2b7b13fa8e09943a5e8d252 # v1 - - name: Setup Bundler - run: ./scripts/setup_bundler.sh - - name: Install xcpretty - run: gem install xcpretty - - name: Move frameworks - run: | - mkdir -p "${HOME}"/ios_frameworks/ - find "${GITHUB_WORKSPACE}" -name "Firebase*latest.zip" -exec unzip -d "${HOME}"/ios_frameworks/ {} + - - uses: actions/checkout@v4 - - name: Check linked Firestore.xcframework for unlinked symbols. - run: | - scripts/check_firestore_symbols.sh \ - $(pwd) \ - "${HOME}"/ios_frameworks/Firebase/FirebaseFirestore/FirebaseFirestoreInternal.xcframework + - uses: actions/upload-artifact@v4 + if: failure() + with: + name: quickstart_artifacts_firestore_${{ matrix.artifact }}_${{ matrix.build-env.os }} + path: quickstart_artifacts_firestore.zip quickstart_framework_inappmessaging: - needs: package-head - if: ${{ !cancelled() && (success() || github.event.inputs.zip_run_id != '') }} + needs: packaging_done + if: ${{ !cancelled() }} env: plist_secret: ${{ secrets.GHASecretsGPGPassphrase1 }} SDK: "InAppMessaging" @@ -496,7 +558,7 @@ jobs: uses: actions/download-artifact@v4.1.7 with: name: ${{ matrix.artifact }} - run-id: ${{ github.event.inputs.zip_run_id || github.run_id }} + run-id: ${{ needs.packaging_done.outputs.run_id }} github-token: ${{ secrets.GITHUB_TOKEN }} - uses: ruby/setup-ruby@354a1ad156761f5ee2b7b13fa8e09943a5e8d252 # v1 - name: Xcode @@ -521,18 +583,17 @@ jobs: run: ([ -z $plist_secret ] || scripts/third_party/travis/retry.sh scripts/test_quickstart_framework.sh "${SDK}") - name: Test Swift Quickstart run: ([ -z $plist_secret ] || scripts/third_party/travis/retry.sh scripts/test_quickstart_framework.sh "${SDK}" swift) - - name: Remove data before upload - if: ${{ failure() }} - run: scripts/remove_data.sh inappmessaging - # - uses: actions/upload-artifact@v4 - # if: ${{ failure() }} - # with: - # name: quickstart_artifacts_inappmessaging - # path: quickstart-ios/ + - uses: actions/upload-artifact@v4 + if: failure() + with: + name: quickstart_artifacts_inappmessaging + path: | + quickstart-ios/ + !quickstart-ios/**/GoogleService-Info.plist quickstart_framework_messaging: - needs: package-head - if: ${{ !cancelled() && (success() || github.event.inputs.zip_run_id != '') }} + needs: packaging_done + if: ${{ !cancelled() }} env: plist_secret: ${{ secrets.GHASecretsGPGPassphrase1 }} SDK: "Messaging" @@ -549,7 +610,7 @@ jobs: uses: actions/download-artifact@v4.1.7 with: name: ${{ matrix.artifact }} - run-id: ${{ github.event.inputs.zip_run_id || github.run_id }} + run-id: ${{ needs.packaging_done.outputs.run_id }} github-token: ${{ secrets.GITHUB_TOKEN }} - uses: ruby/setup-ruby@354a1ad156761f5ee2b7b13fa8e09943a5e8d252 # v1 - name: Xcode @@ -574,18 +635,17 @@ jobs: run: ([ -z $plist_secret ] || scripts/third_party/travis/retry.sh scripts/test_quickstart_framework.sh "${SDK}") - name: Test Swift Quickstart run: ([ -z $plist_secret ] || scripts/third_party/travis/retry.sh scripts/test_quickstart_framework.sh "${SDK}" swift) - - name: Remove data before upload - if: ${{ failure() }} - run: scripts/remove_data.sh messaging - # - uses: actions/upload-artifact@v4 - # if: ${{ failure() }} - # with: - # name: quickstart_artifacts_messaging - # path: quickstart-ios/ + - uses: actions/upload-artifact@v4 + if: failure() + with: + name: quickstart_artifacts_messaging + path: | + quickstart-ios/ + !quickstart-ios/**/GoogleService-Info.plist quickstart_framework_storage: - needs: package-head - if: ${{ !cancelled() && (success() || github.event.inputs.zip_run_id != '') }} + needs: packaging_done + if: ${{ !cancelled() }} env: plist_secret: ${{ secrets.GHASecretsGPGPassphrase1 }} SDK: "Storage" @@ -602,7 +662,7 @@ jobs: uses: actions/download-artifact@v4.1.7 with: name: ${{ matrix.artifact }} - run-id: ${{ github.event.inputs.zip_run_id || github.run_id }} + run-id: ${{ needs.packaging_done.outputs.run_id }} github-token: ${{ secrets.GITHUB_TOKEN }} - uses: ruby/setup-ruby@354a1ad156761f5ee2b7b13fa8e09943a5e8d252 # v1 - name: Xcode @@ -626,13 +686,10 @@ jobs: quickstart-ios/storage/GoogleService-Info.plist "$plist_secret" - name: Test Quickstart run: ([ -z $plist_secret ] || scripts/third_party/travis/retry.sh scripts/test_quickstart_framework.sh "${SDK}") - - name: Test Swift Quickstart - run: ([ -z $plist_secret ] || scripts/third_party/travis/retry.sh scripts/test_quickstart_framework.sh "${SDK}" swift) - - name: Remove data before upload - if: ${{ failure() }} - run: scripts/remove_data.sh storage - # - uses: actions/upload-artifact@v4 - # if: ${{ failure() }} - # with: - # name: quickstart_artifacts_storage - # path: quickstart-ios/ + - uses: actions/upload-artifact@v4 + if: failure() + with: + name: quickstart_artifacts_storage + path: | + quickstart-ios/ + !quickstart-ios/**/GoogleService-Info.plist diff --git a/scripts/patch_crashlytics_run_path.rb b/scripts/patch_crashlytics_run_path.rb new file mode 100755 index 00000000000..0af96faed0b --- /dev/null +++ b/scripts/patch_crashlytics_run_path.rb @@ -0,0 +1,41 @@ +#!/usr/bin/env ruby + +# Copyright 2025 Google LLC +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# http://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. + +require 'xcodeproj' + +# This script patches the Crashlytics Quickstart's Xcode project to fix the +# path to the `run` script for XCFramework-based builds. +# +# The default project assumes an SPM dependency. This script changes the path +# to point to the location where the `run` script is placed in the zip +# distribution test environment. + +project_path = 'quickstart-ios/crashlytics/CrashlyticsExample.xcodeproj' +project = Xcodeproj::Project.open(project_path) +new_path = '"${SRCROOT}/Firebase/run"' + +project.targets.each do |target| + target.build_phases.each do |phase| + if phase.is_a?(Xcodeproj::Project::Object::PBXShellScriptBuildPhase) && phase.name == 'Run Script' + if phase.shell_script.include?('SourcePackages/checkouts/firebase-ios-sdk/Crashlytics/run') + puts "Patching Run Script phase in target '#{target.name}' to: #{new_path}" + phase.shell_script = new_path + end + end + end +end + +project.save diff --git a/scripts/remove_spm_dependencies.rb b/scripts/remove_spm_dependencies.rb new file mode 100755 index 00000000000..d755ad917ea --- /dev/null +++ b/scripts/remove_spm_dependencies.rb @@ -0,0 +1,112 @@ +#!/usr/bin/env ruby + +# Copyright 2025 Google LLC +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may +# obtain a copy of the License at +# +# http://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. + +require 'xcodeproj' +require 'set' + +# This script removes all Swift Package Manager dependencies from an Xcode project. +# It's designed to be used in CI to prepare a project for framework-based testing. + +# --- Argument Parsing --- +unless ARGV.length == 1 + puts "Usage: #{$0} " + exit 1 +end + +project_path = ARGV[0] + +# --- Main Logic --- +begin + project = Xcodeproj::Project.open(project_path) +rescue => e + puts "Error opening project at #{project_path}: #{e.message}" + exit 1 +end + +puts "Opened project: #{project.path}" + +# --- Step 1: Find all SPM product dependencies --- +package_product_dependencies = project.objects.select do |obj| + obj.is_a?(Xcodeproj::Project::Object::XCSwiftPackageProductDependency) +end + +if package_product_dependencies.empty? + puts "No SPM product dependencies found to remove." +else + puts "Found #{package_product_dependencies.count} SPM product dependencies. Removing all references..." + package_product_dep_uuids = package_product_dependencies.map(&:uuid).to_set + + # --- Step 2: Find all BuildFile objects that reference these SPM products --- + build_files_to_remove = project.objects.select do |obj| + obj.is_a?(Xcodeproj::Project::Object::PBXBuildFile) && + obj.product_ref && + package_product_dep_uuids.include?(obj.product_ref.uuid) + end + build_file_uuids_to_remove = build_files_to_remove.map(&:uuid).to_set + + # --- Step 3: Remove references from all targets --- + project.targets.each do |target| + puts "Cleaning target '#{target.name}'..." + + # Remove from target dependencies list + removed_deps = target.dependencies.reject! do |dep| + package_product_dep_uuids.include?(dep.uuid) + end + if removed_deps + puts " - Removed #{removed_deps.count} SPM target dependencies." + end + + # Remove from build phases (e.g., "Link Binary With Libraries") + target.build_phases.each do |phase| + next unless phase.respond_to?(:files) + + original_file_count = phase.files.count + phase.files.reject! do |build_file| + build_file_uuids_to_remove.include?(build_file.uuid) + end + removed_count = original_file_count - phase.files.count + if removed_count > 0 + puts " - Removed #{removed_count} SPM build file references from '#{phase.display_name}'." + end + end + end + + # --- Step 4: Delete the now-orphaned BuildFile and dependency objects --- + puts "Deleting #{build_files_to_remove.count} SPM BuildFile object(s)..." + build_files_to_remove.each(&:remove_from_project) + + puts "Deleting #{package_product_dependencies.count} SPM product dependency object(s)..." + package_product_dependencies.each(&:remove_from_project) +end + +# --- Step 5: Remove package references from the project root --- +unless project.root_object.package_references.empty? + puts "Removing #{project.root_object.package_references.count} package reference(s)..." + project.root_object.package_references.clear + puts "All package references removed from the project." +else + puts "No package references found in the project." +end + +# --- Step 6: Save the modified project --- +begin + project.save + puts "Project saved successfully." +rescue => e + puts "Error saving project: #{e.message}" + exit 1 +end diff --git a/scripts/setup_quickstart_framework.sh b/scripts/setup_quickstart_framework.sh index 51499ab6efa..f79bd0baa18 100755 --- a/scripts/setup_quickstart_framework.sh +++ b/scripts/setup_quickstart_framework.sh @@ -20,6 +20,11 @@ if [ ! -d "quickstart-ios" ]; then fi QS_SCRIPTS="${REPO}"/quickstart-ios/scripts cd quickstart-ios/"${SAMPLE}" +git checkout nc/quickstarts + +# Remove all SPM dependencies from the project. This is necessary to prepare +# the project for framework-based testing. +"${REPO}"/scripts/remove_spm_dependencies.rb "${SAMPLE}Example.xcodeproj" if [[ ! -z "$LEGACY" ]]; then cd "Legacy${SAMPLE}Quickstart" diff --git a/scripts/zip_quickstart_test.sh b/scripts/zip_quickstart_test.sh index 3b531f8e3f9..1476b2b1985 100755 --- a/scripts/zip_quickstart_test.sh +++ b/scripts/zip_quickstart_test.sh @@ -42,10 +42,23 @@ else device_name="iPhone 16" fi +# Define project and scheme names +PROJECT_NAME="${SAMPLE}Example.xcodeproj" +SCHEME_NAME="${SAMPLE}Example${SWIFT_SUFFIX}" + +# Check if the scheme exists before attempting to build. +# The `awk` command prints all lines from "Schemes:" to the end of the output. +if ! xcodebuild -list -project "${PROJECT_NAME}" | awk '/Schemes:/,0' | grep -q "^\s*${SCHEME_NAME}"$; then + echo "Error: Scheme '${SCHEME_NAME}' not found in project '${PROJECT_NAME}'." + echo "Available schemes from '${PROJECT_NAME}':" + xcodebuild -list -project "${PROJECT_NAME}" + exit 65 +fi + ( xcodebuild \ --project ${SAMPLE}Example.xcodeproj \ --scheme ${SAMPLE}Example${SWIFT_SUFFIX} \ +-project ${PROJECT_NAME} \ +-scheme ${SCHEME_NAME} \ -destination "platform=iOS Simulator,name=$device_name" "SWIFT_VERSION=5.3" "OTHER_LDFLAGS=\$(OTHER_LDFLAGS) -ObjC" "FRAMEWORK_SEARCH_PATHS= \$(PROJECT_DIR)/Firebase/" HEADER_SEARCH_PATHS='$(PROJECT_DIR)/Firebase' \ build \ ) || EXIT_STATUS=$? From f7a86289ef51972860423d63111afaf92206c12d Mon Sep 17 00:00:00 2001 From: Nick Cooke <36927374+ncooke3@users.noreply.github.com> Date: Wed, 22 Oct 2025 12:51:33 -0400 Subject: [PATCH 05/29] fix(ci): Resolve syntax error in zip.yml (#15425) --- .github/workflows/inappmessaging.yml | 1 + .github/workflows/release.yml | 5 +++-- .github/workflows/zip.yml | 19 +++---------------- Gemfile | 1 + 4 files changed, 8 insertions(+), 18 deletions(-) diff --git a/.github/workflows/inappmessaging.yml b/.github/workflows/inappmessaging.yml index 9275f825492..0fdc367fac5 100644 --- a/.github/workflows/inappmessaging.yml +++ b/.github/workflows/inappmessaging.yml @@ -79,5 +79,6 @@ jobs: setup_command: scripts/setup_quickstart_spm.sh inappmessaging plist_src_path: scripts/gha-encrypted/qs-inappmessaging.plist.gpg plist_dst_path: quickstart-ios/inappmessaging/GoogleService-Info.plist + run_tests: false secrets: plist_secret: ${{ secrets.GHASecretsGPGPassphrase1 }} diff --git a/.github/workflows/release.yml b/.github/workflows/release.yml index 92a71e0f392..9dc14d9d904 100644 --- a/.github/workflows/release.yml +++ b/.github/workflows/release.yml @@ -15,6 +15,7 @@ on: env: FIREBASE_CI: true + FIREBASECI_USE_LATEST_GOOGLEAPPMEASUREMENT: true concurrency: group: ${{ github.workflow }}-${{ github.head_ref || github.ref }} @@ -72,7 +73,7 @@ jobs: - product: Messaging run_tests: false - product: InAppMessaging - run_tests: true + run_tests: false - product: Firestore run_tests: false - product: Database @@ -82,7 +83,7 @@ jobs: - product: Crashlytics run_tests: true - product: ABTesting - run_tests: true + run_tests: false name: 'quickstart (release, ${{ matrix.product }}, run_tests: ${{ matrix.run_tests }})' env: plist_secret: ${{ secrets.GHASecretsGPGPassphrase1 }} diff --git a/.github/workflows/zip.yml b/.github/workflows/zip.yml index 1ed20a09658..a5bc5c9bab2 100644 --- a/.github/workflows/zip.yml +++ b/.github/workflows/zip.yml @@ -9,8 +9,6 @@ # zip from the current commit (HEAD). name: zip -# TODO(ncooke3): Add FirebaseAI test. - permissions: actions: read contents: read @@ -247,13 +245,6 @@ jobs: quickstart-ios/abtesting/GoogleService-Info.plist "$plist_secret" - name: Test Quickstart run: ([ -z $plist_secret ] || scripts/third_party/travis/retry.sh scripts/test_quickstart_framework.sh "${SDK}") - - name: Remove data before upload - if: always() - run: scripts/remove_data.sh abtesting - # - uses: actions/upload-artifact@v4 - # if: failure() - # with: - # name: quickstart_artifacts_abtesting - uses: actions/upload-artifact@v4 if: failure() with: @@ -271,7 +262,7 @@ jobs: strategy: matrix: os: [macos-15] - artifact: [Firebase-actions-dir] , Firebase-actions-dir-dynamic] + artifact: [Firebase-actions-dir, Firebase-actions-dir-dynamic] include: - os: macos-15 xcode: Xcode_16.4 @@ -462,7 +453,7 @@ jobs: find "${GITHUB_WORKSPACE}" -name "Firebase*latest.zip" -exec unzip -d "${HOME}"/ios_frameworks/ {} + - uses: actions/checkout@v4 - name: Setup quickstart - run: SAMPLE="$SDK" TARGET="${SDK}Example" NON_FIREBASE_SDKS="FirebaseDatabaseUI" scripts/setup_quickstart_framework.sh \ + run: SAMPLE="$SDK" TARGET="${SDK}ExampleSwift" NON_FIREBASE_SDKS="FirebaseDatabaseUI" scripts/setup_quickstart_framework.sh \ "${HOME}"/ios_frameworks/Firebase/FirebaseDatabase/* \ "${HOME}"/ios_frameworks/Firebase/FirebaseStorage/* \ "${HOME}"/ios_frameworks/Firebase/FirebaseFirestore/* \ @@ -473,7 +464,7 @@ jobs: run: scripts/decrypt_gha_secret.sh scripts/gha-encrypted/qs-database.plist.gpg \ quickstart-ios/database/GoogleService-Info.plist "$plist_secret" - name: Test Quickstart - run: ([ -z $plist_secret ] || scripts/third_party/travis/retry.sh scripts/test_quickstart_framework.sh "${SDK}") + run: ([ -z $plist_secret ] || scripts/third_party/travis/retry.sh scripts/test_quickstart_framework.sh "${SDK}" swift) - uses: actions/upload-artifact@v4 if: failure() with: @@ -579,8 +570,6 @@ jobs: - name: Install Secret GoogleService-Info.plist run: scripts/decrypt_gha_secret.sh scripts/gha-encrypted/qs-inappmessaging.plist.gpg \ quickstart-ios/inappmessaging/GoogleService-Info.plist "$plist_secret" - - name: Test Quickstart - run: ([ -z $plist_secret ] || scripts/third_party/travis/retry.sh scripts/test_quickstart_framework.sh "${SDK}") - name: Test Swift Quickstart run: ([ -z $plist_secret ] || scripts/third_party/travis/retry.sh scripts/test_quickstart_framework.sh "${SDK}" swift) - uses: actions/upload-artifact@v4 @@ -633,8 +622,6 @@ jobs: quickstart-ios/messaging/GoogleService-Info.plist "$plist_secret" - name: Test Quickstart run: ([ -z $plist_secret ] || scripts/third_party/travis/retry.sh scripts/test_quickstart_framework.sh "${SDK}") - - name: Test Swift Quickstart - run: ([ -z $plist_secret ] || scripts/third_party/travis/retry.sh scripts/test_quickstart_framework.sh "${SDK}" swift) - uses: actions/upload-artifact@v4 if: failure() with: diff --git a/Gemfile b/Gemfile index cc267b2e746..cbd2bfb227e 100644 --- a/Gemfile +++ b/Gemfile @@ -1,4 +1,5 @@ # To update, change version below, run bundle install, test, +# # commit Gemfile and Gemfile.lock. source 'https://rubygems.org' From ca0ae6b7aea55dcd4e089f23b052f2ca7d997fc6 Mon Sep 17 00:00:00 2001 From: Nick Cooke <36927374+ncooke3@users.noreply.github.com> Date: Tue, 28 Oct 2025 16:53:08 -0400 Subject: [PATCH 06/29] fix: Fixes to artifact uploads and scheme name-related issues (#15437) --- .github/workflows/zip.yml | 28 +++++++++++----------------- 1 file changed, 11 insertions(+), 17 deletions(-) diff --git a/.github/workflows/zip.yml b/.github/workflows/zip.yml index a5bc5c9bab2..488b1c2f5d9 100644 --- a/.github/workflows/zip.yml +++ b/.github/workflows/zip.yml @@ -248,7 +248,7 @@ jobs: - uses: actions/upload-artifact@v4 if: failure() with: - name: quickstart_artifacts_abtesting + name: quickstart_artifacts_abtesting_${{ matrix.artifact }} path: | quickstart-ios/ !quickstart-ios/**/GoogleService-Info.plist @@ -298,7 +298,7 @@ jobs: - uses: actions/upload-artifact@v4 if: failure() with: - name: quickstart_artifacts_auth + name: quickstart_artifacts_auth_${{ matrix.artifact }} path: | quickstart-ios/ !quickstart-ios/**/GoogleService-Info.plist @@ -349,7 +349,7 @@ jobs: - uses: actions/upload-artifact@v4 if: failure() with: - name: quickstart_artifacts_config + name: quickstart_artifacts_config_${{ matrix.artifact }} path: quickstart-ios/ quickstart_framework_crashlytics: @@ -417,7 +417,7 @@ jobs: - uses: actions/upload-artifact@v4 if: failure() with: - name: quickstart_artifacts_crashlytics + name: quickstart_artifacts_crashlytics_${{ matrix.artifact }} path: | quickstart-ios/ !quickstart-ios/**/GoogleService-Info.plist @@ -453,7 +453,7 @@ jobs: find "${GITHUB_WORKSPACE}" -name "Firebase*latest.zip" -exec unzip -d "${HOME}"/ios_frameworks/ {} + - uses: actions/checkout@v4 - name: Setup quickstart - run: SAMPLE="$SDK" TARGET="${SDK}ExampleSwift" NON_FIREBASE_SDKS="FirebaseDatabaseUI" scripts/setup_quickstart_framework.sh \ + run: SAMPLE="$SDK" TARGET="${SDK}Example" NON_FIREBASE_SDKS="FirebaseDatabaseUI" scripts/setup_quickstart_framework.sh \ "${HOME}"/ios_frameworks/Firebase/FirebaseDatabase/* \ "${HOME}"/ios_frameworks/Firebase/FirebaseStorage/* \ "${HOME}"/ios_frameworks/Firebase/FirebaseFirestore/* \ @@ -464,11 +464,11 @@ jobs: run: scripts/decrypt_gha_secret.sh scripts/gha-encrypted/qs-database.plist.gpg \ quickstart-ios/database/GoogleService-Info.plist "$plist_secret" - name: Test Quickstart - run: ([ -z $plist_secret ] || scripts/third_party/travis/retry.sh scripts/test_quickstart_framework.sh "${SDK}" swift) + run: ([ -z $plist_secret ] || scripts/third_party/travis/retry.sh scripts/test_quickstart_framework.sh "${SDK}") - uses: actions/upload-artifact@v4 if: failure() with: - name: quickstart_artifacts_database + name: quickstart_artifacts_database_${{ matrix.artifact }} path: | quickstart-ios/ !quickstart-ios/**/GoogleService-Info.plist @@ -565,17 +565,15 @@ jobs: run: SAMPLE="$SDK" TARGET="${SDK}Example" scripts/setup_quickstart_framework.sh \ "${HOME}"/ios_frameworks/Firebase/FirebaseInAppMessaging/* \ "${HOME}"/ios_frameworks/Firebase/FirebaseAnalytics/* - - name: Setup swift quickstart - run: SAMPLE="$SDK" TARGET="${SDK}ExampleSwift" scripts/setup_quickstart_framework.sh - name: Install Secret GoogleService-Info.plist run: scripts/decrypt_gha_secret.sh scripts/gha-encrypted/qs-inappmessaging.plist.gpg \ quickstart-ios/inappmessaging/GoogleService-Info.plist "$plist_secret" - name: Test Swift Quickstart - run: ([ -z $plist_secret ] || scripts/third_party/travis/retry.sh scripts/test_quickstart_framework.sh "${SDK}" swift) + run: ([ -z $plist_secret ] || scripts/third_party/travis/retry.sh scripts/test_quickstart_framework.sh "${SDK}") - uses: actions/upload-artifact@v4 if: failure() with: - name: quickstart_artifacts_inappmessaging + name: quickstart_artifacts_inappmessaging_${{ matrix.artifact }} path: | quickstart-ios/ !quickstart-ios/**/GoogleService-Info.plist @@ -615,8 +613,6 @@ jobs: run: SAMPLE="$SDK" TARGET="${SDK}Example" scripts/setup_quickstart_framework.sh \ "${HOME}"/ios_frameworks/Firebase/FirebaseMessaging/* \ "${HOME}"/ios_frameworks/Firebase/FirebaseAnalytics/* - - name: Setup swift quickstart - run: SAMPLE="$SDK" TARGET="${SDK}ExampleSwift" scripts/setup_quickstart_framework.sh - name: Install Secret GoogleService-Info.plist run: scripts/decrypt_gha_secret.sh scripts/gha-encrypted/qs-messaging.plist.gpg \ quickstart-ios/messaging/GoogleService-Info.plist "$plist_secret" @@ -625,7 +621,7 @@ jobs: - uses: actions/upload-artifact@v4 if: failure() with: - name: quickstart_artifacts_messaging + name: quickstart_artifacts_messaging_${{ matrix.artifact }} path: | quickstart-ios/ !quickstart-ios/**/GoogleService-Info.plist @@ -666,8 +662,6 @@ jobs: "${HOME}"/ios_frameworks/Firebase/FirebaseStorage/* \ "${HOME}"/ios_frameworks/Firebase/FirebaseAuth/* \ "${HOME}"/ios_frameworks/Firebase/FirebaseAnalytics/* - - name: Setup swift quickstart - run: SAMPLE="$SDK" TARGET="${SDK}ExampleSwift" scripts/setup_quickstart_framework.sh - name: Install Secret GoogleService-Info.plist run: scripts/decrypt_gha_secret.sh scripts/gha-encrypted/qs-storage.plist.gpg \ quickstart-ios/storage/GoogleService-Info.plist "$plist_secret" @@ -676,7 +670,7 @@ jobs: - uses: actions/upload-artifact@v4 if: failure() with: - name: quickstart_artifacts_storage + name: quickstart_artifacts_storage_${{ matrix.artifact }} path: | quickstart-ios/ !quickstart-ios/**/GoogleService-Info.plist From 9c400665dce7f160162c5639fe507795ddd6cbdf Mon Sep 17 00:00:00 2001 From: Nick Cooke <36927374+ncooke3@users.noreply.github.com> Date: Tue, 28 Oct 2025 17:09:02 -0400 Subject: [PATCH 07/29] chore: Remove duplicate action/checkout invocations (#15450) --- .github/workflows/zip.yml | 8 -------- 1 file changed, 8 deletions(-) diff --git a/.github/workflows/zip.yml b/.github/workflows/zip.yml index 488b1c2f5d9..75bb65dea16 100644 --- a/.github/workflows/zip.yml +++ b/.github/workflows/zip.yml @@ -194,7 +194,6 @@ jobs: run: | mkdir -p "${HOME}"/ios_frameworks/ find "${GITHUB_WORKSPACE}" -name "Firebase*latest.zip" -exec unzip -d "${HOME}"/ios_frameworks/ {} + - - uses: actions/checkout@v4 - name: Check linked Firestore.xcframework for unlinked symbols. run: | scripts/check_firestore_symbols.sh \ @@ -231,7 +230,6 @@ jobs: run: | mkdir -p "${HOME}"/ios_frameworks/ find "${GITHUB_WORKSPACE}" -name "Firebase*latest.zip" -exec unzip -d "${HOME}"/ios_frameworks/ {} + - - uses: actions/checkout@v4 - name: Setup quickstart run: SAMPLE="$SDK" TARGET="${SDK}Example" scripts/setup_quickstart_framework.sh \ "${HOME}"/ios_frameworks/Firebase/FirebaseRemoteConfig/* \ @@ -382,7 +380,6 @@ jobs: run: | mkdir -p "${HOME}"/ios_frameworks/ find "${GITHUB_WORKSPACE}" -name "Firebase*latest.zip" -exec unzip -d "${HOME}"/ios_frameworks/ {} + - - uses: actions/checkout@v4 - name: Setup quickstart run: | rm -rf "${HOME}"/ios_frameworks/Firebase/FirebaseAnalytics/FirebaseAnalytics* @@ -451,7 +448,6 @@ jobs: run: | mkdir -p "${HOME}"/ios_frameworks/ find "${GITHUB_WORKSPACE}" -name "Firebase*latest.zip" -exec unzip -d "${HOME}"/ios_frameworks/ {} + - - uses: actions/checkout@v4 - name: Setup quickstart run: SAMPLE="$SDK" TARGET="${SDK}Example" NON_FIREBASE_SDKS="FirebaseDatabaseUI" scripts/setup_quickstart_framework.sh \ "${HOME}"/ios_frameworks/Firebase/FirebaseDatabase/* \ @@ -503,7 +499,6 @@ jobs: run: | mkdir -p "${HOME}"/ios_frameworks/ find "${GITHUB_WORKSPACE}" -name "Firebase*latest.zip" -exec unzip -d "${HOME}"/ios_frameworks/ {} + - - uses: actions/checkout@v4 - name: Setup quickstart run: SAMPLE="$SDK" TARGET="${SDK}Example" NON_FIREBASE_SDKS="SDWebImage FirebaseAuthUI FirebaseEmailAuthUI" scripts/setup_quickstart_framework.sh \ "${HOME}"/ios_frameworks/Firebase/NonFirebaseSDKs/* \ @@ -560,7 +555,6 @@ jobs: run: | mkdir -p "${HOME}"/ios_frameworks/ find "${GITHUB_WORKSPACE}" -name "Firebase*latest.zip" -exec unzip -d "${HOME}"/ios_frameworks/ {} + - - uses: actions/checkout@v4 - name: Setup quickstart run: SAMPLE="$SDK" TARGET="${SDK}Example" scripts/setup_quickstart_framework.sh \ "${HOME}"/ios_frameworks/Firebase/FirebaseInAppMessaging/* \ @@ -608,7 +602,6 @@ jobs: run: | mkdir -p "${HOME}"/ios_frameworks/ find "${GITHUB_WORKSPACE}" -name "Firebase*latest.zip" -exec unzip -d "${HOME}"/ios_frameworks/ {} + - - uses: actions/checkout@v4 - name: Setup quickstart run: SAMPLE="$SDK" TARGET="${SDK}Example" scripts/setup_quickstart_framework.sh \ "${HOME}"/ios_frameworks/Firebase/FirebaseMessaging/* \ @@ -656,7 +649,6 @@ jobs: run: | mkdir -p "${HOME}"/ios_frameworks/ find "${GITHUB_WORKSPACE}" -name "Firebase*latest.zip" -exec unzip -d "${HOME}"/ios_frameworks/ {} + - - uses: actions/checkout@v4 - name: Setup quickstart run: SAMPLE="$SDK" TARGET="${SDK}Example" scripts/setup_quickstart_framework.sh \ "${HOME}"/ios_frameworks/Firebase/FirebaseStorage/* \ From eb1d2492631dc45d4cece3d7d3fd5f8f40c0791e Mon Sep 17 00:00:00 2001 From: Nick Cooke <36927374+ncooke3@users.noreply.github.com> Date: Tue, 28 Oct 2025 17:21:24 -0400 Subject: [PATCH 08/29] chore: Remove outdated TODO (#15451) --- .github/workflows/zip.yml | 12 ------------ 1 file changed, 12 deletions(-) diff --git a/.github/workflows/zip.yml b/.github/workflows/zip.yml index 75bb65dea16..5ab70cc1cda 100644 --- a/.github/workflows/zip.yml +++ b/.github/workflows/zip.yml @@ -394,23 +394,11 @@ jobs: "${GITHUB_WORKSPACE}"/quickstart-ios/scripts/add_framework_script.rb --sdk "Crashlytics" --target "CrashlyticsExample_(watchOS)_Extension" --framework_path Firebase/ - name: Patch Crashlytics Run Script Path run: scripts/patch_crashlytics_run_path.rb - # TODO(#8057): Restore Swift Quickstart - # - name: Setup swift quickstart - # env: - # LEGACY: true - # run: | - # SAMPLE="$SDK" TARGET="${SDK}ExampleSwift" NON_FIREBASE_SDKS="ReachabilitySwift" scripts/setup_quickstart_framework.sh \ - # "${HOME}"/ios_frameworks/Firebase/NonFirebaseSDKs/* - 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 Quickstart run: ([ -z $plist_secret ] || scripts/third_party/travis/retry.sh scripts/test_quickstart_framework.sh "${SDK}") - # TODO(#8057): Restore Swift Quickstart - # - name: Test Swift Quickstart - # env: - # LEGACY: true - # run: ([ -z $plist_secret ] || scripts/third_party/travis/retry.sh scripts/test_quickstart_framework.sh "${SDK}" swift) - uses: actions/upload-artifact@v4 if: failure() with: From 26536b968c24ca7110ec5d2449cc0d5efceff0a2 Mon Sep 17 00:00:00 2001 From: Nick Cooke <36927374+ncooke3@users.noreply.github.com> Date: Mon, 10 Nov 2025 14:17:12 -0500 Subject: [PATCH 09/29] chore: Revert debugging code in nc/quickstarts branch (#15479) --- .github/workflows/abtesting.yml | 96 ++++---- .github/workflows/auth.yml | 121 +++++----- .github/workflows/crashlytics.yml | 98 ++++---- .github/workflows/database.yml | 88 ++++---- .github/workflows/inappmessaging.yml | 86 +++---- .github/workflows/installations.yml | 126 +++++------ .github/workflows/messaging.yml | 320 +++++++++++++-------------- .github/workflows/performance.yml | 153 +++++++------ .github/workflows/remoteconfig.yml | 166 +++++++------- .github/workflows/storage.yml | 176 +++++++-------- 10 files changed, 713 insertions(+), 717 deletions(-) diff --git a/.github/workflows/abtesting.yml b/.github/workflows/abtesting.yml index 448fadbe5fe..5a69d6f17fe 100644 --- a/.github/workflows/abtesting.yml +++ b/.github/workflows/abtesting.yml @@ -25,21 +25,21 @@ concurrency: cancel-in-progress: true jobs: - # spm: - # uses: ./.github/workflows/common.yml - # with: - # target: ABTestingUnit + spm: + uses: ./.github/workflows/common.yml + with: + target: ABTestingUnit - # catalyst: - # uses: ./.github/workflows/common_catalyst.yml - # with: - # product: FirebaseABTesting - # target: FirebaseABTesting-Unit-unit + catalyst: + uses: ./.github/workflows/common_catalyst.yml + with: + product: FirebaseABTesting + target: FirebaseABTesting-Unit-unit - # pod_lib_lint: - # uses: ./.github/workflows/common_cocoapods.yml - # with: - # product: FirebaseABTesting + pod_lib_lint: + uses: ./.github/workflows/common_cocoapods.yml + with: + product: FirebaseABTesting quickstart: uses: ./.github/workflows/common_quickstart.yml @@ -51,41 +51,39 @@ jobs: secrets: plist_secret: ${{ secrets.GHASecretsGPGPassphrase1 }} - # quickstart-ftl-cron-only: - # # Don't run on private repo. - # if: github.repository == 'Firebase/firebase-ios-sdk' && github.event_name == 'schedule' + quickstart-ftl-cron-only: + # Don't run on private repo. + if: github.repository == 'Firebase/firebase-ios-sdk' && github.event_name == 'schedule' - # env: - # plist_secret: ${{ secrets.GHASecretsGPGPassphrase1 }} - # runs-on: macos-15 - # steps: - # - uses: actions/checkout@v4 - # - uses: ruby/setup-ruby@354a1ad156761f5ee2b7b13fa8e09943a5e8d252 # v1 - # - uses: actions/setup-python@v5 - # with: - # python-version: '3.11' - # - name: Setup quickstart - # env: - # 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: Xcode - # run: sudo xcode-select -s /Applications/Xcode_16.4.app/Contents/Developer - # - name: Build swift quickstart - # env: - # run: ([ -z $plist_secret ] || scripts/third_party/travis/retry.sh scripts/test_quickstart_ftl.sh ABTesting) - # - id: ftl_test - # uses: FirebaseExtended/github-actions/firebase-test-lab@v1.4 - # with: - # credentials_json: ${{ secrets.FIREBASE_SERVICE_ACCOUNT_CREDENTIALS }} - # testapp_dir: quickstart-ios/build-for-testing - # test_type: "xctest" + env: + plist_secret: ${{ secrets.GHASecretsGPGPassphrase1 }} + runs-on: macos-15 + steps: + - uses: actions/checkout@v4 + - uses: ruby/setup-ruby@354a1ad156761f5ee2b7b13fa8e09943a5e8d252 # v1 + - uses: actions/setup-python@v5 + with: + python-version: '3.11' + - name: Setup quickstart + 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: Xcode + run: sudo xcode-select -s /Applications/Xcode_16.4.app/Contents/Developer + - name: Build swift quickstart + run: ([ -z $plist_secret ] || scripts/third_party/travis/retry.sh scripts/test_quickstart_ftl.sh ABTesting) + - id: ftl_test + uses: FirebaseExtended/github-actions/firebase-test-lab@v1.4 + with: + credentials_json: ${{ secrets.FIREBASE_SERVICE_ACCOUNT_CREDENTIALS }} + testapp_dir: quickstart-ios/build-for-testing + test_type: "xctest" - # abtesting-cron-only: - # needs: pod_lib_lint - # uses: ./.github/workflows/common_cocoapods_cron.yml - # with: - # product: FirebaseABTesting - # platforms: '[ "ios", "tvos", "macos" ]' - # flags: '[ "--use-static-frameworks" ]' + abtesting-cron-only: + needs: pod_lib_lint + uses: ./.github/workflows/common_cocoapods_cron.yml + with: + product: FirebaseABTesting + platforms: '[ "ios", "tvos", "macos" ]' + flags: '[ "--use-static-frameworks" ]' diff --git a/.github/workflows/auth.yml b/.github/workflows/auth.yml index 1983ff73203..fd9cce9f5be 100644 --- a/.github/workflows/auth.yml +++ b/.github/workflows/auth.yml @@ -29,69 +29,69 @@ concurrency: cancel-in-progress: true jobs: - # spm: - # uses: ./.github/workflows/common.yml - # with: - # target: AuthUnit - # buildonly_platforms: macOS + spm: + uses: ./.github/workflows/common.yml + with: + target: AuthUnit + buildonly_platforms: macOS - # catalyst: - # uses: ./.github/workflows/common_catalyst.yml - # with: - # product: FirebaseAuth - # target: FirebaseAuth-Unit-unit - # buildonly: true + catalyst: + uses: ./.github/workflows/common_catalyst.yml + with: + product: FirebaseAuth + target: FirebaseAuth-Unit-unit + buildonly: true - # pod_lib_lint: - # strategy: - # matrix: - # product: [FirebaseAuthInterop, FirebaseAuth] - # uses: ./.github/workflows/common_cocoapods.yml - # with: - # product: ${{ matrix.product }} - # buildonly_platforms: macOS + pod_lib_lint: + strategy: + matrix: + product: [FirebaseAuthInterop, FirebaseAuth] + uses: ./.github/workflows/common_cocoapods.yml + with: + product: ${{ matrix.product }} + buildonly_platforms: macOS - # integration-tests: - # # 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' - # needs: spm - # strategy: - # matrix: - # scheme: [ObjCApiTests, SwiftApiTests, AuthenticationExampleUITests] - # env: - # plist_secret: ${{ secrets.GHASecretsGPGPassphrase1 }} - # FIREBASECI_USE_LATEST_GOOGLEAPPMEASUREMENT: 1 - # runs-on: macos-15 - # steps: - # - uses: actions/checkout@v4 - # - uses: actions/cache/restore@v4 - # with: - # path: .build - # key: ${{ needs.spm.outputs.cache_key }} - # - name: Install Secrets - # run: | - # scripts/decrypt_gha_secret.sh scripts/gha-encrypted/AuthCredentials.h.gpg \ - # FirebaseAuth/Tests/SampleSwift/ObjCApiTests/AuthCredentials.h "$plist_secret" - # scripts/decrypt_gha_secret.sh scripts/gha-encrypted/AuthSample/SwiftApplication.plist.gpg \ - # FirebaseAuth/Tests/SampleSwift/AuthenticationExample/SwiftApplication.plist "$plist_secret" - # scripts/decrypt_gha_secret.sh scripts/gha-encrypted/AuthSample/AuthCredentials.h.gpg \ - # FirebaseAuth/Tests/SampleSwift/AuthCredentials.h "$plist_secret" - # scripts/decrypt_gha_secret.sh scripts/gha-encrypted/AuthSample/GoogleService-Info.plist.gpg \ - # FirebaseAuth/Tests/SampleSwift/GoogleService-Info.plist "$plist_secret" - # scripts/decrypt_gha_secret.sh scripts/gha-encrypted/AuthSample/GoogleService-Info_multi.plist.gpg \ - # FirebaseAuth/Tests/SampleSwift/GoogleService-Info_multi.plist "$plist_secret" - # scripts/decrypt_gha_secret.sh scripts/gha-encrypted/AuthSample/Sample.entitlements.gpg \ - # FirebaseAuth/Tests/SampleSwift/Sample.entitlements "$plist_secret" - # scripts/decrypt_gha_secret.sh scripts/gha-encrypted/AuthSample/Credentials.swift.gpg \ - # FirebaseAuth/Tests/SampleSwift/SwiftApiTests/Credentials.swift "$plist_secret" - # - name: Xcode - # run: sudo xcode-select -s /Applications/Xcode_16.4.app/Contents/Developer - # - uses: nick-fields/retry@ce71cc2ab81d554ebbe88c79ab5975992d79ba08 # v3 - # with: - # timeout_minutes: 15 - # max_attempts: 3 - # retry_wait_seconds: 120 - # command: ([ -z $plist_secret ] || scripts/build.sh Auth iOS ${{ matrix.scheme }}) + integration-tests: + # 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' + needs: spm + strategy: + matrix: + scheme: [ObjCApiTests, SwiftApiTests, AuthenticationExampleUITests] + env: + plist_secret: ${{ secrets.GHASecretsGPGPassphrase1 }} + FIREBASECI_USE_LATEST_GOOGLEAPPMEASUREMENT: 1 + runs-on: macos-15 + steps: + - uses: actions/checkout@v4 + - uses: actions/cache/restore@v4 + with: + path: .build + key: ${{ needs.spm.outputs.cache_key }} + - name: Install Secrets + run: | + scripts/decrypt_gha_secret.sh scripts/gha-encrypted/AuthCredentials.h.gpg \ + FirebaseAuth/Tests/SampleSwift/ObjCApiTests/AuthCredentials.h "$plist_secret" + scripts/decrypt_gha_secret.sh scripts/gha-encrypted/AuthSample/SwiftApplication.plist.gpg \ + FirebaseAuth/Tests/SampleSwift/AuthenticationExample/SwiftApplication.plist "$plist_secret" + scripts/decrypt_gha_secret.sh scripts/gha-encrypted/AuthSample/AuthCredentials.h.gpg \ + FirebaseAuth/Tests/SampleSwift/AuthCredentials.h "$plist_secret" + scripts/decrypt_gha_secret.sh scripts/gha-encrypted/AuthSample/GoogleService-Info.plist.gpg \ + FirebaseAuth/Tests/SampleSwift/GoogleService-Info.plist "$plist_secret" + scripts/decrypt_gha_secret.sh scripts/gha-encrypted/AuthSample/GoogleService-Info_multi.plist.gpg \ + FirebaseAuth/Tests/SampleSwift/GoogleService-Info_multi.plist "$plist_secret" + scripts/decrypt_gha_secret.sh scripts/gha-encrypted/AuthSample/Sample.entitlements.gpg \ + FirebaseAuth/Tests/SampleSwift/Sample.entitlements "$plist_secret" + scripts/decrypt_gha_secret.sh scripts/gha-encrypted/AuthSample/Credentials.swift.gpg \ + FirebaseAuth/Tests/SampleSwift/SwiftApiTests/Credentials.swift "$plist_secret" + - name: Xcode + run: sudo xcode-select -s /Applications/Xcode_16.4.app/Contents/Developer + - uses: nick-fields/retry@ce71cc2ab81d554ebbe88c79ab5975992d79ba08 # v3 + with: + timeout_minutes: 15 + max_attempts: 3 + retry_wait_seconds: 120 + command: ([ -z $plist_secret ] || scripts/build.sh Auth iOS ${{ matrix.scheme }}) quickstart: uses: ./.github/workflows/common_quickstart.yml @@ -140,6 +140,5 @@ jobs: platforms: '[ "ios", "tvos --skip-tests", "macos --skip-tests", "watchos --skip-tests" ]' flags: '[ "--use-static-frameworks" ]' setup_command: scripts/configure_test_keychain.sh - ignore_deprecation_warnings: true secrets: plist_secret: ${{ secrets.GHASecretsGPGPassphrase1 }} diff --git a/.github/workflows/crashlytics.yml b/.github/workflows/crashlytics.yml index f381ed0966f..8e074482d08 100644 --- a/.github/workflows/crashlytics.yml +++ b/.github/workflows/crashlytics.yml @@ -26,22 +26,22 @@ concurrency: cancel-in-progress: true jobs: - # spm: - # uses: ./.github/workflows/common.yml - # with: - # target: FirebaseCrashlyticsUnit + spm: + uses: ./.github/workflows/common.yml + with: + target: FirebaseCrashlyticsUnit - # catalyst: - # uses: ./.github/workflows/common_catalyst.yml - # with: - # product: FirebaseCrashlytics - # target: FirebaseCrashlytics-Unit-unit + catalyst: + uses: ./.github/workflows/common_catalyst.yml + with: + product: FirebaseCrashlytics + target: FirebaseCrashlytics-Unit-unit - # pod_lib_lint: - # uses: ./.github/workflows/common_cocoapods.yml - # with: - # product: FirebaseCrashlytics - # buildonly_platforms: tvOS, macOS, watchOS + pod_lib_lint: + uses: ./.github/workflows/common_cocoapods.yml + with: + product: FirebaseCrashlytics + buildonly_platforms: tvOS, macOS, watchOS quickstart: uses: ./.github/workflows/common_quickstart.yml @@ -53,40 +53,40 @@ jobs: secrets: plist_secret: ${{ secrets.GHASecretsGPGPassphrase1 }} - # quickstart-ftl-cron-only: - # # Don't run on private repo. - # if: github.repository == 'Firebase/firebase-ios-sdk' && github.event_name == 'schedule' + quickstart-ftl-cron-only: + # Don't run on private repo. + if: github.repository == 'Firebase/firebase-ios-sdk' && github.event_name == 'schedule' - # env: - # plist_secret: ${{ secrets.GHASecretsGPGPassphrase1 }} - # runs-on: macos-15 - # steps: - # - uses: actions/checkout@v4 - # - uses: ruby/setup-ruby@354a1ad156761f5ee2b7b13fa8e09943a5e8d252 # v1 - # - uses: actions/setup-python@v5 - # with: - # python-version: '3.11' - # - name: Xcode - # run: sudo xcode-select -s /Applications/Xcode_16.4.app/Contents/Developer - # - name: Setup quickstart - # run: scripts/setup_quickstart.sh crashlytics - # - 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: Build swift quickstart - # run: | - # ([ -z $plist_secret ] || scripts/third_party/travis/retry.sh scripts/test_quickstart_ftl.sh Crashlytics swift) - # - id: ftl_test - # uses: FirebaseExtended/github-actions/firebase-test-lab@v1.4 - # with: - # credentials_json: ${{ secrets.FIREBASE_SERVICE_ACCOUNT_CREDENTIALS }} - # testapp_dir: quickstart-ios/build-for-testing - # test_type: "xctest" + env: + plist_secret: ${{ secrets.GHASecretsGPGPassphrase1 }} + runs-on: macos-15 + steps: + - uses: actions/checkout@v4 + - uses: ruby/setup-ruby@354a1ad156761f5ee2b7b13fa8e09943a5e8d252 # v1 + - uses: actions/setup-python@v5 + with: + python-version: '3.11' + - name: Xcode + run: sudo xcode-select -s /Applications/Xcode_16.4.app/Contents/Developer + - name: Setup quickstart + run: scripts/setup_quickstart.sh crashlytics + - 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: Build swift quickstart + run: | + ([ -z $plist_secret ] || scripts/third_party/travis/retry.sh scripts/test_quickstart_ftl.sh Crashlytics swift) + - id: ftl_test + uses: FirebaseExtended/github-actions/firebase-test-lab@v1.4 + with: + credentials_json: ${{ secrets.FIREBASE_SERVICE_ACCOUNT_CREDENTIALS }} + testapp_dir: quickstart-ios/build-for-testing + test_type: "xctest" - # crashlytics-cron-only: - # needs: pod_lib_lint - # uses: ./.github/workflows/common_cocoapods_cron.yml - # with: - # product: FirebaseCrashlytics - # platforms: '[ "ios", "tvos", "macos", "watchos --skip-tests" ]' - # flags: '[ "--use-static-frameworks", "--use-modular-headers --skip-tests" ]' + crashlytics-cron-only: + needs: pod_lib_lint + uses: ./.github/workflows/common_cocoapods_cron.yml + with: + product: FirebaseCrashlytics + platforms: '[ "ios", "tvos", "macos", "watchos --skip-tests" ]' + flags: '[ "--use-static-frameworks", "--use-modular-headers --skip-tests" ]' diff --git a/.github/workflows/database.yml b/.github/workflows/database.yml index e6db2321c99..b75ecb9f8a3 100644 --- a/.github/workflows/database.yml +++ b/.github/workflows/database.yml @@ -29,46 +29,46 @@ concurrency: cancel-in-progress: true jobs: - # spm: - # strategy: - # matrix: - # target: [DatabaseUnit, DatabaseUnitSwift] - # uses: ./.github/workflows/common.yml - # with: - # target: ${{ matrix.target }} + spm: + strategy: + matrix: + target: [DatabaseUnit, DatabaseUnitSwift] + uses: ./.github/workflows/common.yml + with: + target: ${{ matrix.target }} - # catalyst: - # uses: ./.github/workflows/common_catalyst.yml - # with: - # product: FirebaseDatabase - # target: FirebaseDatabase-Unit-unit + catalyst: + uses: ./.github/workflows/common_catalyst.yml + with: + product: FirebaseDatabase + target: FirebaseDatabase-Unit-unit - # pod_lib_lint: - # uses: ./.github/workflows/common_cocoapods.yml - # with: - # product: FirebaseDatabase - # test_specs: unit - # buildonly_platforms: macOS + pod_lib_lint: + uses: ./.github/workflows/common_cocoapods.yml + with: + product: FirebaseDatabase + test_specs: unit + buildonly_platforms: macOS - # integration: - # # 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' - # runs-on: macos-15 - # steps: - # - uses: actions/checkout@v4 - # - uses: mikehardy/buildcache-action@c87cea0ccd718971d6cc39e672c4f26815b6c126 - # with: - # cache_key: integration${{ matrix.os }} - # - uses: ruby/setup-ruby@354a1ad156761f5ee2b7b13fa8e09943a5e8d252 # v1 - # - name: Setup Bundler - # run: scripts/setup_bundler.sh - # - name: Install xcpretty - # run: gem install xcpretty - # - name: Xcode - # run: sudo xcode-select -s /Applications/Xcode_16.4.app/Contents/Developer - # - name: IntegrationTest - # # Only iOS to mitigate flakes. - # run: scripts/third_party/travis/retry.sh scripts/build.sh Database iOS integration + integration: + # 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' + runs-on: macos-15 + steps: + - uses: actions/checkout@v4 + - uses: mikehardy/buildcache-action@c87cea0ccd718971d6cc39e672c4f26815b6c126 + with: + cache_key: integration${{ matrix.os }} + - uses: ruby/setup-ruby@354a1ad156761f5ee2b7b13fa8e09943a5e8d252 # v1 + - name: Setup Bundler + run: scripts/setup_bundler.sh + - name: Install xcpretty + run: gem install xcpretty + - name: Xcode + run: sudo xcode-select -s /Applications/Xcode_16.4.app/Contents/Developer + - name: IntegrationTest + # Only iOS to mitigate flakes. + run: scripts/third_party/travis/retry.sh scripts/build.sh Database iOS integration quickstart: uses: ./.github/workflows/common_quickstart.yml @@ -81,10 +81,10 @@ jobs: secrets: plist_secret: ${{ secrets.GHASecretsGPGPassphrase1 }} - # database-cron-only: - # needs: pod_lib_lint - # uses: ./.github/workflows/common_cocoapods_cron.yml - # with: - # product: FirebaseDatabase - # platforms: '[ "ios", "tvos", "macos" ]' - # flags: '[ "--skip-tests --use-static-frameworks" ]' + database-cron-only: + needs: pod_lib_lint + uses: ./.github/workflows/common_cocoapods_cron.yml + with: + product: FirebaseDatabase + platforms: '[ "ios", "tvos", "macos" ]' + flags: '[ "--skip-tests --use-static-frameworks" ]' diff --git a/.github/workflows/inappmessaging.yml b/.github/workflows/inappmessaging.yml index 0fdc367fac5..966533f1772 100644 --- a/.github/workflows/inappmessaging.yml +++ b/.github/workflows/inappmessaging.yml @@ -24,53 +24,53 @@ concurrency: cancel-in-progress: true jobs: - # spm: - # uses: ./.github/workflows/common.yml - # with: - # target: FirebaseInAppMessaging-Beta - # platforms: iOS - # buildonly_platforms: iOS + spm: + uses: ./.github/workflows/common.yml + with: + target: FirebaseInAppMessaging-Beta + platforms: iOS + buildonly_platforms: iOS - # pod_lib_lint: - # uses: ./.github/workflows/common_cocoapods.yml - # with: - # product: FirebaseInAppMessaging - # platforms: iOS, tvOS + pod_lib_lint: + uses: ./.github/workflows/common_cocoapods.yml + with: + product: FirebaseInAppMessaging + platforms: iOS, tvOS - # tests: - # # 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' + tests: + # 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' - # # TODO(#12770): Update to macos-14 when tests are updated for Xcode 15. - # runs-on: macos-15 - # strategy: - # matrix: - # # TODO(#8682): Reenable iPad after fixing Xcode 13 test failures. - # # platform: [iOS, iPad] - # platform: [iOS] - # xcode: [Xcode_16.4] - # steps: - # - uses: actions/checkout@v4 - # - uses: mikehardy/buildcache-action@c87cea0ccd718971d6cc39e672c4f26815b6c126 - # with: - # cache_key: ${{ matrix.platform }} - # - uses: ruby/setup-ruby@354a1ad156761f5ee2b7b13fa8e09943a5e8d252 # v1 - # - name: Setup Bundler - # run: scripts/setup_bundler.sh - # - name: Xcode - # run: sudo xcode-select -s /Applications/${{ matrix.xcode }}.app/Contents/Developer - # - name: Prereqs - # run: scripts/install_prereqs.sh InAppMessaging ${{ matrix.platform }} xcodebuild - # - name: Build and test - # run: scripts/third_party/travis/retry.sh scripts/build.sh InAppMessaging ${{ matrix.platform }} xcodebuild + # TODO(#12770): Update to macos-14 when tests are updated for Xcode 15. + runs-on: macos-15 + strategy: + matrix: + # TODO(#8682): Reenable iPad after fixing Xcode 13 test failures. + # platform: [iOS, iPad] + platform: [iOS] + xcode: [Xcode_16.4] + steps: + - uses: actions/checkout@v4 + - uses: mikehardy/buildcache-action@c87cea0ccd718971d6cc39e672c4f26815b6c126 + with: + cache_key: ${{ matrix.platform }} + - uses: ruby/setup-ruby@354a1ad156761f5ee2b7b13fa8e09943a5e8d252 # v1 + - name: Setup Bundler + run: scripts/setup_bundler.sh + - name: Xcode + run: sudo xcode-select -s /Applications/${{ matrix.xcode }}.app/Contents/Developer + - name: Prereqs + run: scripts/install_prereqs.sh InAppMessaging ${{ matrix.platform }} xcodebuild + - name: Build and test + run: scripts/third_party/travis/retry.sh scripts/build.sh InAppMessaging ${{ matrix.platform }} xcodebuild - # fiam-cron-only: - # needs: pod_lib_lint - # uses: ./.github/workflows/common_cocoapods_cron.yml - # with: - # product: FirebaseInAppMessaging - # platforms: '[ "ios", "tvos" ]' - # flags: '[ "--use-static-frameworks" ]' + fiam-cron-only: + needs: pod_lib_lint + uses: ./.github/workflows/common_cocoapods_cron.yml + with: + product: FirebaseInAppMessaging + platforms: '[ "ios", "tvos" ]' + flags: '[ "--use-static-frameworks" ]' quickstart: uses: ./.github/workflows/common_quickstart.yml diff --git a/.github/workflows/installations.yml b/.github/workflows/installations.yml index b8bbb69d6d3..1d236e40983 100644 --- a/.github/workflows/installations.yml +++ b/.github/workflows/installations.yml @@ -24,30 +24,30 @@ concurrency: cancel-in-progress: true jobs: - # spm: - # uses: ./.github/workflows/common.yml - # with: - # target: FirebaseInstallations - # buildonly_platforms: all + spm: + uses: ./.github/workflows/common.yml + with: + target: FirebaseInstallations + buildonly_platforms: all - # catalyst: - # uses: ./.github/workflows/common_catalyst.yml - # with: - # product: FirebaseInstallations - # target: FirebaseInstallations-Unit-unit + catalyst: + uses: ./.github/workflows/common_catalyst.yml + with: + product: FirebaseInstallations + target: FirebaseInstallations-Unit-unit - # pod_lib_lint: - # uses: ./.github/workflows/common_cocoapods.yml - # with: - # product: FirebaseInstallations - # setup_command: | - # scripts/configure_test_keychain.sh - # mkdir -p FirebaseInstallations/Source/Tests/Resources - # scripts/decrypt_gha_secret.sh scripts/gha-encrypted/Installations/GoogleService-Info.plist.gpg \ - # FirebaseInstallations/Source/Tests/Resources/GoogleService-Info.plist "$plist_secret" - # echo "FIS_INTEGRATION_TESTS_REQUIRED=1" >> $GITHUB_ENV - # secrets: - # plist_secret: ${{ secrets.GHASecretsGPGPassphrase1 }} + pod_lib_lint: + uses: ./.github/workflows/common_cocoapods.yml + with: + product: FirebaseInstallations + setup_command: | + scripts/configure_test_keychain.sh + mkdir -p FirebaseInstallations/Source/Tests/Resources + scripts/decrypt_gha_secret.sh scripts/gha-encrypted/Installations/GoogleService-Info.plist.gpg \ + FirebaseInstallations/Source/Tests/Resources/GoogleService-Info.plist "$plist_secret" + echo "FIS_INTEGRATION_TESTS_REQUIRED=1" >> $GITHUB_ENV + secrets: + plist_secret: ${{ secrets.GHASecretsGPGPassphrase1 }} quickstart: uses: ./.github/workflows/common_quickstart.yml @@ -59,46 +59,46 @@ jobs: secrets: plist_secret: ${{ secrets.GHASecretsGPGPassphrase1 }} - # quickstart-ftl-cron-only: - # # Don't run on private repo. - # if: github.repository == 'Firebase/firebase-ios-sdk' && github.event_name == 'schedule' + quickstart-ftl-cron-only: + # Don't run on private repo. + if: github.repository == 'Firebase/firebase-ios-sdk' && github.event_name == 'schedule' - # runs-on: macos-15 - # steps: - # - uses: actions/checkout@v4 - # - uses: ruby/setup-ruby@354a1ad156761f5ee2b7b13fa8e09943a5e8d252 # v1 - # - uses: actions/setup-python@v5 - # with: - # python-version: '3.11' - # - name: Xcode - # run: sudo xcode-select -s /Applications/Xcode_16.4.app/Contents/Developer - # - name: Setup quickstart - # run: scripts/setup_quickstart.sh installations - # - name: Copy mock plist - # run: cp quickstart-ios/mock-GoogleService-Info.plist quickstart-ios/installations/GoogleService-Info.plist - # - name: Build objc quickstart - # run: scripts/third_party/travis/retry.sh scripts/test_quickstart_ftl.sh Installations - # - name: Build swift quickstart - # run: scripts/third_party/travis/retry.sh scripts/test_quickstart_ftl.sh Installations swift - # - id: ftl_test - # uses: FirebaseExtended/github-actions/firebase-test-lab@v1.4 - # with: - # credentials_json: ${{ secrets.FIREBASE_SERVICE_ACCOUNT_CREDENTIALS }} - # testapp_dir: quickstart-ios/build-for-testing - # test_type: "xctest" + runs-on: macos-15 + steps: + - uses: actions/checkout@v4 + - uses: ruby/setup-ruby@354a1ad156761f5ee2b7b13fa8e09943a5e8d252 # v1 + - uses: actions/setup-python@v5 + with: + python-version: '3.11' + - name: Xcode + run: sudo xcode-select -s /Applications/Xcode_16.4.app/Contents/Developer + - name: Setup quickstart + run: scripts/setup_quickstart.sh installations + - name: Copy mock plist + run: cp quickstart-ios/mock-GoogleService-Info.plist quickstart-ios/installations/GoogleService-Info.plist + - name: Build objc quickstart + run: scripts/third_party/travis/retry.sh scripts/test_quickstart_ftl.sh Installations + - name: Build swift quickstart + run: scripts/third_party/travis/retry.sh scripts/test_quickstart_ftl.sh Installations swift + - id: ftl_test + uses: FirebaseExtended/github-actions/firebase-test-lab@v1.4 + with: + credentials_json: ${{ secrets.FIREBASE_SERVICE_ACCOUNT_CREDENTIALS }} + testapp_dir: quickstart-ios/build-for-testing + test_type: "xctest" - # installations-cron-only: - # needs: pod_lib_lint - # uses: ./.github/workflows/common_cocoapods_cron.yml - # with: - # product: FirebaseInstallations - # platforms: '[ "ios", "tvos", "macos" ]' - # flags: '[ "--use-static-frameworks" ]' - # setup_command: | - # scripts/configure_test_keychain.sh - # mkdir -p FirebaseInstallations/Source/Tests/Resources - # scripts/decrypt_gha_secret.sh scripts/gha-encrypted/Installations/GoogleService-Info.plist.gpg \ - # FirebaseInstallations/Source/Tests/Resources/GoogleService-Info.plist "$plist_secret" - # echo "FIS_INTEGRATION_TESTS_REQUIRED=1" >> $GITHUB_ENV - # secrets: - # plist_secret: ${{ secrets.GHASecretsGPGPassphrase1 }} + installations-cron-only: + needs: pod_lib_lint + uses: ./.github/workflows/common_cocoapods_cron.yml + with: + product: FirebaseInstallations + platforms: '[ "ios", "tvos", "macos" ]' + flags: '[ "--use-static-frameworks" ]' + setup_command: | + scripts/configure_test_keychain.sh + mkdir -p FirebaseInstallations/Source/Tests/Resources + scripts/decrypt_gha_secret.sh scripts/gha-encrypted/Installations/GoogleService-Info.plist.gpg \ + FirebaseInstallations/Source/Tests/Resources/GoogleService-Info.plist "$plist_secret" + echo "FIS_INTEGRATION_TESTS_REQUIRED=1" >> $GITHUB_ENV + secrets: + plist_secret: ${{ secrets.GHASecretsGPGPassphrase1 }} diff --git a/.github/workflows/messaging.yml b/.github/workflows/messaging.yml index 4663b6355b8..f1ab4cb2f1f 100644 --- a/.github/workflows/messaging.yml +++ b/.github/workflows/messaging.yml @@ -32,54 +32,54 @@ concurrency: cancel-in-progress: true jobs: - # spm: - # uses: ./.github/workflows/common.yml - # with: - # target: MessagingUnit - # buildonly_platforms: tvOS, macOS, watchOS, catalyst, visionOS + spm: + uses: ./.github/workflows/common.yml + with: + target: MessagingUnit + buildonly_platforms: tvOS, macOS, watchOS, catalyst, visionOS - # catalyst: - # uses: ./.github/workflows/common_catalyst.yml - # with: - # product: FirebaseMessaging - # target: FirebaseMessaging-Unit-unit + catalyst: + uses: ./.github/workflows/common_catalyst.yml + with: + product: FirebaseMessaging + target: FirebaseMessaging-Unit-unit - # pod_lib_lint: - # strategy: - # matrix: - # product: [FirebaseMessagingInterop, FirebaseMessaging] - # uses: ./.github/workflows/common_cocoapods.yml - # with: - # product: ${{ matrix.product }} + pod_lib_lint: + strategy: + matrix: + product: [FirebaseMessagingInterop, FirebaseMessaging] + uses: ./.github/workflows/common_cocoapods.yml + with: + product: ${{ matrix.product }} - # # TODO(#12205) Update the build.sh script for this job from "test" instead of "build" - # messaging-integration-tests: - # # 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: mikehardy/buildcache-action@c87cea0ccd718971d6cc39e672c4f26815b6c126 - # with: - # cache_key: integration - # - name: Configure test keychain - # run: scripts/configure_test_keychain.sh - # - uses: ruby/setup-ruby@354a1ad156761f5ee2b7b13fa8e09943a5e8d252 # v1 - # - name: Xcode - # run: sudo xcode-select -s /Applications/Xcode_16.4.app/Contents/Developer - # - name: Setup Bundler - # run: scripts/setup_bundler.sh - # - name: Install xcpretty - # run: gem install xcpretty - # - name: Install Secret GoogleService-Info.plist - # run: | - # mkdir FirebaseMessaging/Tests/IntegrationTests/Resources - # scripts/decrypt_gha_secret.sh scripts/gha-encrypted/messaging-sample-plist.gpg \ - # FirebaseMessaging/Tests/IntegrationTests/Resources/GoogleService-Info.plist "$plist_secret" - # - name: BuildAndTest - # run: ([ -z $plist_secret ] || scripts/third_party/travis/retry.sh scripts/build.sh Messaging all) + # TODO(#12205) Update the build.sh script for this job from "test" instead of "build" + messaging-integration-tests: + # 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: mikehardy/buildcache-action@c87cea0ccd718971d6cc39e672c4f26815b6c126 + with: + cache_key: integration + - name: Configure test keychain + run: scripts/configure_test_keychain.sh + - uses: ruby/setup-ruby@354a1ad156761f5ee2b7b13fa8e09943a5e8d252 # v1 + - name: Xcode + run: sudo xcode-select -s /Applications/Xcode_16.4.app/Contents/Developer + - name: Setup Bundler + run: scripts/setup_bundler.sh + - name: Install xcpretty + run: gem install xcpretty + - name: Install Secret GoogleService-Info.plist + run: | + mkdir FirebaseMessaging/Tests/IntegrationTests/Resources + scripts/decrypt_gha_secret.sh scripts/gha-encrypted/messaging-sample-plist.gpg \ + FirebaseMessaging/Tests/IntegrationTests/Resources/GoogleService-Info.plist "$plist_secret" + - name: BuildAndTest + run: ([ -z $plist_secret ] || scripts/third_party/travis/retry.sh scripts/build.sh Messaging all) quickstart: uses: ./.github/workflows/common_quickstart.yml @@ -92,123 +92,123 @@ jobs: secrets: plist_secret: ${{ secrets.GHASecretsGPGPassphrase1 }} - # quickstart-ftl-cron-only: - # # Don't run on private repo. - # if: github.repository == 'Firebase/firebase-ios-sdk' && github.event_name == 'schedule' - # env: - # plist_secret: ${{ secrets.GHASecretsGPGPassphrase1 }} - # runs-on: macos-15 - # steps: - # - uses: actions/checkout@v4 - # - uses: ruby/setup-ruby@354a1ad156761f5ee2b7b13fa8e09943a5e8d252 # v1 - # - uses: actions/setup-python@v5 - # with: - # python-version: '3.11' - # - name: Xcode - # run: sudo xcode-select -s /Applications/Xcode_16.4.app/Contents/Developer - # - name: Setup quickstart - # run: scripts/setup_quickstart.sh messaging - # - name: Install Secret GoogleService-Info.plist - # run: scripts/decrypt_gha_secret.sh scripts/gha-encrypted/qs-messaging.plist.gpg \ - # quickstart-ios/messaging/GoogleService-Info.plist "$plist_secret" - # - name: Build objc quickstart - # run: ([ -z $plist_secret ] || - # scripts/third_party/travis/retry.sh scripts/test_quickstart_ftl.sh Messaging) - # - name: Build swift quickstart - # run: ([ -z $plist_secret ] || - # scripts/third_party/travis/retry.sh scripts/test_quickstart_ftl.sh Messaging swift) - # - id: ftl_test - # uses: FirebaseExtended/github-actions/firebase-test-lab@v1.4 - # with: - # credentials_json: ${{ secrets.FIREBASE_SERVICE_ACCOUNT_CREDENTIALS }} - # testapp_dir: quickstart-ios/build-for-testing - # test_type: "xctest" + quickstart-ftl-cron-only: + # Don't run on private repo. + if: github.repository == 'Firebase/firebase-ios-sdk' && github.event_name == 'schedule' + env: + plist_secret: ${{ secrets.GHASecretsGPGPassphrase1 }} + runs-on: macos-15 + steps: + - uses: actions/checkout@v4 + - uses: ruby/setup-ruby@354a1ad156761f5ee2b7b13fa8e09943a5e8d252 # v1 + - uses: actions/setup-python@v5 + with: + python-version: '3.11' + - name: Xcode + run: sudo xcode-select -s /Applications/Xcode_16.4.app/Contents/Developer + - name: Setup quickstart + run: scripts/setup_quickstart.sh messaging + - name: Install Secret GoogleService-Info.plist + run: scripts/decrypt_gha_secret.sh scripts/gha-encrypted/qs-messaging.plist.gpg \ + quickstart-ios/messaging/GoogleService-Info.plist "$plist_secret" + - name: Build objc quickstart + run: ([ -z $plist_secret ] || + scripts/third_party/travis/retry.sh scripts/test_quickstart_ftl.sh Messaging) + - name: Build swift quickstart + run: ([ -z $plist_secret ] || + scripts/third_party/travis/retry.sh scripts/test_quickstart_ftl.sh Messaging swift) + - id: ftl_test + uses: FirebaseExtended/github-actions/firebase-test-lab@v1.4 + with: + credentials_json: ${{ secrets.FIREBASE_SERVICE_ACCOUNT_CREDENTIALS }} + testapp_dir: quickstart-ios/build-for-testing + test_type: "xctest" - # messaging-cron-only: - # uses: ./.github/workflows/common_cocoapods_cron.yml - # with: - # product: FirebaseMessaging - # platforms: '[ "ios", "tvos", "macos --skip-tests", "watchos --skip-tests" ]' - # flags: '[ "--use-static-frameworks" ]' + messaging-cron-only: + uses: ./.github/workflows/common_cocoapods_cron.yml + with: + product: FirebaseMessaging + platforms: '[ "ios", "tvos", "macos --skip-tests", "watchos --skip-tests" ]' + flags: '[ "--use-static-frameworks" ]' - # messaging-sample-build-test: - # # 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: mikehardy/buildcache-action@c87cea0ccd718971d6cc39e672c4f26815b6c126 - # with: - # cache_key: sample${{ matrix.os }} - # - uses: ruby/setup-ruby@354a1ad156761f5ee2b7b13fa8e09943a5e8d252 # v1 - # - name: Xcode - # run: sudo xcode-select -s /Applications/Xcode_16.4.app/Contents/Developer - # - name: Setup Bundler - # run: scripts/setup_bundler.sh - # - name: Install Secret GoogleService-Info.plist - # run: | - # scripts/decrypt_gha_secret.sh scripts/gha-encrypted/messaging-sample-plist.gpg \ - # FirebaseMessaging/Apps/Shared/GoogleService-Info.plist "$plist_secret" - # - name: Prereqs - # run: scripts/install_prereqs.sh MessagingSample iOS - # - name: Build - # run: ([ -z $plist_secret ] || scripts/build.sh MessagingSample iOS) + messaging-sample-build-test: + # 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: mikehardy/buildcache-action@c87cea0ccd718971d6cc39e672c4f26815b6c126 + with: + cache_key: sample${{ matrix.os }} + - uses: ruby/setup-ruby@354a1ad156761f5ee2b7b13fa8e09943a5e8d252 # v1 + - name: Xcode + run: sudo xcode-select -s /Applications/Xcode_16.4.app/Contents/Developer + - name: Setup Bundler + run: scripts/setup_bundler.sh + - name: Install Secret GoogleService-Info.plist + run: | + scripts/decrypt_gha_secret.sh scripts/gha-encrypted/messaging-sample-plist.gpg \ + FirebaseMessaging/Apps/Shared/GoogleService-Info.plist "$plist_secret" + - name: Prereqs + run: scripts/install_prereqs.sh MessagingSample iOS + - name: Build + run: ([ -z $plist_secret ] || scripts/build.sh MessagingSample iOS) - # messaging-swiftui-sample-build-test: - # # 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: mikehardy/buildcache-action@c87cea0ccd718971d6cc39e672c4f26815b6c126 - # with: - # cache_key: sample${{ matrix.os }} - # - uses: ruby/setup-ruby@354a1ad156761f5ee2b7b13fa8e09943a5e8d252 # v1 - # - name: Setup Bundler - # run: scripts/setup_bundler.sh - # - name: Install Secret GoogleService-Info.plist - # run: | - # scripts/decrypt_gha_secret.sh scripts/gha-encrypted/messaging-sample-plist.gpg \ - # FirebaseMessaging/Apps/Shared/GoogleService-Info.plist "$plist_secret" - # - name: Prereqs - # run: scripts/install_prereqs.sh SwiftUISample iOS - # - name: Xcode - # run: sudo xcode-select -s /Applications/Xcode_16.4.app/Contents/Developer - # - name: Build - # run: ([ -z $plist_secret ] || scripts/build.sh SwiftUISample iOS) + messaging-swiftui-sample-build-test: + # 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: mikehardy/buildcache-action@c87cea0ccd718971d6cc39e672c4f26815b6c126 + with: + cache_key: sample${{ matrix.os }} + - uses: ruby/setup-ruby@354a1ad156761f5ee2b7b13fa8e09943a5e8d252 # v1 + - name: Setup Bundler + run: scripts/setup_bundler.sh + - name: Install Secret GoogleService-Info.plist + run: | + scripts/decrypt_gha_secret.sh scripts/gha-encrypted/messaging-sample-plist.gpg \ + FirebaseMessaging/Apps/Shared/GoogleService-Info.plist "$plist_secret" + - name: Prereqs + run: scripts/install_prereqs.sh SwiftUISample iOS + - name: Xcode + run: sudo xcode-select -s /Applications/Xcode_16.4.app/Contents/Developer + - name: Build + run: ([ -z $plist_secret ] || scripts/build.sh SwiftUISample iOS) - # messaging-watchos-standalone-sample-build-test: - # # 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: mikehardy/buildcache-action@c87cea0ccd718971d6cc39e672c4f26815b6c126 - # with: - # cache_key: watch-sample${{ matrix.os }} - # - uses: ruby/setup-ruby@354a1ad156761f5ee2b7b13fa8e09943a5e8d252 # v1 - # - name: Setup Bundler - # run: scripts/setup_bundler.sh - # - name: Install Secret GoogleService-Info.plist - # run: | - # scripts/decrypt_gha_secret.sh scripts/gha-encrypted/messaging-sample-plist.gpg \ - # FirebaseMessaging/Apps/Shared/GoogleService-Info.plist "$plist_secret" - # - name: Prereqs - # run: scripts/install_prereqs.sh MessagingSampleStandaloneWatchApp watchOS - # - name: Xcode - # run: sudo xcode-select -s /Applications/Xcode_16.4.app/Contents/Developer - # - name: Build - # run: ([ -z $plist_secret ] || scripts/build.sh MessagingSampleStandaloneWatchApp watchOS) - # - name: Upload xcodebuild logs - # if: failure() - # uses: actions/upload-artifact@v4 - # with: - # name: xcodebuild-logs-${{ matrix.target }} - # path: xcodebuild-*.log + messaging-watchos-standalone-sample-build-test: + # 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: mikehardy/buildcache-action@c87cea0ccd718971d6cc39e672c4f26815b6c126 + with: + cache_key: watch-sample${{ matrix.os }} + - uses: ruby/setup-ruby@354a1ad156761f5ee2b7b13fa8e09943a5e8d252 # v1 + - name: Setup Bundler + run: scripts/setup_bundler.sh + - name: Install Secret GoogleService-Info.plist + run: | + scripts/decrypt_gha_secret.sh scripts/gha-encrypted/messaging-sample-plist.gpg \ + FirebaseMessaging/Apps/Shared/GoogleService-Info.plist "$plist_secret" + - name: Prereqs + run: scripts/install_prereqs.sh MessagingSampleStandaloneWatchApp watchOS + - name: Xcode + run: sudo xcode-select -s /Applications/Xcode_16.4.app/Contents/Developer + - name: Build + run: ([ -z $plist_secret ] || scripts/build.sh MessagingSampleStandaloneWatchApp watchOS) + - name: Upload xcodebuild logs + if: failure() + uses: actions/upload-artifact@v4 + with: + name: xcodebuild-logs-${{ matrix.target }} + path: xcodebuild-*.log diff --git a/.github/workflows/performance.yml b/.github/workflows/performance.yml index 28447841b87..19a6e044a73 100644 --- a/.github/workflows/performance.yml +++ b/.github/workflows/performance.yml @@ -33,52 +33,51 @@ concurrency: cancel-in-progress: true jobs: - # spm: - # uses: ./.github/workflows/common.yml - # with: - # target: PerformanceUnit - # platforms: iOS, tvOS + spm: + uses: ./.github/workflows/common.yml + with: + target: PerformanceUnit + platforms: iOS, tvOS - # catalyst: - # uses: ./.github/workflows/common_catalyst.yml - # with: - # product: FirebasePerformance - # target: - # buildonly: true + catalyst: + uses: ./.github/workflows/common_catalyst.yml + with: + product: FirebasePerformance + target: + buildonly: true - # # Build and run the unit tests for Firebase performance SDK. - # performance: - # # 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' - # runs-on: macos-15 - # strategy: - # matrix: - # target: [iOS, tvOS] - # test: [unit, proddev] - # steps: - # - uses: actions/checkout@v4 - # - uses: mikehardy/buildcache-action@c87cea0ccd718971d6cc39e672c4f26815b6c126 - # with: - # cache_key: ${{ matrix.target }}${{ matrix.test }} - # - uses: ruby/setup-ruby@354a1ad156761f5ee2b7b13fa8e09943a5e8d252 # v1 - # - name: Xcode - # run: sudo xcode-select -s /Applications/Xcode_16.4.app/Contents/Developer - # - name: Setup Bundler - # run: scripts/setup_bundler.sh - # - name: Install xcpretty - # run: gem install xcpretty - # - name: BuildAndTest # can be replaced with pod lib lint with CocoaPods 1.10 - # run: scripts/third_party/travis/retry.sh scripts/build.sh Performance ${{ matrix.target }} ${{ matrix.test }} + # Build and run the unit tests for Firebase performance SDK. + performance: + # 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' + runs-on: macos-15 + strategy: + matrix: + target: [iOS, tvOS] + test: [unit, proddev] + steps: + - uses: actions/checkout@v4 + - uses: mikehardy/buildcache-action@c87cea0ccd718971d6cc39e672c4f26815b6c126 + with: + cache_key: ${{ matrix.target }}${{ matrix.test }} + - uses: ruby/setup-ruby@354a1ad156761f5ee2b7b13fa8e09943a5e8d252 # v1 + - name: Xcode + run: sudo xcode-select -s /Applications/Xcode_16.4.app/Contents/Developer + - name: Setup Bundler + run: scripts/setup_bundler.sh + - name: Install xcpretty + run: gem install xcpretty + - name: BuildAndTest # can be replaced with pod lib lint with CocoaPods 1.10 + run: scripts/third_party/travis/retry.sh scripts/build.sh Performance ${{ matrix.target }} ${{ matrix.test }} - # pod_lib_lint: - # uses: ./.github/workflows/common_cocoapods.yml - # with: - # product: FirebasePerformance - # platforms: iOS, tvOS - # #TODO: tests are not supported with Xcode 15 because the test spec depends on the iOS 8 GDCWebServer - # buildonly_platforms: iOS, tvOS + pod_lib_lint: + uses: ./.github/workflows/common_cocoapods.yml + with: + product: FirebasePerformance + platforms: iOS, tvOS + #TODO: tests are not supported with Xcode 15 because the test spec depends on the iOS 8 GDCWebServer + buildonly_platforms: iOS, tvOS - # TODO: The legacy ObjC quickstarts don't run with Xcode 15, re-able if we get these working. quickstart: uses: ./.github/workflows/common_quickstart.yml with: @@ -89,40 +88,40 @@ jobs: secrets: plist_secret: ${{ secrets.GHASecretsGPGPassphrase1 }} - # quickstart-ftl-cron-only: - # if: github.repository == 'Firebase/firebase-ios-sdk' && github.event_name == 'schedule' + quickstart-ftl-cron-only: + if: github.repository == 'Firebase/firebase-ios-sdk' && github.event_name == 'schedule' - # env: - # plist_secret: ${{ secrets.GHASecretsGPGPassphrase1 }} - # runs-on: macos-15 - # steps: - # - uses: actions/checkout@v4 - # - uses: ruby/setup-ruby@354a1ad156761f5ee2b7b13fa8e09943a5e8d252 # v1 - # - uses: actions/setup-python@v5 - # with: - # python-version: '3.11' - # - name: Xcode - # run: sudo xcode-select -s /Applications/Xcode_16.4.app/Contents/Developer - # - name: Setup quickstart - # run: scripts/setup_quickstart.sh performance - # - name: Install Secret GoogleService-Info.plist - # run: scripts/decrypt_gha_secret.sh scripts/gha-encrypted/qs-performance.plist.gpg \ - # quickstart-ios/performance/GoogleService-Info.plist "$plist_secret" - # - name: Build swift quickstart - # run: ([ -z $plist_secret ] || scripts/third_party/travis/retry.sh scripts/test_quickstart_ftl.sh Performance swift) - # # - name: Build objc quickstart - # # run: ([ -z $plist_secret ] || scripts/third_party/travis/retry.sh scripts/test_quickstart_ftl.sh Performance) - # - id: ftl_test - # uses: FirebaseExtended/github-actions/firebase-test-lab@v1.4 - # with: - # credentials_json: ${{ secrets.FIREBASE_SERVICE_ACCOUNT_CREDENTIALS }} - # testapp_dir: quickstart-ios/build-for-testing - # test_type: "xctest" + env: + plist_secret: ${{ secrets.GHASecretsGPGPassphrase1 }} + runs-on: macos-15 + steps: + - uses: actions/checkout@v4 + - uses: ruby/setup-ruby@354a1ad156761f5ee2b7b13fa8e09943a5e8d252 # v1 + - uses: actions/setup-python@v5 + with: + python-version: '3.11' + - name: Xcode + run: sudo xcode-select -s /Applications/Xcode_16.4.app/Contents/Developer + - name: Setup quickstart + run: scripts/setup_quickstart.sh performance + - name: Install Secret GoogleService-Info.plist + run: scripts/decrypt_gha_secret.sh scripts/gha-encrypted/qs-performance.plist.gpg \ + quickstart-ios/performance/GoogleService-Info.plist "$plist_secret" + - name: Build swift quickstart + run: ([ -z $plist_secret ] || scripts/third_party/travis/retry.sh scripts/test_quickstart_ftl.sh Performance swift) + # - name: Build objc quickstart + # run: ([ -z $plist_secret ] || scripts/third_party/travis/retry.sh scripts/test_quickstart_ftl.sh Performance) + - id: ftl_test + uses: FirebaseExtended/github-actions/firebase-test-lab@v1.4 + with: + credentials_json: ${{ secrets.FIREBASE_SERVICE_ACCOUNT_CREDENTIALS }} + testapp_dir: quickstart-ios/build-for-testing + test_type: "xctest" - # performance-cron-only: - # needs: pod_lib_lint - # uses: ./.github/workflows/common_cocoapods_cron.yml - # with: - # product: FirebasePerformance - # platforms: '[ "ios", "tvos" ]' - # flags: '[ "--skip-tests --use-static-frameworks" ]' + performance-cron-only: + needs: pod_lib_lint + uses: ./.github/workflows/common_cocoapods_cron.yml + with: + product: FirebasePerformance + platforms: '[ "ios", "tvos" ]' + flags: '[ "--skip-tests --use-static-frameworks" ]' diff --git a/.github/workflows/remoteconfig.yml b/.github/workflows/remoteconfig.yml index 68d0bb7512a..36ba73ed473 100644 --- a/.github/workflows/remoteconfig.yml +++ b/.github/workflows/remoteconfig.yml @@ -27,68 +27,68 @@ concurrency: cancel-in-progress: true jobs: - # spm_1: - # uses: ./.github/workflows/common.yml - # with: - # target: RemoteConfigUnit + spm_1: + uses: ./.github/workflows/common.yml + with: + target: RemoteConfigUnit - # spm_2: - # uses: ./.github/workflows/common.yml - # with: - # target: RemoteConfigFakeConsole - # buildonly_platforms: watchOS + spm_2: + uses: ./.github/workflows/common.yml + with: + target: RemoteConfigFakeConsole + buildonly_platforms: watchOS - # catalyst: - # uses: ./.github/workflows/common_catalyst.yml - # with: - # product: FirebaseRemoteConfig - # target: FirebaseRemoteConfig-Unit-unit + catalyst: + uses: ./.github/workflows/common_catalyst.yml + with: + product: FirebaseRemoteConfig + target: FirebaseRemoteConfig-Unit-unit - # remoteconfig: - # # 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 }} - # USE_REAL_CONSOLE: true - # runs-on: macos-15 - # strategy: - # matrix: - # target: [iOS] - # steps: - # - uses: actions/checkout@v4 - # - uses: mikehardy/buildcache-action@c87cea0ccd718971d6cc39e672c4f26815b6c126 - # with: - # cache_key: rc${{ matrix.target }} - # - uses: ruby/setup-ruby@354a1ad156761f5ee2b7b13fa8e09943a5e8d252 # v1 - # - name: Setup Bundler - # run: scripts/setup_bundler.sh - # - name: Install xcpretty - # run: gem install xcpretty - # - name: Install Secret GoogleService-Info.plist - # run: scripts/decrypt_gha_secret.sh scripts/gha-encrypted/RemoteConfigSwiftAPI/GoogleService-Info.plist.gpg \ - # FirebaseRemoteConfig/Tests/Swift/SwiftAPI/GoogleService-Info.plist "$plist_secret" - # - name: Generate Access Token for RemoteConfigConsoleAPI in IntegrationTests - # if: matrix.target == 'iOS' - # run: ([ -z $plist_secret ] || scripts/generate_access_token.sh "$plist_secret" scripts/gha-encrypted/RemoteConfigSwiftAPI/ServiceAccount.json.gpg - # FirebaseRemoteConfig/Tests/Swift/AccessToken.json) - # - name: Xcode - # run: sudo xcode-select -s /Applications/Xcode_16.4.app/Contents/Developer - # - name: Fake Console API Tests - # uses: nick-fields/retry@ce71cc2ab81d554ebbe88c79ab5975992d79ba08 # v3 - # with: - # timeout_minutes: 15 - # max_attempts: 3 - # retry_wait_seconds: 120 - # command: scripts/build.sh RemoteConfig ${{ matrix.target }} fakeconsole - # - name: IntegrationTest - # if: matrix.target == 'iOS' - # # No retry to avoid exhausting AccessToken quota. - # run: ([ -z $plist_secret ] || scripts/build.sh RemoteConfig iOS integration) + remoteconfig: + # 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 }} + USE_REAL_CONSOLE: true + runs-on: macos-15 + strategy: + matrix: + target: [iOS] + steps: + - uses: actions/checkout@v4 + - uses: mikehardy/buildcache-action@c87cea0ccd718971d6cc39e672c4f26815b6c126 + with: + cache_key: rc${{ matrix.target }} + - uses: ruby/setup-ruby@354a1ad156761f5ee2b7b13fa8e09943a5e8d252 # v1 + - name: Setup Bundler + run: scripts/setup_bundler.sh + - name: Install xcpretty + run: gem install xcpretty + - name: Install Secret GoogleService-Info.plist + run: scripts/decrypt_gha_secret.sh scripts/gha-encrypted/RemoteConfigSwiftAPI/GoogleService-Info.plist.gpg \ + FirebaseRemoteConfig/Tests/Swift/SwiftAPI/GoogleService-Info.plist "$plist_secret" + - name: Generate Access Token for RemoteConfigConsoleAPI in IntegrationTests + if: matrix.target == 'iOS' + run: ([ -z $plist_secret ] || scripts/generate_access_token.sh "$plist_secret" scripts/gha-encrypted/RemoteConfigSwiftAPI/ServiceAccount.json.gpg + FirebaseRemoteConfig/Tests/Swift/AccessToken.json) + - name: Xcode + run: sudo xcode-select -s /Applications/Xcode_16.4.app/Contents/Developer + - name: Fake Console API Tests + uses: nick-fields/retry@ce71cc2ab81d554ebbe88c79ab5975992d79ba08 # v3 + with: + timeout_minutes: 15 + max_attempts: 3 + retry_wait_seconds: 120 + command: scripts/build.sh RemoteConfig ${{ matrix.target }} fakeconsole + - name: IntegrationTest + if: matrix.target == 'iOS' + # No retry to avoid exhausting AccessToken quota. + run: ([ -z $plist_secret ] || scripts/build.sh RemoteConfig iOS integration) - # pod_lib_lint: - # uses: ./.github/workflows/common_cocoapods.yml - # with: - # product: FirebaseRemoteConfig + pod_lib_lint: + uses: ./.github/workflows/common_cocoapods.yml + with: + product: FirebaseRemoteConfig quickstart: uses: ./.github/workflows/common_quickstart.yml @@ -127,29 +127,29 @@ jobs: # testapp_dir: quickstart-ios/build-for-testing # test_type: "xctest" - # sample-build-test: - # # 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' - # runs-on: macos-15 - # steps: - # - uses: actions/checkout@v4 - # - uses: mikehardy/buildcache-action@c87cea0ccd718971d6cc39e672c4f26815b6c126 - # with: - # cache_key: build-test - # - uses: ruby/setup-ruby@354a1ad156761f5ee2b7b13fa8e09943a5e8d252 # v1 - # - name: Setup Bundler - # run: scripts/setup_bundler.sh - # - name: Xcode - # run: sudo xcode-select -s /Applications/Xcode_16.4.app/Contents/Developer - # - name: Prereqs - # run: scripts/install_prereqs.sh RemoteConfigSample iOS - # - name: Build - # run: scripts/build.sh RemoteConfigSample iOS + sample-build-test: + # 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' + runs-on: macos-15 + steps: + - uses: actions/checkout@v4 + - uses: mikehardy/buildcache-action@c87cea0ccd718971d6cc39e672c4f26815b6c126 + with: + cache_key: build-test + - uses: ruby/setup-ruby@354a1ad156761f5ee2b7b13fa8e09943a5e8d252 # v1 + - name: Setup Bundler + run: scripts/setup_bundler.sh + - name: Xcode + run: sudo xcode-select -s /Applications/Xcode_16.4.app/Contents/Developer + - name: Prereqs + run: scripts/install_prereqs.sh RemoteConfigSample iOS + - name: Build + run: scripts/build.sh RemoteConfigSample iOS - # remoteconfig-cron-only: - # needs: pod_lib_lint - # uses: ./.github/workflows/common_cocoapods_cron.yml - # with: - # product: FirebaseRemoteConfig - # platforms: '[ "ios", "tvos", "macos" ]' - # flags: '[ "--skip-tests --use-static-frameworks" ]' + remoteconfig-cron-only: + needs: pod_lib_lint + uses: ./.github/workflows/common_cocoapods_cron.yml + with: + product: FirebaseRemoteConfig + platforms: '[ "ios", "tvos", "macos" ]' + flags: '[ "--skip-tests --use-static-frameworks" ]' diff --git a/.github/workflows/storage.yml b/.github/workflows/storage.yml index 95545b39a97..9aae03de131 100644 --- a/.github/workflows/storage.yml +++ b/.github/workflows/storage.yml @@ -26,57 +26,57 @@ concurrency: cancel-in-progress: true jobs: - # spm: - # uses: ./.github/workflows/common.yml - # with: - # target: FirebaseStorageUnit + spm: + uses: ./.github/workflows/common.yml + with: + target: FirebaseStorageUnit - # catalyst: - # uses: ./.github/workflows/common_catalyst.yml - # with: - # product: FirebaseStorage - # target: FirebaseStorage-Unit-unit + catalyst: + uses: ./.github/workflows/common_catalyst.yml + with: + product: FirebaseStorage + target: FirebaseStorage-Unit-unit - # storage-integration-tests: - # # 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' - # strategy: - # matrix: - # language: [Swift, ObjC] - # include: - # - os: macos-15 - # xcode: Xcode_16.4 - # env: - # plist_secret: ${{ secrets.GHASecretsGPGPassphrase1 }} - # runs-on: ${{ matrix.os }} - # steps: - # - uses: actions/checkout@v4 - # - uses: mikehardy/buildcache-action@c87cea0ccd718971d6cc39e672c4f26815b6c126 - # with: - # cache_key: integration${{ matrix.os }} - # - uses: ruby/setup-ruby@354a1ad156761f5ee2b7b13fa8e09943a5e8d252 # v1 - # - name: Setup Bundler - # run: scripts/setup_bundler.sh - # - name: Install xcpretty - # run: gem install xcpretty - # - name: Install Secret GoogleService-Info.plist - # run: scripts/decrypt_gha_secret.sh scripts/gha-encrypted/storage-db-plist.gpg \ - # FirebaseStorage/Tests/Integration/Resources/GoogleService-Info.plist "$plist_secret" - # - name: Install Credentials.h - # run: scripts/decrypt_gha_secret.sh scripts/gha-encrypted/Storage/Credentials.h.gpg \ - # FirebaseStorage/Tests/ObjCIntegration/Credentials.h "$plist_secret" - # - name: Install Credentials.swift - # run: |\ - # scripts/decrypt_gha_secret.sh scripts/gha-encrypted/Storage/Credentials.swift.gpg \ - # FirebaseStorage/Tests/Integration/Credentials.swift "$plist_secret" - # - name: Xcode - # run: sudo xcode-select -s /Applications/${{ matrix.xcode }}.app/Contents/Developer - # - uses: nick-fields/retry@ce71cc2ab81d554ebbe88c79ab5975992d79ba08 # v3 - # with: - # timeout_minutes: 15 - # max_attempts: 3 - # retry_wait_seconds: 120 - # command: ([ -z $plist_secret ] || scripts/build.sh Storage${{ matrix.language }} all) + storage-integration-tests: + # 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' + strategy: + matrix: + language: [Swift, ObjC] + include: + - os: macos-15 + xcode: Xcode_16.4 + env: + plist_secret: ${{ secrets.GHASecretsGPGPassphrase1 }} + runs-on: ${{ matrix.os }} + steps: + - uses: actions/checkout@v4 + - uses: mikehardy/buildcache-action@c87cea0ccd718971d6cc39e672c4f26815b6c126 + with: + cache_key: integration${{ matrix.os }} + - uses: ruby/setup-ruby@354a1ad156761f5ee2b7b13fa8e09943a5e8d252 # v1 + - name: Setup Bundler + run: scripts/setup_bundler.sh + - name: Install xcpretty + run: gem install xcpretty + - name: Install Secret GoogleService-Info.plist + run: scripts/decrypt_gha_secret.sh scripts/gha-encrypted/storage-db-plist.gpg \ + FirebaseStorage/Tests/Integration/Resources/GoogleService-Info.plist "$plist_secret" + - name: Install Credentials.h + run: scripts/decrypt_gha_secret.sh scripts/gha-encrypted/Storage/Credentials.h.gpg \ + FirebaseStorage/Tests/ObjCIntegration/Credentials.h "$plist_secret" + - name: Install Credentials.swift + run: | + scripts/decrypt_gha_secret.sh scripts/gha-encrypted/Storage/Credentials.swift.gpg \ + FirebaseStorage/Tests/Integration/Credentials.swift "$plist_secret" + - name: Xcode + run: sudo xcode-select -s /Applications/${{ matrix.xcode }}.app/Contents/Developer + - uses: nick-fields/retry@ce71cc2ab81d554ebbe88c79ab5975992d79ba08 # v3 + with: + timeout_minutes: 15 + max_attempts: 3 + retry_wait_seconds: 120 + command: ([ -z $plist_secret ] || scripts/build.sh Storage${{ matrix.language }} all) quickstart: # TODO: See #12399 and restore Objective-C testing for Xcode 15 if GHA is fixed. @@ -90,44 +90,44 @@ jobs: secrets: plist_secret: ${{ secrets.GHASecretsGPGPassphrase1 }} - # quickstart-ftl-cron-only: - # # Don't run on private repo. - # if: github.repository == 'Firebase/firebase-ios-sdk' && github.event_name == 'schedule' - # env: - # plist_secret: ${{ secrets.GHASecretsGPGPassphrase1 }} - # runs-on: macos-15 - # steps: - # - uses: actions/checkout@v4 - # - uses: ruby/setup-ruby@354a1ad156761f5ee2b7b13fa8e09943a5e8d252 # v1 - # - uses: actions/setup-python@v5 - # with: - # python-version: '3.11' - # - name: Setup quickstart - # run: scripts/setup_quickstart.sh storage - # - name: Install Secret GoogleService-Info.plist - # run: scripts/decrypt_gha_secret.sh scripts/gha-encrypted/qs-storage.plist.gpg \ - # quickstart-ios/storage/GoogleService-Info.plist "$plist_secret" - # # - name: Build objc quickstart - # # run: ([ -z $plist_secret ] || scripts/third_party/travis/retry.sh scripts/test_quickstart_ftl.sh Storage) - # - name: Build swift quickstart - # run: ([ -z $plist_secret ] || scripts/third_party/travis/retry.sh scripts/test_quickstart_ftl.sh Storage swift) - # - id: ftl_test - # uses: FirebaseExtended/github-actions/firebase-test-lab@v1.4 - # with: - # credentials_json: ${{ secrets.FIREBASE_SERVICE_ACCOUNT_CREDENTIALS }} - # testapp_dir: quickstart-ios/build-for-testing - # test_type: "xctest" + quickstart-ftl-cron-only: + # Don't run on private repo. + if: github.repository == 'Firebase/firebase-ios-sdk' && github.event_name == 'schedule' + env: + plist_secret: ${{ secrets.GHASecretsGPGPassphrase1 }} + runs-on: macos-15 + steps: + - uses: actions/checkout@v4 + - uses: ruby/setup-ruby@354a1ad156761f5ee2b7b13fa8e09943a5e8d252 # v1 + - uses: actions/setup-python@v5 + with: + python-version: '3.11' + - name: Setup quickstart + run: scripts/setup_quickstart.sh storage + - name: Install Secret GoogleService-Info.plist + run: scripts/decrypt_gha_secret.sh scripts/gha-encrypted/qs-storage.plist.gpg \ + quickstart-ios/storage/GoogleService-Info.plist "$plist_secret" + # - name: Build objc quickstart + # run: ([ -z $plist_secret ] || scripts/third_party/travis/retry.sh scripts/test_quickstart_ftl.sh Storage) + - name: Build swift quickstart + run: ([ -z $plist_secret ] || scripts/third_party/travis/retry.sh scripts/test_quickstart_ftl.sh Storage swift) + - id: ftl_test + uses: FirebaseExtended/github-actions/firebase-test-lab@v1.4 + with: + credentials_json: ${{ secrets.FIREBASE_SERVICE_ACCOUNT_CREDENTIALS }} + testapp_dir: quickstart-ios/build-for-testing + test_type: "xctest" - # pod_lib_lint: - # uses: ./.github/workflows/common_cocoapods.yml - # with: - # product: FirebaseStorage - # test_specs: unit + pod_lib_lint: + uses: ./.github/workflows/common_cocoapods.yml + with: + product: FirebaseStorage + test_specs: unit - # storage-cron-only: - # needs: pod_lib_lint - # uses: ./.github/workflows/common_cocoapods_cron.yml - # with: - # product: FirebaseStorage - # platforms: '[ "ios", "tvos", "macos", "watchos" ]' - # flags: '[ "--use-static-frameworks --skip-tests" ]' + storage-cron-only: + needs: pod_lib_lint + uses: ./.github/workflows/common_cocoapods_cron.yml + with: + product: FirebaseStorage + platforms: '[ "ios", "tvos", "macos", "watchos" ]' + flags: '[ "--use-static-frameworks --skip-tests" ]' From ea22b5bf87a91b06c02187b0920ae9f62d3271c8 Mon Sep 17 00:00:00 2001 From: Nick Cooke Date: Mon, 10 Nov 2025 18:27:23 -0500 Subject: [PATCH 10/29] fix: commit fetching bug in scripts/update_firebase_spm_dependency.sh --- scripts/update_firebase_spm_dependency.sh | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/scripts/update_firebase_spm_dependency.sh b/scripts/update_firebase_spm_dependency.sh index 7a13e07a3cb..27d54e4658d 100755 --- a/scripts/update_firebase_spm_dependency.sh +++ b/scripts/update_firebase_spm_dependency.sh @@ -65,7 +65,7 @@ case "$MODE" in REPLACEMENT_REGEX="\1kind = branch;\n\t\t\t\tbranch = \"$VERSION\";\2" ;; --prerelease) - COMMIT_HASH=$(git ls-remote https://github.com/firebase/firebase-ios-sdk.git main | cut -f1) + COMMIT_HASH=$(git ls-remote https://github.com/firebase/firebase-ios-sdk.git refs/heads/main | cut -f1) if [[ -z "$COMMIT_HASH" ]]; then echo "Error: Failed to get remote revision for main branch." exit 1 From bc3821815a515b7a1fd13cbf434053f517e435f7 Mon Sep 17 00:00:00 2001 From: Nick Cooke <36927374+ncooke3@users.noreply.github.com> Date: Mon, 10 Nov 2025 18:44:05 -0500 Subject: [PATCH 11/29] fix: Remove test action for prerelease x fiam job --- .github/workflows/prerelease.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/prerelease.yml b/.github/workflows/prerelease.yml index b26e22cde33..1c19573f985 100644 --- a/.github/workflows/prerelease.yml +++ b/.github/workflows/prerelease.yml @@ -77,7 +77,7 @@ jobs: - product: Messaging run_tests: false - product: InAppMessaging - run_tests: true + run_tests: false - product: Firestore run_tests: false - product: Database From 02f1552d1b6b5623c0c83dd151e5cd10624e4af0 Mon Sep 17 00:00:00 2001 From: Nick Cooke <36927374+ncooke3@users.noreply.github.com> Date: Tue, 11 Nov 2025 11:12:33 -0500 Subject: [PATCH 12/29] Apply suggestions from code review --- .github/workflows/inappmessaging.yml | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/.github/workflows/inappmessaging.yml b/.github/workflows/inappmessaging.yml index 966533f1772..b7ace6a847a 100644 --- a/.github/workflows/inappmessaging.yml +++ b/.github/workflows/inappmessaging.yml @@ -41,12 +41,12 @@ jobs: # 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' - # TODO(#12770): Update to macos-14 when tests are updated for Xcode 15. +# TODO(#12770): Update to macos-14 when tests are updated for Xcode 15. runs-on: macos-15 strategy: matrix: - # TODO(#8682): Reenable iPad after fixing Xcode 13 test failures. - # platform: [iOS, iPad] +# TODO(#8682): Reenable iPad after fixing Xcode 13 test failures. +# platform: [iOS, iPad] platform: [iOS] xcode: [Xcode_16.4] steps: From c8517c4405dd5450868a787a4970b92905d25cac Mon Sep 17 00:00:00 2001 From: Nick Cooke <36927374+ncooke3@users.noreply.github.com> Date: Tue, 11 Nov 2025 13:40:27 -0500 Subject: [PATCH 13/29] Apply suggestion from @gemini-code-assist[bot] Co-authored-by: gemini-code-assist[bot] <176961590+gemini-code-assist[bot]@users.noreply.github.com> --- .github/workflows/common_quickstart.yml | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) diff --git a/.github/workflows/common_quickstart.yml b/.github/workflows/common_quickstart.yml index 6cd964d4f6c..fdbcc51e6c6 100644 --- a/.github/workflows/common_quickstart.yml +++ b/.github/workflows/common_quickstart.yml @@ -103,8 +103,8 @@ jobs: - 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/ + - uses: actions/upload-artifact@v4 + if: ${{ failure() }} + with: + name: quickstart_artifacts_${{ steps.lowercase_product.outputs.lowercase_product }} + path: quickstart-ios/ From 9490884a7984b1accf3cc9ff2c5632429dfe98bb Mon Sep 17 00:00:00 2001 From: Nick Cooke <36927374+ncooke3@users.noreply.github.com> Date: Wed, 12 Nov 2025 11:24:20 -0500 Subject: [PATCH 14/29] Apply suggestions from code review --- .github/workflows/prerelease.yml | 2 +- .github/workflows/prerelease_cocoapods.yml | 2 +- .github/workflows/release.yml | 2 +- 3 files changed, 3 insertions(+), 3 deletions(-) diff --git a/.github/workflows/prerelease.yml b/.github/workflows/prerelease.yml index 1c19573f985..03e0461a841 100644 --- a/.github/workflows/prerelease.yml +++ b/.github/workflows/prerelease.yml @@ -117,7 +117,7 @@ jobs: command: DIR=${{ matrix.product }} scripts/test_quickstart.sh ${{ matrix.product }} ${{ matrix.run_tests }} # Failure sequence to upload artifact. - name: Remove data before upload. - # if: ${{ failure() }} + if: ${{ failure() }} run: scripts/remove_data.sh ${{ matrix.product }} # - uses: actions/upload-artifact@v4 # if: ${{ failure() }} diff --git a/.github/workflows/prerelease_cocoapods.yml b/.github/workflows/prerelease_cocoapods.yml index 226b3a14b84..6415acace92 100644 --- a/.github/workflows/prerelease_cocoapods.yml +++ b/.github/workflows/prerelease_cocoapods.yml @@ -214,4 +214,4 @@ jobs: swift build pod repo add --silent "${local_repo}" https://"$botaccess"@github.com/Firebase/SpecsTesting.git BOT_TOKEN="${botaccess}" .build/debug/spec-repo-builder --sdk-repo $(pwd) --local-spec-repo-name "${local_repo}" --sdk-repo-name SpecsTesting --github-account Firebase --pod-sources 'https://${BOT_TOKEN}@github.com/Firebase/SpecsTesting' "https://github.com/firebase/SpecsDev.git" "https://github.com/firebase/SpecsStaging.git" "https://cdn.cocoapods.org/" "FirebaseFirestoreTestingSupport" "FirebaseAuthTestingSupport" "FirebaseCombineSwift" --keep-repo --include-pods "${updated_podspecs[@]}" - \ No newline at end of file + \ No newline at end of file diff --git a/.github/workflows/release.yml b/.github/workflows/release.yml index 9dc14d9d904..3e2e4ac2b13 100644 --- a/.github/workflows/release.yml +++ b/.github/workflows/release.yml @@ -112,7 +112,7 @@ jobs: retry_wait_seconds: 120 command: DIR=${{ matrix.product }} scripts/test_quickstart.sh ${{ matrix.product }} ${{ matrix.run_tests }} - name: Remove data before upload - # if: ${{ failure() }} + if: ${{ failure() }} run: scripts/remove_data.sh ${{ matrix.product }} # - uses: actions/upload-artifact@v4 # if: ${{ failure() }} From 55f340a962a2d7cc5f71aadb9e6771cf65fd55e0 Mon Sep 17 00:00:00 2001 From: Nick Cooke <36927374+ncooke3@users.noreply.github.com> Date: Wed, 12 Nov 2025 12:29:44 -0500 Subject: [PATCH 15/29] Apply suggestion from @ncooke3 --- .github/workflows/prerelease.yml | 12 +++++++----- 1 file changed, 7 insertions(+), 5 deletions(-) diff --git a/.github/workflows/prerelease.yml b/.github/workflows/prerelease.yml index 03e0461a841..e03d6dbba73 100644 --- a/.github/workflows/prerelease.yml +++ b/.github/workflows/prerelease.yml @@ -119,8 +119,10 @@ jobs: - name: Remove data before upload. if: ${{ failure() }} run: scripts/remove_data.sh ${{ matrix.product }} - # - uses: actions/upload-artifact@v4 - # if: ${{ failure() }} - # with: - # name: quickstart_artifacts_${{ matrix.product }} - # path: quickstart-ios/ + - uses: actions/upload-artifact@v4 + if: ${{ failure() }} + with: + name: quickstart_artifacts_${{ matrix.product }} + path: | + quickstart-ios/ + !quickstart-ios/**/GoogleService-Info.plist From 3113261678170e77546b5f480e17382fa5b2599e Mon Sep 17 00:00:00 2001 From: Nick Cooke <36927374+ncooke3@users.noreply.github.com> Date: Wed, 12 Nov 2025 12:30:00 -0500 Subject: [PATCH 16/29] Apply suggestion from @ncooke3 --- .github/workflows/prerelease_cocoapods.yml | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/.github/workflows/prerelease_cocoapods.yml b/.github/workflows/prerelease_cocoapods.yml index 6415acace92..164b0970046 100644 --- a/.github/workflows/prerelease_cocoapods.yml +++ b/.github/workflows/prerelease_cocoapods.yml @@ -213,5 +213,4 @@ jobs: cd scripts/create_spec_repo/ swift build pod repo add --silent "${local_repo}" https://"$botaccess"@github.com/Firebase/SpecsTesting.git - BOT_TOKEN="${botaccess}" .build/debug/spec-repo-builder --sdk-repo $(pwd) --local-spec-repo-name "${local_repo}" --sdk-repo-name SpecsTesting --github-account Firebase --pod-sources 'https://${BOT_TOKEN}@github.com/Firebase/SpecsTesting' "https://github.com/firebase/SpecsDev.git" "https://github.com/firebase/SpecsStaging.git" "https://cdn.cocoapods.org/" "FirebaseFirestoreTestingSupport" "FirebaseAuthTestingSupport" "FirebaseCombineSwift" --keep-repo --include-pods "${updated_podspecs[@]}" - \ No newline at end of file + BOT_TOKEN="${botaccess}" .build/debug/spec-repo-builder --sdk-repo $(pwd) --local-spec-repo-name "${local_repo}" --sdk-repo-name SpecsTesting --github-account Firebase --pod-sources 'https://${BOT_TOKEN}@github.com/Firebase/SpecsTesting' "https://github.com/firebase/SpecsDev.git" "https://github.com/firebase/SpecsStaging.git" "https://cdn.cocoapods.org/" "FirebaseFirestoreTestingSupport" "FirebaseAuthTestingSupport" "FirebaseCombineSwift" --keep-repo --include-pods "${updated_podspecs[@]}" \ No newline at end of file From b2ae0f164ef19c4801c50c45da65323dc349d695 Mon Sep 17 00:00:00 2001 From: Nick Cooke <36927374+ncooke3@users.noreply.github.com> Date: Wed, 12 Nov 2025 12:30:21 -0500 Subject: [PATCH 17/29] Apply suggestion from @ncooke3 --- .github/workflows/prerelease_cocoapods.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/prerelease_cocoapods.yml b/.github/workflows/prerelease_cocoapods.yml index 164b0970046..684716b9c8b 100644 --- a/.github/workflows/prerelease_cocoapods.yml +++ b/.github/workflows/prerelease_cocoapods.yml @@ -213,4 +213,4 @@ jobs: cd scripts/create_spec_repo/ swift build pod repo add --silent "${local_repo}" https://"$botaccess"@github.com/Firebase/SpecsTesting.git - BOT_TOKEN="${botaccess}" .build/debug/spec-repo-builder --sdk-repo $(pwd) --local-spec-repo-name "${local_repo}" --sdk-repo-name SpecsTesting --github-account Firebase --pod-sources 'https://${BOT_TOKEN}@github.com/Firebase/SpecsTesting' "https://github.com/firebase/SpecsDev.git" "https://github.com/firebase/SpecsStaging.git" "https://cdn.cocoapods.org/" "FirebaseFirestoreTestingSupport" "FirebaseAuthTestingSupport" "FirebaseCombineSwift" --keep-repo --include-pods "${updated_podspecs[@]}" \ No newline at end of file + BOT_TOKEN="${botaccess}" .build/debug/spec-repo-builder --sdk-repo $(pwd) --local-spec-repo-name "${local_repo}" --sdk-repo-name SpecsTesting --github-account Firebase --pod-sources 'https://${BOT_TOKEN}@github.com/Firebase/SpecsTesting' "https://github.com/firebase/SpecsDev.git" "https://github.com/firebase/SpecsStaging.git" "https://cdn.cocoapods.org/" "FirebaseFirestoreTestingSupport" "FirebaseAuthTestingSupport" "FirebaseCombineSwift" --keep-repo --include-pods "${updated_podspecs[@]}" From 557490f4db50f8530d22366b3b7d59be5ae6f210 Mon Sep 17 00:00:00 2001 From: Nick Cooke Date: Wed, 12 Nov 2025 14:14:00 -0500 Subject: [PATCH 18/29] upload --- .github/workflows/release.yml | 14 ++++++++------ 1 file changed, 8 insertions(+), 6 deletions(-) diff --git a/.github/workflows/release.yml b/.github/workflows/release.yml index 3e2e4ac2b13..96c18c93bc0 100644 --- a/.github/workflows/release.yml +++ b/.github/workflows/release.yml @@ -112,10 +112,12 @@ jobs: retry_wait_seconds: 120 command: DIR=${{ matrix.product }} scripts/test_quickstart.sh ${{ matrix.product }} ${{ matrix.run_tests }} - name: Remove data before upload - if: ${{ failure() }} + if: failure() run: scripts/remove_data.sh ${{ matrix.product }} - # - uses: actions/upload-artifact@v4 - # if: ${{ failure() }} - # with: - # name: quickstart_artifacts_${{ matrix.product }} - # path: quickstart-ios/ + - uses: actions/upload-artifact@v4 + if: failure() + with: + name: quickstart_artifacts_${{ matrix.product }} + path: | + quickstart-ios/ + !quickstart-ios/**/GoogleService-Info.plist From 6a1b0c958a09676832836279b18c43b2afbf5239 Mon Sep 17 00:00:00 2001 From: Nick Cooke <36927374+ncooke3@users.noreply.github.com> Date: Wed, 12 Nov 2025 14:41:29 -0500 Subject: [PATCH 19/29] Update .github/workflows/release_cocoapods.yml --- .github/workflows/release_cocoapods.yml | 1 - 1 file changed, 1 deletion(-) diff --git a/.github/workflows/release_cocoapods.yml b/.github/workflows/release_cocoapods.yml index da36146ef77..c75b089802c 100644 --- a/.github/workflows/release_cocoapods.yml +++ b/.github/workflows/release_cocoapods.yml @@ -16,7 +16,6 @@ on: env: FIREBASE_CI: true - FIREBASECI_USE_LATEST_GOOGLEAPPMEASUREMENT: true concurrency: group: ${{ github.workflow }}-${{ github.head_ref || github.ref }} From 905ea7db67e6b877e41042d5883c705a87d1d385 Mon Sep 17 00:00:00 2001 From: Nick Cooke <36927374+ncooke3@users.noreply.github.com> Date: Wed, 12 Nov 2025 14:41:43 -0500 Subject: [PATCH 20/29] Update .github/workflows/zip.yml --- .github/workflows/zip.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/zip.yml b/.github/workflows/zip.yml index 35be343b1cc..21a35cde3a2 100644 --- a/.github/workflows/zip.yml +++ b/.github/workflows/zip.yml @@ -16,7 +16,7 @@ permissions: env: # When a run_id is specified, build jobs will be skipped and the specified # run's artifacts will be used for testing. - PINNED_RUN_ID: '17965877651' + PINNED_RUN_ID: '' on: pull_request: From f32979463822777bedd30371cfe6d82511a20ea0 Mon Sep 17 00:00:00 2001 From: Nick Cooke <36927374+ncooke3@users.noreply.github.com> Date: Fri, 14 Nov 2025 11:12:59 -0500 Subject: [PATCH 21/29] fix: messaging zip failure (#15502) --- .github/workflows/zip.yml | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/.github/workflows/zip.yml b/.github/workflows/zip.yml index 21a35cde3a2..a86c9d91c91 100644 --- a/.github/workflows/zip.yml +++ b/.github/workflows/zip.yml @@ -646,6 +646,10 @@ jobs: run: SAMPLE="$SDK" TARGET="${SDK}Example" scripts/setup_quickstart_framework.sh \ "${HOME}"/ios_frameworks/Firebase/FirebaseMessaging/* \ "${HOME}"/ios_frameworks/Firebase/FirebaseAnalytics/* + - name: Add frameworks to notification extension target + run: | + cd quickstart-ios/messaging + "${GITHUB_WORKSPACE}"/quickstart-ios/scripts/add_framework_script.rb --sdk "Messaging" --target "NotificationServiceExtension" --framework_path Firebase/ - name: Install Secret GoogleService-Info.plist run: scripts/decrypt_gha_secret.sh scripts/gha-encrypted/qs-messaging.plist.gpg \ quickstart-ios/messaging/GoogleService-Info.plist "$plist_secret" From dac53998cecd0f80e43ba33e5460d9c298bd64d9 Mon Sep 17 00:00:00 2001 From: Nick Cooke Date: Fri, 14 Nov 2025 12:25:44 -0500 Subject: [PATCH 22/29] fix: ai GHA needs clause inconsistency --- .github/workflows/zip.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/zip.yml b/.github/workflows/zip.yml index a86c9d91c91..d7b91853b4b 100644 --- a/.github/workflows/zip.yml +++ b/.github/workflows/zip.yml @@ -457,7 +457,7 @@ jobs: !quickstart-ios/**/GoogleService-Info.plist quickstart_framework_firebaseai: - needs: package-head + needs: packaging_done if: ${{ !cancelled() && (success() || github.event.inputs.zip_run_id != '') }} env: plist_secret: ${{ secrets.GHASecretsGPGPassphrase1 }} From fe91706934809cabd7f93b0ff2556ce9fc1b8255 Mon Sep 17 00:00:00 2001 From: Nick Cooke <36927374+ncooke3@users.noreply.github.com> Date: Fri, 14 Nov 2025 15:29:32 -0500 Subject: [PATCH 23/29] fix: ai qs in zip test (#15503) --- .github/workflows/zip.yml | 968 +++++++++++++------------- scripts/remove_spm_dependencies.rb | 165 +++-- scripts/setup_quickstart_framework.sh | 8 +- scripts/zip_quickstart_test.sh | 2 +- 4 files changed, 607 insertions(+), 536 deletions(-) diff --git a/.github/workflows/zip.yml b/.github/workflows/zip.yml index d7b91853b4b..5be3fe9aa2d 100644 --- a/.github/workflows/zip.yml +++ b/.github/workflows/zip.yml @@ -16,7 +16,7 @@ permissions: env: # When a run_id is specified, build jobs will be skipped and the specified # run's artifacts will be used for testing. - PINNED_RUN_ID: '' + PINNED_RUN_ID: '19348155315' on: pull_request: @@ -46,9 +46,9 @@ on: required: false default: '' -concurrency: - group: ${{ github.workflow }}-${{ github.head_ref || github.ref }} - cancel-in-progress: true +# concurrency: +# group: ${{ github.workflow }}-${{ github.head_ref || github.ref }} +# cancel-in-progress: true jobs: should_package: @@ -169,296 +169,296 @@ jobs: echo "run_id=${{ github.run_id }}" >> $GITHUB_OUTPUT fi - check_framework_firestore_symbols: - needs: packaging_done - if: ${{ !cancelled() }} - env: - FIREBASECI_USE_LATEST_GOOGLEAPPMEASUREMENT: 1 - runs-on: macos-14 - steps: - - name: Xcode 16.2 - run: sudo xcode-select -s /Applications/Xcode_16.2.app/Contents/Developer - - uses: actions/checkout@v4 - - name: Get framework dir - uses: actions/download-artifact@v4.1.7 - with: - name: Firebase-actions-dir - run-id: ${{ needs.packaging_done.outputs.run_id }} - github-token: ${{ secrets.GITHUB_TOKEN }} - - uses: ruby/setup-ruby@354a1ad156761f5ee2b7b13fa8e09943a5e8d252 # v1 - - name: Setup Bundler - run: ./scripts/setup_bundler.sh - - name: Install xcpretty - run: gem install xcpretty - - name: Move frameworks - run: | - mkdir -p "${HOME}"/ios_frameworks/ - find "${GITHUB_WORKSPACE}" -name "Firebase*latest.zip" -exec unzip -d "${HOME}"/ios_frameworks/ {} + - - name: Check linked Firestore.xcframework for unlinked symbols. - run: | - scripts/check_firestore_symbols.sh \ - $(pwd) \ - "${HOME}"/ios_frameworks/Firebase/FirebaseFirestore/FirebaseFirestoreInternal.xcframework + # check_framework_firestore_symbols: + # needs: packaging_done + # if: ${{ !cancelled() }} + # env: + # FIREBASECI_USE_LATEST_GOOGLEAPPMEASUREMENT: 1 + # runs-on: macos-14 + # steps: + # - name: Xcode 16.2 + # run: sudo xcode-select -s /Applications/Xcode_16.2.app/Contents/Developer + # - uses: actions/checkout@v4 + # - name: Get framework dir + # uses: actions/download-artifact@v4.1.7 + # with: + # name: Firebase-actions-dir + # run-id: ${{ needs.packaging_done.outputs.run_id }} + # github-token: ${{ secrets.GITHUB_TOKEN }} + # - uses: ruby/setup-ruby@354a1ad156761f5ee2b7b13fa8e09943a5e8d252 # v1 + # - name: Setup Bundler + # run: ./scripts/setup_bundler.sh + # - name: Install xcpretty + # run: gem install xcpretty + # - name: Move frameworks + # run: | + # mkdir -p "${HOME}"/ios_frameworks/ + # find "${GITHUB_WORKSPACE}" -name "Firebase*latest.zip" -exec unzip -d "${HOME}"/ios_frameworks/ {} + + # - name: Check linked Firestore.xcframework for unlinked symbols. + # run: | + # scripts/check_firestore_symbols.sh \ + # $(pwd) \ + # "${HOME}"/ios_frameworks/Firebase/FirebaseFirestore/FirebaseFirestoreInternal.xcframework - quickstart_framework_abtesting: - needs: packaging_done - if: ${{ !cancelled() }} - env: - plist_secret: ${{ secrets.GHASecretsGPGPassphrase1 }} - SDK: "ABTesting" - strategy: - matrix: - artifact: [Firebase-actions-dir, Firebase-actions-dir-dynamic] - build-env: - - os: macos-15 - xcode: Xcode_16.4 - runs-on: ${{ matrix.build-env.os }} - steps: - - uses: actions/checkout@v4 - - name: Get framework dir - uses: actions/download-artifact@v4.1.7 - with: - name: ${{ matrix.artifact }} - run-id: ${{ needs.packaging_done.outputs.run_id }} - github-token: ${{ secrets.GITHUB_TOKEN }} - - uses: ruby/setup-ruby@354a1ad156761f5ee2b7b13fa8e09943a5e8d252 # v1 - - name: Xcode - run: sudo xcode-select -s /Applications/${{ matrix.build-env.xcode }}.app/Contents/Developer - - name: Setup Bundler - run: ./scripts/setup_bundler.sh - - name: Move frameworks - run: | - mkdir -p "${HOME}"/ios_frameworks/ - find "${GITHUB_WORKSPACE}" -name "Firebase*latest.zip" -exec unzip -d "${HOME}"/ios_frameworks/ {} + - - name: Setup quickstart - run: SAMPLE="$SDK" TARGET="${SDK}Example" scripts/setup_quickstart_framework.sh \ - "${HOME}"/ios_frameworks/Firebase/FirebaseRemoteConfig/* \ - "${HOME}"/ios_frameworks/Firebase/FirebaseAnalytics/FirebaseCore.xcframework \ - "${HOME}"/ios_frameworks/Firebase/FirebaseAnalytics/FirebaseCoreInternal.xcframework \ - "${HOME}"/ios_frameworks/Firebase/FirebaseAnalytics/FBLPromises.xcframework \ - "${HOME}"/ios_frameworks/Firebase/FirebaseAnalytics/FirebaseInstallations.xcframework \ - "${HOME}"/ios_frameworks/Firebase/FirebaseAnalytics/GoogleUtilities.xcframework - - 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 Quickstart - run: ([ -z $plist_secret ] || scripts/third_party/travis/retry.sh scripts/test_quickstart_framework.sh "${SDK}") - - uses: actions/upload-artifact@v4 - if: failure() - with: - name: quickstart_artifacts_abtesting_${{ matrix.artifact }} - path: | - quickstart-ios/ - !quickstart-ios/**/GoogleService-Info.plist + # quickstart_framework_abtesting: + # needs: packaging_done + # if: ${{ !cancelled() }} + # env: + # plist_secret: ${{ secrets.GHASecretsGPGPassphrase1 }} + # SDK: "ABTesting" + # strategy: + # matrix: + # artifact: [Firebase-actions-dir, Firebase-actions-dir-dynamic] + # build-env: + # - os: macos-15 + # xcode: Xcode_16.4 + # runs-on: ${{ matrix.build-env.os }} + # steps: + # - uses: actions/checkout@v4 + # - name: Get framework dir + # uses: actions/download-artifact@v4.1.7 + # with: + # name: ${{ matrix.artifact }} + # run-id: ${{ needs.packaging_done.outputs.run_id }} + # github-token: ${{ secrets.GITHUB_TOKEN }} + # - uses: ruby/setup-ruby@354a1ad156761f5ee2b7b13fa8e09943a5e8d252 # v1 + # - name: Xcode + # run: sudo xcode-select -s /Applications/${{ matrix.build-env.xcode }}.app/Contents/Developer + # - name: Setup Bundler + # run: ./scripts/setup_bundler.sh + # - name: Move frameworks + # run: | + # mkdir -p "${HOME}"/ios_frameworks/ + # find "${GITHUB_WORKSPACE}" -name "Firebase*latest.zip" -exec unzip -d "${HOME}"/ios_frameworks/ {} + + # - name: Setup quickstart + # run: SAMPLE="$SDK" TARGET="${SDK}Example" scripts/setup_quickstart_framework.sh \ + # "${HOME}"/ios_frameworks/Firebase/FirebaseRemoteConfig/* \ + # "${HOME}"/ios_frameworks/Firebase/FirebaseAnalytics/FirebaseCore.xcframework \ + # "${HOME}"/ios_frameworks/Firebase/FirebaseAnalytics/FirebaseCoreInternal.xcframework \ + # "${HOME}"/ios_frameworks/Firebase/FirebaseAnalytics/FBLPromises.xcframework \ + # "${HOME}"/ios_frameworks/Firebase/FirebaseAnalytics/FirebaseInstallations.xcframework \ + # "${HOME}"/ios_frameworks/Firebase/FirebaseAnalytics/GoogleUtilities.xcframework + # - 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 Quickstart + # run: ([ -z $plist_secret ] || scripts/third_party/travis/retry.sh scripts/test_quickstart_framework.sh "${SDK}") + # - uses: actions/upload-artifact@v4 + # if: failure() + # with: + # name: quickstart_artifacts_abtesting_${{ matrix.artifact }} + # path: | + # quickstart-ios/ + # !quickstart-ios/**/GoogleService-Info.plist - quickstart_framework_auth: - needs: packaging_done - if: ${{ !cancelled() }} - env: - plist_secret: ${{ secrets.GHASecretsGPGPassphrase1 }} - SDK: "Authentication" - strategy: - matrix: - os: [macos-15] - artifact: [Firebase-actions-dir, Firebase-actions-dir-dynamic] - include: - - os: macos-15 - xcode: Xcode_16.4 - runs-on: ${{ matrix.os }} - steps: - - uses: actions/checkout@v4 - - name: Get framework dir - uses: actions/download-artifact@v4.1.7 - with: - name: ${{ matrix.artifact }} - run-id: ${{ needs.packaging_done.outputs.run_id }} - github-token: ${{ secrets.GITHUB_TOKEN }} - - uses: ruby/setup-ruby@354a1ad156761f5ee2b7b13fa8e09943a5e8d252 # v1 - - name: Xcode - run: sudo xcode-select -s /Applications/${{ matrix.xcode }}.app/Contents/Developer - - name: Setup Bundler - run: ./scripts/setup_bundler.sh - - name: Move frameworks - run: | - mkdir -p "${HOME}"/ios_frameworks/ - find "${GITHUB_WORKSPACE}" -name "Firebase*latest.zip" -exec unzip -d "${HOME}"/ios_frameworks/ {} + - - name: Setup Swift Quickstart - run: SAMPLE="$SDK" TARGET="${SDK}Example" NON_FIREBASE_SDKS="FBSDKLoginKit FBSDKCoreKit FBSDKCoreKit_Basics FBAEMKit" scripts/setup_quickstart_framework.sh \ - "${HOME}"/ios_frameworks/Firebase/NonFirebaseSDKs/* \ - "${HOME}"/ios_frameworks/Firebase/GoogleSignIn/* \ - "${HOME}"/ios_frameworks/Firebase/FirebaseAuth/* \ - "${HOME}"/ios_frameworks/Firebase/FirebaseAnalytics/* - - name: Install Secret GoogleService-Info.plist - run: scripts/decrypt_gha_secret.sh scripts/gha-encrypted/qs-authentication.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_framework.sh "${SDK}") - - uses: actions/upload-artifact@v4 - if: failure() - with: - name: quickstart_artifacts_auth_${{ matrix.artifact }} - path: | - quickstart-ios/ - !quickstart-ios/**/GoogleService-Info.plist + # quickstart_framework_auth: + # needs: packaging_done + # if: ${{ !cancelled() }} + # env: + # plist_secret: ${{ secrets.GHASecretsGPGPassphrase1 }} + # SDK: "Authentication" + # strategy: + # matrix: + # os: [macos-15] + # artifact: [Firebase-actions-dir, Firebase-actions-dir-dynamic] + # include: + # - os: macos-15 + # xcode: Xcode_16.4 + # runs-on: ${{ matrix.os }} + # steps: + # - uses: actions/checkout@v4 + # - name: Get framework dir + # uses: actions/download-artifact@v4.1.7 + # with: + # name: ${{ matrix.artifact }} + # run-id: ${{ needs.packaging_done.outputs.run_id }} + # github-token: ${{ secrets.GITHUB_TOKEN }} + # - uses: ruby/setup-ruby@354a1ad156761f5ee2b7b13fa8e09943a5e8d252 # v1 + # - name: Xcode + # run: sudo xcode-select -s /Applications/${{ matrix.xcode }}.app/Contents/Developer + # - name: Setup Bundler + # run: ./scripts/setup_bundler.sh + # - name: Move frameworks + # run: | + # mkdir -p "${HOME}"/ios_frameworks/ + # find "${GITHUB_WORKSPACE}" -name "Firebase*latest.zip" -exec unzip -d "${HOME}"/ios_frameworks/ {} + + # - name: Setup Swift Quickstart + # run: SAMPLE="$SDK" TARGET="${SDK}Example" NON_FIREBASE_SDKS="FBSDKLoginKit FBSDKCoreKit FBSDKCoreKit_Basics FBAEMKit" scripts/setup_quickstart_framework.sh \ + # "${HOME}"/ios_frameworks/Firebase/NonFirebaseSDKs/* \ + # "${HOME}"/ios_frameworks/Firebase/GoogleSignIn/* \ + # "${HOME}"/ios_frameworks/Firebase/FirebaseAuth/* \ + # "${HOME}"/ios_frameworks/Firebase/FirebaseAnalytics/* + # - name: Install Secret GoogleService-Info.plist + # run: scripts/decrypt_gha_secret.sh scripts/gha-encrypted/qs-authentication.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_framework.sh "${SDK}") + # - uses: actions/upload-artifact@v4 + # if: failure() + # with: + # name: quickstart_artifacts_auth_${{ matrix.artifact }} + # path: | + # quickstart-ios/ + # !quickstart-ios/**/GoogleService-Info.plist - quickstart_framework_config: - needs: packaging_done - if: ${{ !cancelled() }} - env: - plist_secret: ${{ secrets.GHASecretsGPGPassphrase1 }} - SDK: "Config" - strategy: - matrix: - artifact: [Firebase-actions-dir, Firebase-actions-dir-dynamic] - build-env: - - os: macos-15 - xcode: Xcode_16.4 - runs-on: ${{ matrix.build-env.os }} - steps: - - uses: actions/checkout@v4 - - name: Get framework dir - uses: actions/download-artifact@v4.1.7 - with: - name: ${{ matrix.artifact }} - run-id: ${{ needs.packaging_done.outputs.run_id }} - github-token: ${{ secrets.GITHUB_TOKEN }} - - uses: ruby/setup-ruby@354a1ad156761f5ee2b7b13fa8e09943a5e8d252 # v1 - - name: Xcode - run: sudo xcode-select -s /Applications/${{ matrix.build-env.xcode }}.app/Contents/Developer - - name: Setup Bundler - run: ./scripts/setup_bundler.sh - - name: Move frameworks - run: | - mkdir -p "${HOME}"/ios_frameworks/ - find "${GITHUB_WORKSPACE}" -name "Firebase*latest.zip" -exec unzip -d "${HOME}"/ios_frameworks/ {} + - - name: Setup Swift Quickstart + # quickstart_framework_config: + # needs: packaging_done + # if: ${{ !cancelled() }} + # env: + # plist_secret: ${{ secrets.GHASecretsGPGPassphrase1 }} + # SDK: "Config" + # strategy: + # matrix: + # artifact: [Firebase-actions-dir, Firebase-actions-dir-dynamic] + # build-env: + # - os: macos-15 + # xcode: Xcode_16.4 + # runs-on: ${{ matrix.build-env.os }} + # steps: + # - uses: actions/checkout@v4 + # - name: Get framework dir + # uses: actions/download-artifact@v4.1.7 + # with: + # name: ${{ matrix.artifact }} + # run-id: ${{ needs.packaging_done.outputs.run_id }} + # github-token: ${{ secrets.GITHUB_TOKEN }} + # - uses: ruby/setup-ruby@354a1ad156761f5ee2b7b13fa8e09943a5e8d252 # v1 + # - name: Xcode + # run: sudo xcode-select -s /Applications/${{ matrix.build-env.xcode }}.app/Contents/Developer + # - name: Setup Bundler + # run: ./scripts/setup_bundler.sh + # - name: Move frameworks + # run: | + # mkdir -p "${HOME}"/ios_frameworks/ + # find "${GITHUB_WORKSPACE}" -name "Firebase*latest.zip" -exec unzip -d "${HOME}"/ios_frameworks/ {} + + # - name: Setup Swift Quickstart - run: SAMPLE="$SDK" TARGET="${SDK}Example" scripts/setup_quickstart_framework.sh \ - "${HOME}"/ios_frameworks/Firebase/FirebaseRemoteConfig/* \ - "${HOME}"/ios_frameworks/Firebase/FirebaseAnalytics/* - - name: Install Secret GoogleService-Info.plist - run: scripts/decrypt_gha_secret.sh scripts/gha-encrypted/qs-config.plist.gpg \ - quickstart-ios/config/GoogleService-Info.plist "$plist_secret" - - name: Test Swift Quickstart - run: ([ -z $plist_secret ] || scripts/third_party/travis/retry.sh scripts/test_quickstart_framework.sh "${SDK}") - - uses: actions/upload-artifact@v4 - if: failure() - with: - name: quickstart_artifacts_config_${{ matrix.artifact }} - path: | - quickstart-ios/ - !quickstart-ios/**/GoogleService-Info.plist + # run: SAMPLE="$SDK" TARGET="${SDK}Example" scripts/setup_quickstart_framework.sh \ + # "${HOME}"/ios_frameworks/Firebase/FirebaseRemoteConfig/* \ + # "${HOME}"/ios_frameworks/Firebase/FirebaseAnalytics/* + # - name: Install Secret GoogleService-Info.plist + # run: scripts/decrypt_gha_secret.sh scripts/gha-encrypted/qs-config.plist.gpg \ + # quickstart-ios/config/GoogleService-Info.plist "$plist_secret" + # - name: Test Swift Quickstart + # run: ([ -z $plist_secret ] || scripts/third_party/travis/retry.sh scripts/test_quickstart_framework.sh "${SDK}") + # - uses: actions/upload-artifact@v4 + # if: failure() + # with: + # name: quickstart_artifacts_config_${{ matrix.artifact }} + # path: | + # quickstart-ios/ + # !quickstart-ios/**/GoogleService-Info.plist - quickstart_framework_crashlytics: - needs: packaging_done - if: ${{ !cancelled() }} - env: - plist_secret: ${{ secrets.GHASecretsGPGPassphrase1 }} - SDK: "Crashlytics" - strategy: - matrix: - artifact: [Firebase-actions-dir, Firebase-actions-dir-dynamic] - build-env: - - os: macos-15 - xcode: Xcode_16.4 - runs-on: ${{ matrix.build-env.os }} - steps: - - uses: actions/checkout@v4 - - name: Get framework dir - uses: actions/download-artifact@v4.1.7 - with: - name: ${{ matrix.artifact }} - run-id: ${{ needs.packaging_done.outputs.run_id }} - github-token: ${{ secrets.GITHUB_TOKEN }} - - uses: ruby/setup-ruby@354a1ad156761f5ee2b7b13fa8e09943a5e8d252 # v1 - - name: Xcode - run: sudo xcode-select -s /Applications/${{ matrix.build-env.xcode }}.app/Contents/Developer - - name: Setup Bundler - run: ./scripts/setup_bundler.sh - - name: Move frameworks - run: | - mkdir -p "${HOME}"/ios_frameworks/ - find "${GITHUB_WORKSPACE}" -name "Firebase*latest.zip" -exec unzip -d "${HOME}"/ios_frameworks/ {} + - - name: Setup quickstart - run: | - rm -rf "${HOME}"/ios_frameworks/Firebase/FirebaseAnalytics/FirebaseAnalytics* - rm -rf "${HOME}"/ios_frameworks/Firebase/FirebaseAnalytics/GoogleAppMeasurement* - rm -rf "${HOME}"/ios_frameworks/Firebase/FirebaseAnalytics/GoogleAds* - SAMPLE="$SDK" TARGET="${SDK}Example" scripts/setup_quickstart_framework.sh \ - "${HOME}"/ios_frameworks/Firebase/FirebaseCrashlytics/* \ - "${HOME}"/ios_frameworks/Firebase/FirebaseAnalytics/* - - name: Add frameworks to Crashlytics watchOS target - run: | - cd quickstart-ios/crashlytics - "${GITHUB_WORKSPACE}"/quickstart-ios/scripts/add_framework_script.rb --sdk "Crashlytics" --target "CrashlyticsExample_(watchOS)_Extension" --framework_path Firebase/ - - name: Patch Crashlytics Run Script Path - run: scripts/patch_crashlytics_run_path.rb - - 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 Quickstart - run: ([ -z $plist_secret ] || scripts/third_party/travis/retry.sh scripts/test_quickstart_framework.sh "${SDK}") - - uses: actions/upload-artifact@v4 - if: failure() - with: - name: quickstart_artifacts_crashlytics_${{ matrix.artifact }} - path: | - quickstart-ios/ - !quickstart-ios/**/GoogleService-Info.plist + # quickstart_framework_crashlytics: + # needs: packaging_done + # if: ${{ !cancelled() }} + # env: + # plist_secret: ${{ secrets.GHASecretsGPGPassphrase1 }} + # SDK: "Crashlytics" + # strategy: + # matrix: + # artifact: [Firebase-actions-dir, Firebase-actions-dir-dynamic] + # build-env: + # - os: macos-15 + # xcode: Xcode_16.4 + # runs-on: ${{ matrix.build-env.os }} + # steps: + # - uses: actions/checkout@v4 + # - name: Get framework dir + # uses: actions/download-artifact@v4.1.7 + # with: + # name: ${{ matrix.artifact }} + # run-id: ${{ needs.packaging_done.outputs.run_id }} + # github-token: ${{ secrets.GITHUB_TOKEN }} + # - uses: ruby/setup-ruby@354a1ad156761f5ee2b7b13fa8e09943a5e8d252 # v1 + # - name: Xcode + # run: sudo xcode-select -s /Applications/${{ matrix.build-env.xcode }}.app/Contents/Developer + # - name: Setup Bundler + # run: ./scripts/setup_bundler.sh + # - name: Move frameworks + # run: | + # mkdir -p "${HOME}"/ios_frameworks/ + # find "${GITHUB_WORKSPACE}" -name "Firebase*latest.zip" -exec unzip -d "${HOME}"/ios_frameworks/ {} + + # - name: Setup quickstart + # run: | + # rm -rf "${HOME}"/ios_frameworks/Firebase/FirebaseAnalytics/FirebaseAnalytics* + # rm -rf "${HOME}"/ios_frameworks/Firebase/FirebaseAnalytics/GoogleAppMeasurement* + # rm -rf "${HOME}"/ios_frameworks/Firebase/FirebaseAnalytics/GoogleAds* + # SAMPLE="$SDK" TARGET="${SDK}Example" scripts/setup_quickstart_framework.sh \ + # "${HOME}"/ios_frameworks/Firebase/FirebaseCrashlytics/* \ + # "${HOME}"/ios_frameworks/Firebase/FirebaseAnalytics/* + # - name: Add frameworks to Crashlytics watchOS target + # run: | + # cd quickstart-ios/crashlytics + # "${GITHUB_WORKSPACE}"/quickstart-ios/scripts/add_framework_script.rb --sdk "Crashlytics" --target "CrashlyticsExample_(watchOS)_Extension" --framework_path Firebase/ + # - name: Patch Crashlytics Run Script Path + # run: scripts/patch_crashlytics_run_path.rb + # - 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 Quickstart + # run: ([ -z $plist_secret ] || scripts/third_party/travis/retry.sh scripts/test_quickstart_framework.sh "${SDK}") + # - uses: actions/upload-artifact@v4 + # if: failure() + # with: + # name: quickstart_artifacts_crashlytics_${{ matrix.artifact }} + # path: | + # quickstart-ios/ + # !quickstart-ios/**/GoogleService-Info.plist - quickstart_framework_database: - needs: packaging_done - if: ${{ !cancelled() }} - env: - plist_secret: ${{ secrets.GHASecretsGPGPassphrase1 }} - SDK: "Database" - strategy: - matrix: - os: [macos-14] - xcode: [Xcode_16.2] - artifact: [Firebase-actions-dir, Firebase-actions-dir-dynamic] - runs-on: ${{ matrix.os }} - steps: - - uses: actions/checkout@v4 - - name: Get framework dir - uses: actions/download-artifact@v4.1.7 - with: - name: ${{ matrix.artifact }} - run-id: ${{ needs.packaging_done.outputs.run_id }} - github-token: ${{ secrets.GITHUB_TOKEN }} - - uses: ruby/setup-ruby@354a1ad156761f5ee2b7b13fa8e09943a5e8d252 # v1 - - name: Xcode - run: sudo xcode-select -s /Applications/${{ matrix.xcode }}.app/Contents/Developer - - name: Setup Bundler - run: ./scripts/setup_bundler.sh - - name: Move frameworks - run: | - mkdir -p "${HOME}"/ios_frameworks/ - find "${GITHUB_WORKSPACE}" -name "Firebase*latest.zip" -exec unzip -d "${HOME}"/ios_frameworks/ {} + - - name: Setup quickstart - run: SAMPLE="$SDK" TARGET="${SDK}Example" NON_FIREBASE_SDKS="FirebaseDatabaseUI" scripts/setup_quickstart_framework.sh \ - "${HOME}"/ios_frameworks/Firebase/FirebaseDatabase/* \ - "${HOME}"/ios_frameworks/Firebase/FirebaseStorage/* \ - "${HOME}"/ios_frameworks/Firebase/FirebaseFirestore/* \ - "${HOME}"/ios_frameworks/Firebase/FirebaseAuth/* \ - "${HOME}"/ios_frameworks/Firebase/NonFirebaseSDKs/* \ - "${HOME}"/ios_frameworks/Firebase/FirebaseAnalytics/* - - 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: Test Quickstart - run: ([ -z $plist_secret ] || scripts/third_party/travis/retry.sh scripts/test_quickstart_framework.sh "${SDK}") - - uses: actions/upload-artifact@v4 - if: failure() - with: - name: quickstart_artifacts_database_${{ matrix.artifact }} - path: | - quickstart-ios/ - !quickstart-ios/**/GoogleService-Info.plist + # quickstart_framework_database: + # needs: packaging_done + # if: ${{ !cancelled() }} + # env: + # plist_secret: ${{ secrets.GHASecretsGPGPassphrase1 }} + # SDK: "Database" + # strategy: + # matrix: + # os: [macos-14] + # xcode: [Xcode_16.2] + # artifact: [Firebase-actions-dir, Firebase-actions-dir-dynamic] + # runs-on: ${{ matrix.os }} + # steps: + # - uses: actions/checkout@v4 + # - name: Get framework dir + # uses: actions/download-artifact@v4.1.7 + # with: + # name: ${{ matrix.artifact }} + # run-id: ${{ needs.packaging_done.outputs.run_id }} + # github-token: ${{ secrets.GITHUB_TOKEN }} + # - uses: ruby/setup-ruby@354a1ad156761f5ee2b7b13fa8e09943a5e8d252 # v1 + # - name: Xcode + # run: sudo xcode-select -s /Applications/${{ matrix.xcode }}.app/Contents/Developer + # - name: Setup Bundler + # run: ./scripts/setup_bundler.sh + # - name: Move frameworks + # run: | + # mkdir -p "${HOME}"/ios_frameworks/ + # find "${GITHUB_WORKSPACE}" -name "Firebase*latest.zip" -exec unzip -d "${HOME}"/ios_frameworks/ {} + + # - name: Setup quickstart + # run: SAMPLE="$SDK" TARGET="${SDK}Example" NON_FIREBASE_SDKS="FirebaseDatabaseUI" scripts/setup_quickstart_framework.sh \ + # "${HOME}"/ios_frameworks/Firebase/FirebaseDatabase/* \ + # "${HOME}"/ios_frameworks/Firebase/FirebaseStorage/* \ + # "${HOME}"/ios_frameworks/Firebase/FirebaseFirestore/* \ + # "${HOME}"/ios_frameworks/Firebase/FirebaseAuth/* \ + # "${HOME}"/ios_frameworks/Firebase/NonFirebaseSDKs/* \ + # "${HOME}"/ios_frameworks/Firebase/FirebaseAnalytics/* + # - 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: Test Quickstart + # run: ([ -z $plist_secret ] || scripts/third_party/travis/retry.sh scripts/test_quickstart_framework.sh "${SDK}") + # - uses: actions/upload-artifact@v4 + # if: failure() + # with: + # name: quickstart_artifacts_database_${{ matrix.artifact }} + # path: | + # quickstart-ios/ + # !quickstart-ios/**/GoogleService-Info.plist quickstart_framework_firebaseai: needs: packaging_done - if: ${{ !cancelled() && (success() || github.event.inputs.zip_run_id != '') }} + if: ${{ !cancelled() }} env: plist_secret: ${{ secrets.GHASecretsGPGPassphrase1 }} SDK: "FirebaseAI" @@ -477,7 +477,7 @@ jobs: uses: actions/download-artifact@v4.1.7 with: name: ${{ matrix.artifact }} - run-id: ${{ github.event.inputs.zip_run_id || github.run_id }} + run-id: ${{ needs.packaging_done.outputs.run_id }} github-token: ${{ secrets.GITHUB_TOKEN }} - uses: ruby/setup-ruby@354a1ad156761f5ee2b7b13fa8e09943a5e8d252 # v1 - name: Xcode @@ -509,204 +509,204 @@ jobs: quickstart-ios/ !quickstart-ios/**/GoogleService-Info.plist - quickstart_framework_firestore: - needs: packaging_done - if: ${{ !cancelled() }} - env: - plist_secret: ${{ secrets.GHASecretsGPGPassphrase1 }} - SDK: "Firestore" - strategy: - matrix: - artifact: [Firebase-actions-dir, Firebase-actions-dir-dynamic] - build-env: - - os: macos-15 - xcode: Xcode_16.4 - runs-on: ${{ matrix.build-env.os }} - steps: - - uses: actions/checkout@v4 - - name: Get framework dir - uses: actions/download-artifact@v4.1.7 - with: - name: ${{ matrix.artifact }} - run-id: ${{ needs.packaging_done.outputs.run_id }} - github-token: ${{ secrets.GITHUB_TOKEN }} - - uses: ruby/setup-ruby@354a1ad156761f5ee2b7b13fa8e09943a5e8d252 # v1 - - name: Xcode - run: sudo xcode-select -s /Applications/${{ matrix.build-env.xcode }}.app/Contents/Developer - - name: Setup Bundler - run: ./scripts/setup_bundler.sh - - name: Move frameworks - run: | - mkdir -p "${HOME}"/ios_frameworks/ - find "${GITHUB_WORKSPACE}" -name "Firebase*latest.zip" -exec unzip -d "${HOME}"/ios_frameworks/ {} + - - name: Setup quickstart - run: SAMPLE="$SDK" TARGET="${SDK}Example" NON_FIREBASE_SDKS="SDWebImage FirebaseAuthUI FirebaseEmailAuthUI" scripts/setup_quickstart_framework.sh \ - "${HOME}"/ios_frameworks/Firebase/NonFirebaseSDKs/* \ - "${HOME}"/ios_frameworks/Firebase/FirebaseFirestore/* \ - "${HOME}"/ios_frameworks/Firebase/FirebaseAuth/* \ - "${HOME}"/ios_frameworks/Firebase/FirebaseAnalytics/* - - name: Upload build logs on failure - if: failure() - uses: actions/upload-artifact@v4 - with: - name: build_logs_firestore_${{ matrix.artifact }}_${{ matrix.build-env.os }} - path: sdk_zip/build_logs/ - - 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 Quickstart - run: ([ -z $plist_secret ] || scripts/third_party/travis/retry.sh scripts/test_quickstart_framework.sh "${SDK}") - - name: Remove data before upload and zip directory to reduce upload size. - if: always() - run: scripts/remove_data.sh firestore; zip -r --symlinks quickstart_artifacts_firestore.zip quickstart-ios/ - - uses: actions/upload-artifact@v4 - if: failure() - with: - name: quickstart_artifacts_firestore_${{ matrix.artifact }}_${{ matrix.build-env.os }} - path: quickstart_artifacts_firestore.zip + # quickstart_framework_firestore: + # needs: packaging_done + # if: ${{ !cancelled() }} + # env: + # plist_secret: ${{ secrets.GHASecretsGPGPassphrase1 }} + # SDK: "Firestore" + # strategy: + # matrix: + # artifact: [Firebase-actions-dir, Firebase-actions-dir-dynamic] + # build-env: + # - os: macos-15 + # xcode: Xcode_16.4 + # runs-on: ${{ matrix.build-env.os }} + # steps: + # - uses: actions/checkout@v4 + # - name: Get framework dir + # uses: actions/download-artifact@v4.1.7 + # with: + # name: ${{ matrix.artifact }} + # run-id: ${{ needs.packaging_done.outputs.run_id }} + # github-token: ${{ secrets.GITHUB_TOKEN }} + # - uses: ruby/setup-ruby@354a1ad156761f5ee2b7b13fa8e09943a5e8d252 # v1 + # - name: Xcode + # run: sudo xcode-select -s /Applications/${{ matrix.build-env.xcode }}.app/Contents/Developer + # - name: Setup Bundler + # run: ./scripts/setup_bundler.sh + # - name: Move frameworks + # run: | + # mkdir -p "${HOME}"/ios_frameworks/ + # find "${GITHUB_WORKSPACE}" -name "Firebase*latest.zip" -exec unzip -d "${HOME}"/ios_frameworks/ {} + + # - name: Setup quickstart + # run: SAMPLE="$SDK" TARGET="${SDK}Example" NON_FIREBASE_SDKS="SDWebImage FirebaseAuthUI FirebaseEmailAuthUI" scripts/setup_quickstart_framework.sh \ + # "${HOME}"/ios_frameworks/Firebase/NonFirebaseSDKs/* \ + # "${HOME}"/ios_frameworks/Firebase/FirebaseFirestore/* \ + # "${HOME}"/ios_frameworks/Firebase/FirebaseAuth/* \ + # "${HOME}"/ios_frameworks/Firebase/FirebaseAnalytics/* + # - name: Upload build logs on failure + # if: failure() + # uses: actions/upload-artifact@v4 + # with: + # name: build_logs_firestore_${{ matrix.artifact }}_${{ matrix.build-env.os }} + # path: sdk_zip/build_logs/ + # - 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 Quickstart + # run: ([ -z $plist_secret ] || scripts/third_party/travis/retry.sh scripts/test_quickstart_framework.sh "${SDK}") + # - name: Remove data before upload and zip directory to reduce upload size. + # if: always() + # run: scripts/remove_data.sh firestore; zip -r --symlinks quickstart_artifacts_firestore.zip quickstart-ios/ + # - uses: actions/upload-artifact@v4 + # if: failure() + # with: + # name: quickstart_artifacts_firestore_${{ matrix.artifact }}_${{ matrix.build-env.os }} + # path: quickstart_artifacts_firestore.zip - quickstart_framework_inappmessaging: - needs: packaging_done - if: ${{ !cancelled() }} - env: - plist_secret: ${{ secrets.GHASecretsGPGPassphrase1 }} - SDK: "InAppMessaging" - strategy: - matrix: - artifact: [Firebase-actions-dir, Firebase-actions-dir-dynamic] - build-env: - - os: macos-15 - xcode: Xcode_16.4 - runs-on: ${{ matrix.build-env.os }} - steps: - - uses: actions/checkout@v4 - - name: Get framework dir - uses: actions/download-artifact@v4.1.7 - with: - name: ${{ matrix.artifact }} - run-id: ${{ needs.packaging_done.outputs.run_id }} - github-token: ${{ secrets.GITHUB_TOKEN }} - - uses: ruby/setup-ruby@354a1ad156761f5ee2b7b13fa8e09943a5e8d252 # v1 - - name: Xcode - run: sudo xcode-select -s /Applications/${{ matrix.build-env.xcode }}.app/Contents/Developer - - name: Setup Bundler - run: ./scripts/setup_bundler.sh - - name: Move frameworks - run: | - mkdir -p "${HOME}"/ios_frameworks/ - find "${GITHUB_WORKSPACE}" -name "Firebase*latest.zip" -exec unzip -d "${HOME}"/ios_frameworks/ {} + - - name: Setup quickstart - run: SAMPLE="$SDK" TARGET="${SDK}Example" scripts/setup_quickstart_framework.sh \ - "${HOME}"/ios_frameworks/Firebase/FirebaseInAppMessaging/* \ - "${HOME}"/ios_frameworks/Firebase/FirebaseAnalytics/* - - name: Install Secret GoogleService-Info.plist - run: scripts/decrypt_gha_secret.sh scripts/gha-encrypted/qs-inappmessaging.plist.gpg \ - quickstart-ios/inappmessaging/GoogleService-Info.plist "$plist_secret" - - name: Test Swift Quickstart - run: ([ -z $plist_secret ] || scripts/third_party/travis/retry.sh scripts/test_quickstart_framework.sh "${SDK}") - - uses: actions/upload-artifact@v4 - if: failure() - with: - name: quickstart_artifacts_inappmessaging_${{ matrix.artifact }} - path: | - quickstart-ios/ - !quickstart-ios/**/GoogleService-Info.plist + # quickstart_framework_inappmessaging: + # needs: packaging_done + # if: ${{ !cancelled() }} + # env: + # plist_secret: ${{ secrets.GHASecretsGPGPassphrase1 }} + # SDK: "InAppMessaging" + # strategy: + # matrix: + # artifact: [Firebase-actions-dir, Firebase-actions-dir-dynamic] + # build-env: + # - os: macos-15 + # xcode: Xcode_16.4 + # runs-on: ${{ matrix.build-env.os }} + # steps: + # - uses: actions/checkout@v4 + # - name: Get framework dir + # uses: actions/download-artifact@v4.1.7 + # with: + # name: ${{ matrix.artifact }} + # run-id: ${{ needs.packaging_done.outputs.run_id }} + # github-token: ${{ secrets.GITHUB_TOKEN }} + # - uses: ruby/setup-ruby@354a1ad156761f5ee2b7b13fa8e09943a5e8d252 # v1 + # - name: Xcode + # run: sudo xcode-select -s /Applications/${{ matrix.build-env.xcode }}.app/Contents/Developer + # - name: Setup Bundler + # run: ./scripts/setup_bundler.sh + # - name: Move frameworks + # run: | + # mkdir -p "${HOME}"/ios_frameworks/ + # find "${GITHUB_WORKSPACE}" -name "Firebase*latest.zip" -exec unzip -d "${HOME}"/ios_frameworks/ {} + + # - name: Setup quickstart + # run: SAMPLE="$SDK" TARGET="${SDK}Example" scripts/setup_quickstart_framework.sh \ + # "${HOME}"/ios_frameworks/Firebase/FirebaseInAppMessaging/* \ + # "${HOME}"/ios_frameworks/Firebase/FirebaseAnalytics/* + # - name: Install Secret GoogleService-Info.plist + # run: scripts/decrypt_gha_secret.sh scripts/gha-encrypted/qs-inappmessaging.plist.gpg \ + # quickstart-ios/inappmessaging/GoogleService-Info.plist "$plist_secret" + # - name: Test Swift Quickstart + # run: ([ -z $plist_secret ] || scripts/third_party/travis/retry.sh scripts/test_quickstart_framework.sh "${SDK}") + # - uses: actions/upload-artifact@v4 + # if: failure() + # with: + # name: quickstart_artifacts_inappmessaging_${{ matrix.artifact }} + # path: | + # quickstart-ios/ + # !quickstart-ios/**/GoogleService-Info.plist - quickstart_framework_messaging: - needs: packaging_done - if: ${{ !cancelled() }} - env: - plist_secret: ${{ secrets.GHASecretsGPGPassphrase1 }} - SDK: "Messaging" - strategy: - matrix: - artifact: [Firebase-actions-dir, Firebase-actions-dir-dynamic] - build-env: - - os: macos-15 - xcode: Xcode_16.4 - runs-on: ${{ matrix.build-env.os }} - steps: - - uses: actions/checkout@v4 - - name: Get framework dir - uses: actions/download-artifact@v4.1.7 - with: - name: ${{ matrix.artifact }} - run-id: ${{ needs.packaging_done.outputs.run_id }} - github-token: ${{ secrets.GITHUB_TOKEN }} - - uses: ruby/setup-ruby@354a1ad156761f5ee2b7b13fa8e09943a5e8d252 # v1 - - name: Xcode - run: sudo xcode-select -s /Applications/${{ matrix.build-env.xcode }}.app/Contents/Developer - - name: Setup Bundler - run: ./scripts/setup_bundler.sh - - name: Move frameworks - run: | - mkdir -p "${HOME}"/ios_frameworks/ - find "${GITHUB_WORKSPACE}" -name "Firebase*latest.zip" -exec unzip -d "${HOME}"/ios_frameworks/ {} + - - name: Setup quickstart - run: SAMPLE="$SDK" TARGET="${SDK}Example" scripts/setup_quickstart_framework.sh \ - "${HOME}"/ios_frameworks/Firebase/FirebaseMessaging/* \ - "${HOME}"/ios_frameworks/Firebase/FirebaseAnalytics/* - - name: Add frameworks to notification extension target - run: | - cd quickstart-ios/messaging - "${GITHUB_WORKSPACE}"/quickstart-ios/scripts/add_framework_script.rb --sdk "Messaging" --target "NotificationServiceExtension" --framework_path Firebase/ - - name: Install Secret GoogleService-Info.plist - run: scripts/decrypt_gha_secret.sh scripts/gha-encrypted/qs-messaging.plist.gpg \ - quickstart-ios/messaging/GoogleService-Info.plist "$plist_secret" - - name: Test Quickstart - run: ([ -z $plist_secret ] || scripts/third_party/travis/retry.sh scripts/test_quickstart_framework.sh "${SDK}") - - uses: actions/upload-artifact@v4 - if: failure() - with: - name: quickstart_artifacts_messaging_${{ matrix.artifact }} - path: | - quickstart-ios/ - !quickstart-ios/**/GoogleService-Info.plist + # quickstart_framework_messaging: + # needs: packaging_done + # if: ${{ !cancelled() }} + # env: + # plist_secret: ${{ secrets.GHASecretsGPGPassphrase1 }} + # SDK: "Messaging" + # strategy: + # matrix: + # artifact: [Firebase-actions-dir, Firebase-actions-dir-dynamic] + # build-env: + # - os: macos-15 + # xcode: Xcode_16.4 + # runs-on: ${{ matrix.build-env.os }} + # steps: + # - uses: actions/checkout@v4 + # - name: Get framework dir + # uses: actions/download-artifact@v4.1.7 + # with: + # name: ${{ matrix.artifact }} + # run-id: ${{ needs.packaging_done.outputs.run_id }} + # github-token: ${{ secrets.GITHUB_TOKEN }} + # - uses: ruby/setup-ruby@354a1ad156761f5ee2b7b13fa8e09943a5e8d252 # v1 + # - name: Xcode + # run: sudo xcode-select -s /Applications/${{ matrix.build-env.xcode }}.app/Contents/Developer + # - name: Setup Bundler + # run: ./scripts/setup_bundler.sh + # - name: Move frameworks + # run: | + # mkdir -p "${HOME}"/ios_frameworks/ + # find "${GITHUB_WORKSPACE}" -name "Firebase*latest.zip" -exec unzip -d "${HOME}"/ios_frameworks/ {} + + # - name: Setup quickstart + # run: SAMPLE="$SDK" TARGET="${SDK}Example" scripts/setup_quickstart_framework.sh \ + # "${HOME}"/ios_frameworks/Firebase/FirebaseMessaging/* \ + # "${HOME}"/ios_frameworks/Firebase/FirebaseAnalytics/* + # - name: Add frameworks to notification extension target + # run: | + # cd quickstart-ios/messaging + # "${GITHUB_WORKSPACE}"/quickstart-ios/scripts/add_framework_script.rb --sdk "Messaging" --target "NotificationServiceExtension" --framework_path Firebase/ + # - name: Install Secret GoogleService-Info.plist + # run: scripts/decrypt_gha_secret.sh scripts/gha-encrypted/qs-messaging.plist.gpg \ + # quickstart-ios/messaging/GoogleService-Info.plist "$plist_secret" + # - name: Test Quickstart + # run: ([ -z $plist_secret ] || scripts/third_party/travis/retry.sh scripts/test_quickstart_framework.sh "${SDK}") + # - uses: actions/upload-artifact@v4 + # if: failure() + # with: + # name: quickstart_artifacts_messaging_${{ matrix.artifact }} + # path: | + # quickstart-ios/ + # !quickstart-ios/**/GoogleService-Info.plist - quickstart_framework_storage: - needs: packaging_done - if: ${{ !cancelled() }} - env: - plist_secret: ${{ secrets.GHASecretsGPGPassphrase1 }} - SDK: "Storage" - strategy: - matrix: - artifact: [Firebase-actions-dir, Firebase-actions-dir-dynamic] - build-env: - - os: macos-15 - xcode: Xcode_16.4 - runs-on: ${{ matrix.build-env.os }} - steps: - - uses: actions/checkout@v4 - - name: Get framework dir - uses: actions/download-artifact@v4.1.7 - with: - name: ${{ matrix.artifact }} - run-id: ${{ needs.packaging_done.outputs.run_id }} - github-token: ${{ secrets.GITHUB_TOKEN }} - - uses: ruby/setup-ruby@354a1ad156761f5ee2b7b13fa8e09943a5e8d252 # v1 - - name: Xcode - run: sudo xcode-select -s /Applications/${{ matrix.build-env.xcode }}.app/Contents/Developer - - name: Setup Bundler - run: ./scripts/setup_bundler.sh - - name: Move frameworks - run: | - mkdir -p "${HOME}"/ios_frameworks/ - find "${GITHUB_WORKSPACE}" -name "Firebase*latest.zip" -exec unzip -d "${HOME}"/ios_frameworks/ {} + - - name: Setup quickstart - run: SAMPLE="$SDK" TARGET="${SDK}Example" scripts/setup_quickstart_framework.sh \ - "${HOME}"/ios_frameworks/Firebase/FirebaseStorage/* \ - "${HOME}"/ios_frameworks/Firebase/FirebaseAuth/* \ - "${HOME}"/ios_frameworks/Firebase/FirebaseAnalytics/* - - name: Install Secret GoogleService-Info.plist - run: scripts/decrypt_gha_secret.sh scripts/gha-encrypted/qs-storage.plist.gpg \ - quickstart-ios/storage/GoogleService-Info.plist "$plist_secret" - - name: Test Quickstart - run: ([ -z $plist_secret ] || scripts/third_party/travis/retry.sh scripts/test_quickstart_framework.sh "${SDK}") - - uses: actions/upload-artifact@v4 - if: failure() - with: - name: quickstart_artifacts_storage_${{ matrix.artifact }} - path: | - quickstart-ios/ - !quickstart-ios/**/GoogleService-Info.plist + # quickstart_framework_storage: + # needs: packaging_done + # if: ${{ !cancelled() }} + # env: + # plist_secret: ${{ secrets.GHASecretsGPGPassphrase1 }} + # SDK: "Storage" + # strategy: + # matrix: + # artifact: [Firebase-actions-dir, Firebase-actions-dir-dynamic] + # build-env: + # - os: macos-15 + # xcode: Xcode_16.4 + # runs-on: ${{ matrix.build-env.os }} + # steps: + # - uses: actions/checkout@v4 + # - name: Get framework dir + # uses: actions/download-artifact@v4.1.7 + # with: + # name: ${{ matrix.artifact }} + # run-id: ${{ needs.packaging_done.outputs.run_id }} + # github-token: ${{ secrets.GITHUB_TOKEN }} + # - uses: ruby/setup-ruby@354a1ad156761f5ee2b7b13fa8e09943a5e8d252 # v1 + # - name: Xcode + # run: sudo xcode-select -s /Applications/${{ matrix.build-env.xcode }}.app/Contents/Developer + # - name: Setup Bundler + # run: ./scripts/setup_bundler.sh + # - name: Move frameworks + # run: | + # mkdir -p "${HOME}"/ios_frameworks/ + # find "${GITHUB_WORKSPACE}" -name "Firebase*latest.zip" -exec unzip -d "${HOME}"/ios_frameworks/ {} + + # - name: Setup quickstart + # run: SAMPLE="$SDK" TARGET="${SDK}Example" scripts/setup_quickstart_framework.sh \ + # "${HOME}"/ios_frameworks/Firebase/FirebaseStorage/* \ + # "${HOME}"/ios_frameworks/Firebase/FirebaseAuth/* \ + # "${HOME}"/ios_frameworks/Firebase/FirebaseAnalytics/* + # - name: Install Secret GoogleService-Info.plist + # run: scripts/decrypt_gha_secret.sh scripts/gha-encrypted/qs-storage.plist.gpg \ + # quickstart-ios/storage/GoogleService-Info.plist "$plist_secret" + # - name: Test Quickstart + # run: ([ -z $plist_secret ] || scripts/third_party/travis/retry.sh scripts/test_quickstart_framework.sh "${SDK}") + # - uses: actions/upload-artifact@v4 + # if: failure() + # with: + # name: quickstart_artifacts_storage_${{ matrix.artifact }} + # path: | + # quickstart-ios/ + # !quickstart-ios/**/GoogleService-Info.plist diff --git a/scripts/remove_spm_dependencies.rb b/scripts/remove_spm_dependencies.rb index d755ad917ea..ff229655e0b 100755 --- a/scripts/remove_spm_dependencies.rb +++ b/scripts/remove_spm_dependencies.rb @@ -18,16 +18,22 @@ require 'xcodeproj' require 'set' -# This script removes all Swift Package Manager dependencies from an Xcode project. +# This script removes Swift Package Manager dependencies from an Xcode project. +# It can remove all dependencies or a specified list of dependencies. # It's designed to be used in CI to prepare a project for framework-based testing. # --- Argument Parsing --- -unless ARGV.length == 1 - puts "Usage: #{$0} " +unless ARGV.length >= 1 + puts "Usage: #{$0} [dependency_name_1 dependency_name_2 ...]" + puts "If no dependency names are provided, all SPM dependencies will be removed." exit 1 end project_path = ARGV[0] +# If more than one argument is provided, treat the rest as a list of dependencies to remove. +# Otherwise, deps_to_remove_names will be nil, signaling that all dependencies should be removed. +deps_to_remove_names = ARGV.length > 1 ? ARGV[1..-1].to_set : nil + # --- Main Logic --- begin @@ -40,69 +46,128 @@ puts "Opened project: #{project.path}" # --- Step 1: Find all SPM product dependencies --- -package_product_dependencies = project.objects.select do |obj| +all_package_product_dependencies = project.objects.select do |obj| obj.is_a?(Xcodeproj::Project::Object::XCSwiftPackageProductDependency) end -if package_product_dependencies.empty? - puts "No SPM product dependencies found to remove." +if all_package_product_dependencies.empty? + puts "No SPM product dependencies found in the project." + # Still, try to clean up package references if they exist. + unless project.root_object.package_references.empty? + puts "Removing #{project.root_object.package_references.count} orphaned package reference(s)..." + project.root_object.package_references.clear + project.save + puts "Project saved." + end + exit 0 +end + +# --- Step 2: Determine which dependencies to remove and which to keep --- +dependencies_to_remove = [] +dependencies_to_keep = [] + +if deps_to_remove_names + puts "Attempting to remove specific dependencies: #{deps_to_remove_names.to_a.join(', ')}" + all_package_product_dependencies.each do |dep| + if deps_to_remove_names.include?(dep.product_name) + dependencies_to_remove << dep + else + dependencies_to_keep << dep + end + end + + found_dep_names = dependencies_to_remove.map(&:product_name).to_set + not_found = deps_to_remove_names - found_dep_names + unless not_found.empty? + puts "Warning: The following specified dependencies were not found: #{not_found.to_a.join(', ')}" + end else - puts "Found #{package_product_dependencies.count} SPM product dependencies. Removing all references..." - package_product_dep_uuids = package_product_dependencies.map(&:uuid).to_set - - # --- Step 2: Find all BuildFile objects that reference these SPM products --- - build_files_to_remove = project.objects.select do |obj| - obj.is_a?(Xcodeproj::Project::Object::PBXBuildFile) && - obj.product_ref && - package_product_dep_uuids.include?(obj.product_ref.uuid) + puts "No specific dependencies provided. Removing all #{all_package_product_dependencies.count} SPM dependencies." + dependencies_to_remove = all_package_product_dependencies + # dependencies_to_keep remains empty +end + +if dependencies_to_remove.empty? + puts "No SPM product dependencies to remove." + exit 0 +end + +# --- Step 3: Remove dependencies and their references --- +puts "Found #{dependencies_to_remove.count} SPM product dependencies to remove. Removing all references..." +package_product_dep_uuids = dependencies_to_remove.map(&:uuid).to_set + +# Find all BuildFile objects that reference these SPM products +build_files_to_remove = project.objects.select do |obj| + obj.is_a?(Xcodeproj::Project::Object::PBXBuildFile) && + obj.product_ref && + package_product_dep_uuids.include?(obj.product_ref.uuid) +end +build_file_uuids_to_remove = build_files_to_remove.map(&:uuid).to_set + +# Remove references from all targets +project.targets.each do |target| + puts "Cleaning target '#{target.name}'..." + + # Remove from target dependencies list + removed_deps = target.dependencies.reject! do |dep| + package_product_dep_uuids.include?(dep.uuid) + end + if removed_deps + puts " - Removed #{removed_deps.count} SPM target dependencies." end - build_file_uuids_to_remove = build_files_to_remove.map(&:uuid).to_set - # --- Step 3: Remove references from all targets --- - project.targets.each do |target| - puts "Cleaning target '#{target.name}'..." + # Remove from build phases (e.g., "Link Binary With Libraries") + target.build_phases.each do |phase| + next unless phase.respond_to?(:files) - # Remove from target dependencies list - removed_deps = target.dependencies.reject! do |dep| - package_product_dep_uuids.include?(dep.uuid) + original_file_count = phase.files.count + phase.files.reject! do |build_file| + build_file_uuids_to_remove.include?(build_file.uuid) end - if removed_deps - puts " - Removed #{removed_deps.count} SPM target dependencies." - end - - # Remove from build phases (e.g., "Link Binary With Libraries") - target.build_phases.each do |phase| - next unless phase.respond_to?(:files) - - original_file_count = phase.files.count - phase.files.reject! do |build_file| - build_file_uuids_to_remove.include?(build_file.uuid) - end - removed_count = original_file_count - phase.files.count - if removed_count > 0 - puts " - Removed #{removed_count} SPM build file references from '#{phase.display_name}'." - end + removed_count = original_file_count - phase.files.count + if removed_count > 0 + puts " - Removed #{removed_count} SPM build file references from '#{phase.display_name}'." end end +end - # --- Step 4: Delete the now-orphaned BuildFile and dependency objects --- - puts "Deleting #{build_files_to_remove.count} SPM BuildFile object(s)..." - build_files_to_remove.each(&:remove_from_project) +# Delete the now-orphaned BuildFile and dependency objects +puts "Deleting #{build_files_to_remove.count} SPM BuildFile object(s)..." +build_files_to_remove.each(&:remove_from_project) - puts "Deleting #{package_product_dependencies.count} SPM product dependency object(s)..." - package_product_dependencies.each(&:remove_from_project) -end +puts "Deleting #{dependencies_to_remove.count} SPM product dependency object(s)..." +dependencies_to_remove.each(&:remove_from_project) -# --- Step 5: Remove package references from the project root --- -unless project.root_object.package_references.empty? - puts "Removing #{project.root_object.package_references.count} package reference(s)..." - project.root_object.package_references.clear - puts "All package references removed from the project." + +# --- Step 4: Remove package references from the project root --- +if deps_to_remove_names + # If we are removing a subset of dependencies, only remove package references + # if no other products from that package are being used. + packages_to_keep = dependencies_to_keep.map(&:package).compact.to_set + + original_count = project.root_object.package_references.count + project.root_object.package_references.reject! do |ref| + !packages_to_keep.include?(ref) + end + removed_count = original_count - project.root_object.package_references.count + if removed_count > 0 + puts "Removed #{removed_count} package reference(s) that no longer have products in use." + else + puts "No package references needed to be removed." + end else - puts "No package references found in the project." + # Remove all package references if we are removing all dependencies. + unless project.root_object.package_references.empty? + puts "Removing #{project.root_object.package_references.count} package reference(s)..." + project.root_object.package_references.clear + puts "All package references removed from the project." + else + puts "No package references found in the project." + end end -# --- Step 6: Save the modified project --- + +# --- Step 5: Save the modified project --- begin project.save puts "Project saved successfully." diff --git a/scripts/setup_quickstart_framework.sh b/scripts/setup_quickstart_framework.sh index f79bd0baa18..ca69710a99f 100755 --- a/scripts/setup_quickstart_framework.sh +++ b/scripts/setup_quickstart_framework.sh @@ -24,7 +24,13 @@ git checkout nc/quickstarts # Remove all SPM dependencies from the project. This is necessary to prepare # the project for framework-based testing. -"${REPO}"/scripts/remove_spm_dependencies.rb "${SAMPLE}Example.xcodeproj" +if [[ "${SAMPLE}" == "FirebaseAI" ]]; then + # For the FirebaseAI quickstart, we only want to remove the Firebase deps. + "${REPO}"/scripts/remove_spm_dependencies.rb "${SAMPLE}Example.xcodeproj" FirebaseAI +else + # For other quickstarts, remove all SPM dependencies. + "${REPO}"/scripts/remove_spm_dependencies.rb "${SAMPLE}Example.xcodeproj" +fi if [[ ! -z "$LEGACY" ]]; then cd "Legacy${SAMPLE}Quickstart" diff --git a/scripts/zip_quickstart_test.sh b/scripts/zip_quickstart_test.sh index 1476b2b1985..0a3cc30ec9a 100755 --- a/scripts/zip_quickstart_test.sh +++ b/scripts/zip_quickstart_test.sh @@ -59,7 +59,7 @@ fi xcodebuild \ -project ${PROJECT_NAME} \ -scheme ${SCHEME_NAME} \ --destination "platform=iOS Simulator,name=$device_name" "SWIFT_VERSION=5.3" "OTHER_LDFLAGS=\$(OTHER_LDFLAGS) -ObjC" "FRAMEWORK_SEARCH_PATHS= \$(PROJECT_DIR)/Firebase/" HEADER_SEARCH_PATHS='$(PROJECT_DIR)/Firebase' \ +-destination "platform=iOS Simulator,name=$device_name" "SWIFT_VERSION=5.3" "OTHER_LDFLAGS=\$(OTHER_LDFLAGS) -ObjC" "FRAMEWORK_SEARCH_PATHS= \$(PROJECT_DIR)/Firebase/" HEADER_SEARCH_PATHS='$(inherited) $(PROJECT_DIR)/Firebase' \ build \ ) || EXIT_STATUS=$? From 2f20abe26d5606cbc490127b3540ff1b3f3dac80 Mon Sep 17 00:00:00 2001 From: Nick Cooke Date: Fri, 14 Nov 2025 15:31:17 -0500 Subject: [PATCH 24/29] reverts --- .github/workflows/zip.yml | 964 +++++++++++++++++++------------------- 1 file changed, 482 insertions(+), 482 deletions(-) diff --git a/.github/workflows/zip.yml b/.github/workflows/zip.yml index 5be3fe9aa2d..db5055fb93e 100644 --- a/.github/workflows/zip.yml +++ b/.github/workflows/zip.yml @@ -16,7 +16,7 @@ permissions: env: # When a run_id is specified, build jobs will be skipped and the specified # run's artifacts will be used for testing. - PINNED_RUN_ID: '19348155315' + PINNED_RUN_ID: '' on: pull_request: @@ -46,9 +46,9 @@ on: required: false default: '' -# concurrency: -# group: ${{ github.workflow }}-${{ github.head_ref || github.ref }} -# cancel-in-progress: true +concurrency: + group: ${{ github.workflow }}-${{ github.head_ref || github.ref }} + cancel-in-progress: true jobs: should_package: @@ -169,292 +169,292 @@ jobs: echo "run_id=${{ github.run_id }}" >> $GITHUB_OUTPUT fi - # check_framework_firestore_symbols: - # needs: packaging_done - # if: ${{ !cancelled() }} - # env: - # FIREBASECI_USE_LATEST_GOOGLEAPPMEASUREMENT: 1 - # runs-on: macos-14 - # steps: - # - name: Xcode 16.2 - # run: sudo xcode-select -s /Applications/Xcode_16.2.app/Contents/Developer - # - uses: actions/checkout@v4 - # - name: Get framework dir - # uses: actions/download-artifact@v4.1.7 - # with: - # name: Firebase-actions-dir - # run-id: ${{ needs.packaging_done.outputs.run_id }} - # github-token: ${{ secrets.GITHUB_TOKEN }} - # - uses: ruby/setup-ruby@354a1ad156761f5ee2b7b13fa8e09943a5e8d252 # v1 - # - name: Setup Bundler - # run: ./scripts/setup_bundler.sh - # - name: Install xcpretty - # run: gem install xcpretty - # - name: Move frameworks - # run: | - # mkdir -p "${HOME}"/ios_frameworks/ - # find "${GITHUB_WORKSPACE}" -name "Firebase*latest.zip" -exec unzip -d "${HOME}"/ios_frameworks/ {} + - # - name: Check linked Firestore.xcframework for unlinked symbols. - # run: | - # scripts/check_firestore_symbols.sh \ - # $(pwd) \ - # "${HOME}"/ios_frameworks/Firebase/FirebaseFirestore/FirebaseFirestoreInternal.xcframework + check_framework_firestore_symbols: + needs: packaging_done + if: ${{ !cancelled() }} + env: + FIREBASECI_USE_LATEST_GOOGLEAPPMEASUREMENT: 1 + runs-on: macos-14 + steps: + - name: Xcode 16.2 + run: sudo xcode-select -s /Applications/Xcode_16.2.app/Contents/Developer + - uses: actions/checkout@v4 + - name: Get framework dir + uses: actions/download-artifact@v4.1.7 + with: + name: Firebase-actions-dir + run-id: ${{ needs.packaging_done.outputs.run_id }} + github-token: ${{ secrets.GITHUB_TOKEN }} + - uses: ruby/setup-ruby@354a1ad156761f5ee2b7b13fa8e09943a5e8d252 # v1 + - name: Setup Bundler + run: ./scripts/setup_bundler.sh + - name: Install xcpretty + run: gem install xcpretty + - name: Move frameworks + run: | + mkdir -p "${HOME}"/ios_frameworks/ + find "${GITHUB_WORKSPACE}" -name "Firebase*latest.zip" -exec unzip -d "${HOME}"/ios_frameworks/ {} + + - name: Check linked Firestore.xcframework for unlinked symbols. + run: | + scripts/check_firestore_symbols.sh \ + $(pwd) \ + "${HOME}"/ios_frameworks/Firebase/FirebaseFirestore/FirebaseFirestoreInternal.xcframework - # quickstart_framework_abtesting: - # needs: packaging_done - # if: ${{ !cancelled() }} - # env: - # plist_secret: ${{ secrets.GHASecretsGPGPassphrase1 }} - # SDK: "ABTesting" - # strategy: - # matrix: - # artifact: [Firebase-actions-dir, Firebase-actions-dir-dynamic] - # build-env: - # - os: macos-15 - # xcode: Xcode_16.4 - # runs-on: ${{ matrix.build-env.os }} - # steps: - # - uses: actions/checkout@v4 - # - name: Get framework dir - # uses: actions/download-artifact@v4.1.7 - # with: - # name: ${{ matrix.artifact }} - # run-id: ${{ needs.packaging_done.outputs.run_id }} - # github-token: ${{ secrets.GITHUB_TOKEN }} - # - uses: ruby/setup-ruby@354a1ad156761f5ee2b7b13fa8e09943a5e8d252 # v1 - # - name: Xcode - # run: sudo xcode-select -s /Applications/${{ matrix.build-env.xcode }}.app/Contents/Developer - # - name: Setup Bundler - # run: ./scripts/setup_bundler.sh - # - name: Move frameworks - # run: | - # mkdir -p "${HOME}"/ios_frameworks/ - # find "${GITHUB_WORKSPACE}" -name "Firebase*latest.zip" -exec unzip -d "${HOME}"/ios_frameworks/ {} + - # - name: Setup quickstart - # run: SAMPLE="$SDK" TARGET="${SDK}Example" scripts/setup_quickstart_framework.sh \ - # "${HOME}"/ios_frameworks/Firebase/FirebaseRemoteConfig/* \ - # "${HOME}"/ios_frameworks/Firebase/FirebaseAnalytics/FirebaseCore.xcframework \ - # "${HOME}"/ios_frameworks/Firebase/FirebaseAnalytics/FirebaseCoreInternal.xcframework \ - # "${HOME}"/ios_frameworks/Firebase/FirebaseAnalytics/FBLPromises.xcframework \ - # "${HOME}"/ios_frameworks/Firebase/FirebaseAnalytics/FirebaseInstallations.xcframework \ - # "${HOME}"/ios_frameworks/Firebase/FirebaseAnalytics/GoogleUtilities.xcframework - # - 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 Quickstart - # run: ([ -z $plist_secret ] || scripts/third_party/travis/retry.sh scripts/test_quickstart_framework.sh "${SDK}") - # - uses: actions/upload-artifact@v4 - # if: failure() - # with: - # name: quickstart_artifacts_abtesting_${{ matrix.artifact }} - # path: | - # quickstart-ios/ - # !quickstart-ios/**/GoogleService-Info.plist + quickstart_framework_abtesting: + needs: packaging_done + if: ${{ !cancelled() }} + env: + plist_secret: ${{ secrets.GHASecretsGPGPassphrase1 }} + SDK: "ABTesting" + strategy: + matrix: + artifact: [Firebase-actions-dir, Firebase-actions-dir-dynamic] + build-env: + - os: macos-15 + xcode: Xcode_16.4 + runs-on: ${{ matrix.build-env.os }} + steps: + - uses: actions/checkout@v4 + - name: Get framework dir + uses: actions/download-artifact@v4.1.7 + with: + name: ${{ matrix.artifact }} + run-id: ${{ needs.packaging_done.outputs.run_id }} + github-token: ${{ secrets.GITHUB_TOKEN }} + - uses: ruby/setup-ruby@354a1ad156761f5ee2b7b13fa8e09943a5e8d252 # v1 + - name: Xcode + run: sudo xcode-select -s /Applications/${{ matrix.build-env.xcode }}.app/Contents/Developer + - name: Setup Bundler + run: ./scripts/setup_bundler.sh + - name: Move frameworks + run: | + mkdir -p "${HOME}"/ios_frameworks/ + find "${GITHUB_WORKSPACE}" -name "Firebase*latest.zip" -exec unzip -d "${HOME}"/ios_frameworks/ {} + + - name: Setup quickstart + run: SAMPLE="$SDK" TARGET="${SDK}Example" scripts/setup_quickstart_framework.sh \ + "${HOME}"/ios_frameworks/Firebase/FirebaseRemoteConfig/* \ + "${HOME}"/ios_frameworks/Firebase/FirebaseAnalytics/FirebaseCore.xcframework \ + "${HOME}"/ios_frameworks/Firebase/FirebaseAnalytics/FirebaseCoreInternal.xcframework \ + "${HOME}"/ios_frameworks/Firebase/FirebaseAnalytics/FBLPromises.xcframework \ + "${HOME}"/ios_frameworks/Firebase/FirebaseAnalytics/FirebaseInstallations.xcframework \ + "${HOME}"/ios_frameworks/Firebase/FirebaseAnalytics/GoogleUtilities.xcframework + - 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 Quickstart + run: ([ -z $plist_secret ] || scripts/third_party/travis/retry.sh scripts/test_quickstart_framework.sh "${SDK}") + - uses: actions/upload-artifact@v4 + if: failure() + with: + name: quickstart_artifacts_abtesting_${{ matrix.artifact }} + path: | + quickstart-ios/ + !quickstart-ios/**/GoogleService-Info.plist - # quickstart_framework_auth: - # needs: packaging_done - # if: ${{ !cancelled() }} - # env: - # plist_secret: ${{ secrets.GHASecretsGPGPassphrase1 }} - # SDK: "Authentication" - # strategy: - # matrix: - # os: [macos-15] - # artifact: [Firebase-actions-dir, Firebase-actions-dir-dynamic] - # include: - # - os: macos-15 - # xcode: Xcode_16.4 - # runs-on: ${{ matrix.os }} - # steps: - # - uses: actions/checkout@v4 - # - name: Get framework dir - # uses: actions/download-artifact@v4.1.7 - # with: - # name: ${{ matrix.artifact }} - # run-id: ${{ needs.packaging_done.outputs.run_id }} - # github-token: ${{ secrets.GITHUB_TOKEN }} - # - uses: ruby/setup-ruby@354a1ad156761f5ee2b7b13fa8e09943a5e8d252 # v1 - # - name: Xcode - # run: sudo xcode-select -s /Applications/${{ matrix.xcode }}.app/Contents/Developer - # - name: Setup Bundler - # run: ./scripts/setup_bundler.sh - # - name: Move frameworks - # run: | - # mkdir -p "${HOME}"/ios_frameworks/ - # find "${GITHUB_WORKSPACE}" -name "Firebase*latest.zip" -exec unzip -d "${HOME}"/ios_frameworks/ {} + - # - name: Setup Swift Quickstart - # run: SAMPLE="$SDK" TARGET="${SDK}Example" NON_FIREBASE_SDKS="FBSDKLoginKit FBSDKCoreKit FBSDKCoreKit_Basics FBAEMKit" scripts/setup_quickstart_framework.sh \ - # "${HOME}"/ios_frameworks/Firebase/NonFirebaseSDKs/* \ - # "${HOME}"/ios_frameworks/Firebase/GoogleSignIn/* \ - # "${HOME}"/ios_frameworks/Firebase/FirebaseAuth/* \ - # "${HOME}"/ios_frameworks/Firebase/FirebaseAnalytics/* - # - name: Install Secret GoogleService-Info.plist - # run: scripts/decrypt_gha_secret.sh scripts/gha-encrypted/qs-authentication.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_framework.sh "${SDK}") - # - uses: actions/upload-artifact@v4 - # if: failure() - # with: - # name: quickstart_artifacts_auth_${{ matrix.artifact }} - # path: | - # quickstart-ios/ - # !quickstart-ios/**/GoogleService-Info.plist + quickstart_framework_auth: + needs: packaging_done + if: ${{ !cancelled() }} + env: + plist_secret: ${{ secrets.GHASecretsGPGPassphrase1 }} + SDK: "Authentication" + strategy: + matrix: + os: [macos-15] + artifact: [Firebase-actions-dir, Firebase-actions-dir-dynamic] + include: + - os: macos-15 + xcode: Xcode_16.4 + runs-on: ${{ matrix.os }} + steps: + - uses: actions/checkout@v4 + - name: Get framework dir + uses: actions/download-artifact@v4.1.7 + with: + name: ${{ matrix.artifact }} + run-id: ${{ needs.packaging_done.outputs.run_id }} + github-token: ${{ secrets.GITHUB_TOKEN }} + - uses: ruby/setup-ruby@354a1ad156761f5ee2b7b13fa8e09943a5e8d252 # v1 + - name: Xcode + run: sudo xcode-select -s /Applications/${{ matrix.xcode }}.app/Contents/Developer + - name: Setup Bundler + run: ./scripts/setup_bundler.sh + - name: Move frameworks + run: | + mkdir -p "${HOME}"/ios_frameworks/ + find "${GITHUB_WORKSPACE}" -name "Firebase*latest.zip" -exec unzip -d "${HOME}"/ios_frameworks/ {} + + - name: Setup Swift Quickstart + run: SAMPLE="$SDK" TARGET="${SDK}Example" NON_FIREBASE_SDKS="FBSDKLoginKit FBSDKCoreKit FBSDKCoreKit_Basics FBAEMKit" scripts/setup_quickstart_framework.sh \ + "${HOME}"/ios_frameworks/Firebase/NonFirebaseSDKs/* \ + "${HOME}"/ios_frameworks/Firebase/GoogleSignIn/* \ + "${HOME}"/ios_frameworks/Firebase/FirebaseAuth/* \ + "${HOME}"/ios_frameworks/Firebase/FirebaseAnalytics/* + - name: Install Secret GoogleService-Info.plist + run: scripts/decrypt_gha_secret.sh scripts/gha-encrypted/qs-authentication.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_framework.sh "${SDK}") + - uses: actions/upload-artifact@v4 + if: failure() + with: + name: quickstart_artifacts_auth_${{ matrix.artifact }} + path: | + quickstart-ios/ + !quickstart-ios/**/GoogleService-Info.plist - # quickstart_framework_config: - # needs: packaging_done - # if: ${{ !cancelled() }} - # env: - # plist_secret: ${{ secrets.GHASecretsGPGPassphrase1 }} - # SDK: "Config" - # strategy: - # matrix: - # artifact: [Firebase-actions-dir, Firebase-actions-dir-dynamic] - # build-env: - # - os: macos-15 - # xcode: Xcode_16.4 - # runs-on: ${{ matrix.build-env.os }} - # steps: - # - uses: actions/checkout@v4 - # - name: Get framework dir - # uses: actions/download-artifact@v4.1.7 - # with: - # name: ${{ matrix.artifact }} - # run-id: ${{ needs.packaging_done.outputs.run_id }} - # github-token: ${{ secrets.GITHUB_TOKEN }} - # - uses: ruby/setup-ruby@354a1ad156761f5ee2b7b13fa8e09943a5e8d252 # v1 - # - name: Xcode - # run: sudo xcode-select -s /Applications/${{ matrix.build-env.xcode }}.app/Contents/Developer - # - name: Setup Bundler - # run: ./scripts/setup_bundler.sh - # - name: Move frameworks - # run: | - # mkdir -p "${HOME}"/ios_frameworks/ - # find "${GITHUB_WORKSPACE}" -name "Firebase*latest.zip" -exec unzip -d "${HOME}"/ios_frameworks/ {} + - # - name: Setup Swift Quickstart + quickstart_framework_config: + needs: packaging_done + if: ${{ !cancelled() }} + env: + plist_secret: ${{ secrets.GHASecretsGPGPassphrase1 }} + SDK: "Config" + strategy: + matrix: + artifact: [Firebase-actions-dir, Firebase-actions-dir-dynamic] + build-env: + - os: macos-15 + xcode: Xcode_16.4 + runs-on: ${{ matrix.build-env.os }} + steps: + - uses: actions/checkout@v4 + - name: Get framework dir + uses: actions/download-artifact@v4.1.7 + with: + name: ${{ matrix.artifact }} + run-id: ${{ needs.packaging_done.outputs.run_id }} + github-token: ${{ secrets.GITHUB_TOKEN }} + - uses: ruby/setup-ruby@354a1ad156761f5ee2b7b13fa8e09943a5e8d252 # v1 + - name: Xcode + run: sudo xcode-select -s /Applications/${{ matrix.build-env.xcode }}.app/Contents/Developer + - name: Setup Bundler + run: ./scripts/setup_bundler.sh + - name: Move frameworks + run: | + mkdir -p "${HOME}"/ios_frameworks/ + find "${GITHUB_WORKSPACE}" -name "Firebase*latest.zip" -exec unzip -d "${HOME}"/ios_frameworks/ {} + + - name: Setup Swift Quickstart - # run: SAMPLE="$SDK" TARGET="${SDK}Example" scripts/setup_quickstart_framework.sh \ - # "${HOME}"/ios_frameworks/Firebase/FirebaseRemoteConfig/* \ - # "${HOME}"/ios_frameworks/Firebase/FirebaseAnalytics/* - # - name: Install Secret GoogleService-Info.plist - # run: scripts/decrypt_gha_secret.sh scripts/gha-encrypted/qs-config.plist.gpg \ - # quickstart-ios/config/GoogleService-Info.plist "$plist_secret" - # - name: Test Swift Quickstart - # run: ([ -z $plist_secret ] || scripts/third_party/travis/retry.sh scripts/test_quickstart_framework.sh "${SDK}") - # - uses: actions/upload-artifact@v4 - # if: failure() - # with: - # name: quickstart_artifacts_config_${{ matrix.artifact }} - # path: | - # quickstart-ios/ - # !quickstart-ios/**/GoogleService-Info.plist + run: SAMPLE="$SDK" TARGET="${SDK}Example" scripts/setup_quickstart_framework.sh \ + "${HOME}"/ios_frameworks/Firebase/FirebaseRemoteConfig/* \ + "${HOME}"/ios_frameworks/Firebase/FirebaseAnalytics/* + - name: Install Secret GoogleService-Info.plist + run: scripts/decrypt_gha_secret.sh scripts/gha-encrypted/qs-config.plist.gpg \ + quickstart-ios/config/GoogleService-Info.plist "$plist_secret" + - name: Test Swift Quickstart + run: ([ -z $plist_secret ] || scripts/third_party/travis/retry.sh scripts/test_quickstart_framework.sh "${SDK}") + - uses: actions/upload-artifact@v4 + if: failure() + with: + name: quickstart_artifacts_config_${{ matrix.artifact }} + path: | + quickstart-ios/ + !quickstart-ios/**/GoogleService-Info.plist - # quickstart_framework_crashlytics: - # needs: packaging_done - # if: ${{ !cancelled() }} - # env: - # plist_secret: ${{ secrets.GHASecretsGPGPassphrase1 }} - # SDK: "Crashlytics" - # strategy: - # matrix: - # artifact: [Firebase-actions-dir, Firebase-actions-dir-dynamic] - # build-env: - # - os: macos-15 - # xcode: Xcode_16.4 - # runs-on: ${{ matrix.build-env.os }} - # steps: - # - uses: actions/checkout@v4 - # - name: Get framework dir - # uses: actions/download-artifact@v4.1.7 - # with: - # name: ${{ matrix.artifact }} - # run-id: ${{ needs.packaging_done.outputs.run_id }} - # github-token: ${{ secrets.GITHUB_TOKEN }} - # - uses: ruby/setup-ruby@354a1ad156761f5ee2b7b13fa8e09943a5e8d252 # v1 - # - name: Xcode - # run: sudo xcode-select -s /Applications/${{ matrix.build-env.xcode }}.app/Contents/Developer - # - name: Setup Bundler - # run: ./scripts/setup_bundler.sh - # - name: Move frameworks - # run: | - # mkdir -p "${HOME}"/ios_frameworks/ - # find "${GITHUB_WORKSPACE}" -name "Firebase*latest.zip" -exec unzip -d "${HOME}"/ios_frameworks/ {} + - # - name: Setup quickstart - # run: | - # rm -rf "${HOME}"/ios_frameworks/Firebase/FirebaseAnalytics/FirebaseAnalytics* - # rm -rf "${HOME}"/ios_frameworks/Firebase/FirebaseAnalytics/GoogleAppMeasurement* - # rm -rf "${HOME}"/ios_frameworks/Firebase/FirebaseAnalytics/GoogleAds* - # SAMPLE="$SDK" TARGET="${SDK}Example" scripts/setup_quickstart_framework.sh \ - # "${HOME}"/ios_frameworks/Firebase/FirebaseCrashlytics/* \ - # "${HOME}"/ios_frameworks/Firebase/FirebaseAnalytics/* - # - name: Add frameworks to Crashlytics watchOS target - # run: | - # cd quickstart-ios/crashlytics - # "${GITHUB_WORKSPACE}"/quickstart-ios/scripts/add_framework_script.rb --sdk "Crashlytics" --target "CrashlyticsExample_(watchOS)_Extension" --framework_path Firebase/ - # - name: Patch Crashlytics Run Script Path - # run: scripts/patch_crashlytics_run_path.rb - # - 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 Quickstart - # run: ([ -z $plist_secret ] || scripts/third_party/travis/retry.sh scripts/test_quickstart_framework.sh "${SDK}") - # - uses: actions/upload-artifact@v4 - # if: failure() - # with: - # name: quickstart_artifacts_crashlytics_${{ matrix.artifact }} - # path: | - # quickstart-ios/ - # !quickstart-ios/**/GoogleService-Info.plist + quickstart_framework_crashlytics: + needs: packaging_done + if: ${{ !cancelled() }} + env: + plist_secret: ${{ secrets.GHASecretsGPGPassphrase1 }} + SDK: "Crashlytics" + strategy: + matrix: + artifact: [Firebase-actions-dir, Firebase-actions-dir-dynamic] + build-env: + - os: macos-15 + xcode: Xcode_16.4 + runs-on: ${{ matrix.build-env.os }} + steps: + - uses: actions/checkout@v4 + - name: Get framework dir + uses: actions/download-artifact@v4.1.7 + with: + name: ${{ matrix.artifact }} + run-id: ${{ needs.packaging_done.outputs.run_id }} + github-token: ${{ secrets.GITHUB_TOKEN }} + - uses: ruby/setup-ruby@354a1ad156761f5ee2b7b13fa8e09943a5e8d252 # v1 + - name: Xcode + run: sudo xcode-select -s /Applications/${{ matrix.build-env.xcode }}.app/Contents/Developer + - name: Setup Bundler + run: ./scripts/setup_bundler.sh + - name: Move frameworks + run: | + mkdir -p "${HOME}"/ios_frameworks/ + find "${GITHUB_WORKSPACE}" -name "Firebase*latest.zip" -exec unzip -d "${HOME}"/ios_frameworks/ {} + + - name: Setup quickstart + run: | + rm -rf "${HOME}"/ios_frameworks/Firebase/FirebaseAnalytics/FirebaseAnalytics* + rm -rf "${HOME}"/ios_frameworks/Firebase/FirebaseAnalytics/GoogleAppMeasurement* + rm -rf "${HOME}"/ios_frameworks/Firebase/FirebaseAnalytics/GoogleAds* + SAMPLE="$SDK" TARGET="${SDK}Example" scripts/setup_quickstart_framework.sh \ + "${HOME}"/ios_frameworks/Firebase/FirebaseCrashlytics/* \ + "${HOME}"/ios_frameworks/Firebase/FirebaseAnalytics/* + - name: Add frameworks to Crashlytics watchOS target + run: | + cd quickstart-ios/crashlytics + "${GITHUB_WORKSPACE}"/quickstart-ios/scripts/add_framework_script.rb --sdk "Crashlytics" --target "CrashlyticsExample_(watchOS)_Extension" --framework_path Firebase/ + - name: Patch Crashlytics Run Script Path + run: scripts/patch_crashlytics_run_path.rb + - 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 Quickstart + run: ([ -z $plist_secret ] || scripts/third_party/travis/retry.sh scripts/test_quickstart_framework.sh "${SDK}") + - uses: actions/upload-artifact@v4 + if: failure() + with: + name: quickstart_artifacts_crashlytics_${{ matrix.artifact }} + path: | + quickstart-ios/ + !quickstart-ios/**/GoogleService-Info.plist - # quickstart_framework_database: - # needs: packaging_done - # if: ${{ !cancelled() }} - # env: - # plist_secret: ${{ secrets.GHASecretsGPGPassphrase1 }} - # SDK: "Database" - # strategy: - # matrix: - # os: [macos-14] - # xcode: [Xcode_16.2] - # artifact: [Firebase-actions-dir, Firebase-actions-dir-dynamic] - # runs-on: ${{ matrix.os }} - # steps: - # - uses: actions/checkout@v4 - # - name: Get framework dir - # uses: actions/download-artifact@v4.1.7 - # with: - # name: ${{ matrix.artifact }} - # run-id: ${{ needs.packaging_done.outputs.run_id }} - # github-token: ${{ secrets.GITHUB_TOKEN }} - # - uses: ruby/setup-ruby@354a1ad156761f5ee2b7b13fa8e09943a5e8d252 # v1 - # - name: Xcode - # run: sudo xcode-select -s /Applications/${{ matrix.xcode }}.app/Contents/Developer - # - name: Setup Bundler - # run: ./scripts/setup_bundler.sh - # - name: Move frameworks - # run: | - # mkdir -p "${HOME}"/ios_frameworks/ - # find "${GITHUB_WORKSPACE}" -name "Firebase*latest.zip" -exec unzip -d "${HOME}"/ios_frameworks/ {} + - # - name: Setup quickstart - # run: SAMPLE="$SDK" TARGET="${SDK}Example" NON_FIREBASE_SDKS="FirebaseDatabaseUI" scripts/setup_quickstart_framework.sh \ - # "${HOME}"/ios_frameworks/Firebase/FirebaseDatabase/* \ - # "${HOME}"/ios_frameworks/Firebase/FirebaseStorage/* \ - # "${HOME}"/ios_frameworks/Firebase/FirebaseFirestore/* \ - # "${HOME}"/ios_frameworks/Firebase/FirebaseAuth/* \ - # "${HOME}"/ios_frameworks/Firebase/NonFirebaseSDKs/* \ - # "${HOME}"/ios_frameworks/Firebase/FirebaseAnalytics/* - # - 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: Test Quickstart - # run: ([ -z $plist_secret ] || scripts/third_party/travis/retry.sh scripts/test_quickstart_framework.sh "${SDK}") - # - uses: actions/upload-artifact@v4 - # if: failure() - # with: - # name: quickstart_artifacts_database_${{ matrix.artifact }} - # path: | - # quickstart-ios/ - # !quickstart-ios/**/GoogleService-Info.plist + quickstart_framework_database: + needs: packaging_done + if: ${{ !cancelled() }} + env: + plist_secret: ${{ secrets.GHASecretsGPGPassphrase1 }} + SDK: "Database" + strategy: + matrix: + os: [macos-14] + xcode: [Xcode_16.2] + artifact: [Firebase-actions-dir, Firebase-actions-dir-dynamic] + runs-on: ${{ matrix.os }} + steps: + - uses: actions/checkout@v4 + - name: Get framework dir + uses: actions/download-artifact@v4.1.7 + with: + name: ${{ matrix.artifact }} + run-id: ${{ needs.packaging_done.outputs.run_id }} + github-token: ${{ secrets.GITHUB_TOKEN }} + - uses: ruby/setup-ruby@354a1ad156761f5ee2b7b13fa8e09943a5e8d252 # v1 + - name: Xcode + run: sudo xcode-select -s /Applications/${{ matrix.xcode }}.app/Contents/Developer + - name: Setup Bundler + run: ./scripts/setup_bundler.sh + - name: Move frameworks + run: | + mkdir -p "${HOME}"/ios_frameworks/ + find "${GITHUB_WORKSPACE}" -name "Firebase*latest.zip" -exec unzip -d "${HOME}"/ios_frameworks/ {} + + - name: Setup quickstart + run: SAMPLE="$SDK" TARGET="${SDK}Example" NON_FIREBASE_SDKS="FirebaseDatabaseUI" scripts/setup_quickstart_framework.sh \ + "${HOME}"/ios_frameworks/Firebase/FirebaseDatabase/* \ + "${HOME}"/ios_frameworks/Firebase/FirebaseStorage/* \ + "${HOME}"/ios_frameworks/Firebase/FirebaseFirestore/* \ + "${HOME}"/ios_frameworks/Firebase/FirebaseAuth/* \ + "${HOME}"/ios_frameworks/Firebase/NonFirebaseSDKs/* \ + "${HOME}"/ios_frameworks/Firebase/FirebaseAnalytics/* + - 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: Test Quickstart + run: ([ -z $plist_secret ] || scripts/third_party/travis/retry.sh scripts/test_quickstart_framework.sh "${SDK}") + - uses: actions/upload-artifact@v4 + if: failure() + with: + name: quickstart_artifacts_database_${{ matrix.artifact }} + path: | + quickstart-ios/ + !quickstart-ios/**/GoogleService-Info.plist quickstart_framework_firebaseai: needs: packaging_done @@ -509,204 +509,204 @@ jobs: quickstart-ios/ !quickstart-ios/**/GoogleService-Info.plist - # quickstart_framework_firestore: - # needs: packaging_done - # if: ${{ !cancelled() }} - # env: - # plist_secret: ${{ secrets.GHASecretsGPGPassphrase1 }} - # SDK: "Firestore" - # strategy: - # matrix: - # artifact: [Firebase-actions-dir, Firebase-actions-dir-dynamic] - # build-env: - # - os: macos-15 - # xcode: Xcode_16.4 - # runs-on: ${{ matrix.build-env.os }} - # steps: - # - uses: actions/checkout@v4 - # - name: Get framework dir - # uses: actions/download-artifact@v4.1.7 - # with: - # name: ${{ matrix.artifact }} - # run-id: ${{ needs.packaging_done.outputs.run_id }} - # github-token: ${{ secrets.GITHUB_TOKEN }} - # - uses: ruby/setup-ruby@354a1ad156761f5ee2b7b13fa8e09943a5e8d252 # v1 - # - name: Xcode - # run: sudo xcode-select -s /Applications/${{ matrix.build-env.xcode }}.app/Contents/Developer - # - name: Setup Bundler - # run: ./scripts/setup_bundler.sh - # - name: Move frameworks - # run: | - # mkdir -p "${HOME}"/ios_frameworks/ - # find "${GITHUB_WORKSPACE}" -name "Firebase*latest.zip" -exec unzip -d "${HOME}"/ios_frameworks/ {} + - # - name: Setup quickstart - # run: SAMPLE="$SDK" TARGET="${SDK}Example" NON_FIREBASE_SDKS="SDWebImage FirebaseAuthUI FirebaseEmailAuthUI" scripts/setup_quickstart_framework.sh \ - # "${HOME}"/ios_frameworks/Firebase/NonFirebaseSDKs/* \ - # "${HOME}"/ios_frameworks/Firebase/FirebaseFirestore/* \ - # "${HOME}"/ios_frameworks/Firebase/FirebaseAuth/* \ - # "${HOME}"/ios_frameworks/Firebase/FirebaseAnalytics/* - # - name: Upload build logs on failure - # if: failure() - # uses: actions/upload-artifact@v4 - # with: - # name: build_logs_firestore_${{ matrix.artifact }}_${{ matrix.build-env.os }} - # path: sdk_zip/build_logs/ - # - 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 Quickstart - # run: ([ -z $plist_secret ] || scripts/third_party/travis/retry.sh scripts/test_quickstart_framework.sh "${SDK}") - # - name: Remove data before upload and zip directory to reduce upload size. - # if: always() - # run: scripts/remove_data.sh firestore; zip -r --symlinks quickstart_artifacts_firestore.zip quickstart-ios/ - # - uses: actions/upload-artifact@v4 - # if: failure() - # with: - # name: quickstart_artifacts_firestore_${{ matrix.artifact }}_${{ matrix.build-env.os }} - # path: quickstart_artifacts_firestore.zip + quickstart_framework_firestore: + needs: packaging_done + if: ${{ !cancelled() }} + env: + plist_secret: ${{ secrets.GHASecretsGPGPassphrase1 }} + SDK: "Firestore" + strategy: + matrix: + artifact: [Firebase-actions-dir, Firebase-actions-dir-dynamic] + build-env: + - os: macos-15 + xcode: Xcode_16.4 + runs-on: ${{ matrix.build-env.os }} + steps: + - uses: actions/checkout@v4 + - name: Get framework dir + uses: actions/download-artifact@v4.1.7 + with: + name: ${{ matrix.artifact }} + run-id: ${{ needs.packaging_done.outputs.run_id }} + github-token: ${{ secrets.GITHUB_TOKEN }} + - uses: ruby/setup-ruby@354a1ad156761f5ee2b7b13fa8e09943a5e8d252 # v1 + - name: Xcode + run: sudo xcode-select -s /Applications/${{ matrix.build-env.xcode }}.app/Contents/Developer + - name: Setup Bundler + run: ./scripts/setup_bundler.sh + - name: Move frameworks + run: | + mkdir -p "${HOME}"/ios_frameworks/ + find "${GITHUB_WORKSPACE}" -name "Firebase*latest.zip" -exec unzip -d "${HOME}"/ios_frameworks/ {} + + - name: Setup quickstart + run: SAMPLE="$SDK" TARGET="${SDK}Example" NON_FIREBASE_SDKS="SDWebImage FirebaseAuthUI FirebaseEmailAuthUI" scripts/setup_quickstart_framework.sh \ + "${HOME}"/ios_frameworks/Firebase/NonFirebaseSDKs/* \ + "${HOME}"/ios_frameworks/Firebase/FirebaseFirestore/* \ + "${HOME}"/ios_frameworks/Firebase/FirebaseAuth/* \ + "${HOME}"/ios_frameworks/Firebase/FirebaseAnalytics/* + - name: Upload build logs on failure + if: failure() + uses: actions/upload-artifact@v4 + with: + name: build_logs_firestore_${{ matrix.artifact }}_${{ matrix.build-env.os }} + path: sdk_zip/build_logs/ + - 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 Quickstart + run: ([ -z $plist_secret ] || scripts/third_party/travis/retry.sh scripts/test_quickstart_framework.sh "${SDK}") + - name: Remove data before upload and zip directory to reduce upload size. + if: always() + run: scripts/remove_data.sh firestore; zip -r --symlinks quickstart_artifacts_firestore.zip quickstart-ios/ + - uses: actions/upload-artifact@v4 + if: failure() + with: + name: quickstart_artifacts_firestore_${{ matrix.artifact }}_${{ matrix.build-env.os }} + path: quickstart_artifacts_firestore.zip - # quickstart_framework_inappmessaging: - # needs: packaging_done - # if: ${{ !cancelled() }} - # env: - # plist_secret: ${{ secrets.GHASecretsGPGPassphrase1 }} - # SDK: "InAppMessaging" - # strategy: - # matrix: - # artifact: [Firebase-actions-dir, Firebase-actions-dir-dynamic] - # build-env: - # - os: macos-15 - # xcode: Xcode_16.4 - # runs-on: ${{ matrix.build-env.os }} - # steps: - # - uses: actions/checkout@v4 - # - name: Get framework dir - # uses: actions/download-artifact@v4.1.7 - # with: - # name: ${{ matrix.artifact }} - # run-id: ${{ needs.packaging_done.outputs.run_id }} - # github-token: ${{ secrets.GITHUB_TOKEN }} - # - uses: ruby/setup-ruby@354a1ad156761f5ee2b7b13fa8e09943a5e8d252 # v1 - # - name: Xcode - # run: sudo xcode-select -s /Applications/${{ matrix.build-env.xcode }}.app/Contents/Developer - # - name: Setup Bundler - # run: ./scripts/setup_bundler.sh - # - name: Move frameworks - # run: | - # mkdir -p "${HOME}"/ios_frameworks/ - # find "${GITHUB_WORKSPACE}" -name "Firebase*latest.zip" -exec unzip -d "${HOME}"/ios_frameworks/ {} + - # - name: Setup quickstart - # run: SAMPLE="$SDK" TARGET="${SDK}Example" scripts/setup_quickstart_framework.sh \ - # "${HOME}"/ios_frameworks/Firebase/FirebaseInAppMessaging/* \ - # "${HOME}"/ios_frameworks/Firebase/FirebaseAnalytics/* - # - name: Install Secret GoogleService-Info.plist - # run: scripts/decrypt_gha_secret.sh scripts/gha-encrypted/qs-inappmessaging.plist.gpg \ - # quickstart-ios/inappmessaging/GoogleService-Info.plist "$plist_secret" - # - name: Test Swift Quickstart - # run: ([ -z $plist_secret ] || scripts/third_party/travis/retry.sh scripts/test_quickstart_framework.sh "${SDK}") - # - uses: actions/upload-artifact@v4 - # if: failure() - # with: - # name: quickstart_artifacts_inappmessaging_${{ matrix.artifact }} - # path: | - # quickstart-ios/ - # !quickstart-ios/**/GoogleService-Info.plist + quickstart_framework_inappmessaging: + needs: packaging_done + if: ${{ !cancelled() }} + env: + plist_secret: ${{ secrets.GHASecretsGPGPassphrase1 }} + SDK: "InAppMessaging" + strategy: + matrix: + artifact: [Firebase-actions-dir, Firebase-actions-dir-dynamic] + build-env: + - os: macos-15 + xcode: Xcode_16.4 + runs-on: ${{ matrix.build-env.os }} + steps: + - uses: actions/checkout@v4 + - name: Get framework dir + uses: actions/download-artifact@v4.1.7 + with: + name: ${{ matrix.artifact }} + run-id: ${{ needs.packaging_done.outputs.run_id }} + github-token: ${{ secrets.GITHUB_TOKEN }} + - uses: ruby/setup-ruby@354a1ad156761f5ee2b7b13fa8e09943a5e8d252 # v1 + - name: Xcode + run: sudo xcode-select -s /Applications/${{ matrix.build-env.xcode }}.app/Contents/Developer + - name: Setup Bundler + run: ./scripts/setup_bundler.sh + - name: Move frameworks + run: | + mkdir -p "${HOME}"/ios_frameworks/ + find "${GITHUB_WORKSPACE}" -name "Firebase*latest.zip" -exec unzip -d "${HOME}"/ios_frameworks/ {} + + - name: Setup quickstart + run: SAMPLE="$SDK" TARGET="${SDK}Example" scripts/setup_quickstart_framework.sh \ + "${HOME}"/ios_frameworks/Firebase/FirebaseInAppMessaging/* \ + "${HOME}"/ios_frameworks/Firebase/FirebaseAnalytics/* + - name: Install Secret GoogleService-Info.plist + run: scripts/decrypt_gha_secret.sh scripts/gha-encrypted/qs-inappmessaging.plist.gpg \ + quickstart-ios/inappmessaging/GoogleService-Info.plist "$plist_secret" + - name: Test Swift Quickstart + run: ([ -z $plist_secret ] || scripts/third_party/travis/retry.sh scripts/test_quickstart_framework.sh "${SDK}") + - uses: actions/upload-artifact@v4 + if: failure() + with: + name: quickstart_artifacts_inappmessaging_${{ matrix.artifact }} + path: | + quickstart-ios/ + !quickstart-ios/**/GoogleService-Info.plist - # quickstart_framework_messaging: - # needs: packaging_done - # if: ${{ !cancelled() }} - # env: - # plist_secret: ${{ secrets.GHASecretsGPGPassphrase1 }} - # SDK: "Messaging" - # strategy: - # matrix: - # artifact: [Firebase-actions-dir, Firebase-actions-dir-dynamic] - # build-env: - # - os: macos-15 - # xcode: Xcode_16.4 - # runs-on: ${{ matrix.build-env.os }} - # steps: - # - uses: actions/checkout@v4 - # - name: Get framework dir - # uses: actions/download-artifact@v4.1.7 - # with: - # name: ${{ matrix.artifact }} - # run-id: ${{ needs.packaging_done.outputs.run_id }} - # github-token: ${{ secrets.GITHUB_TOKEN }} - # - uses: ruby/setup-ruby@354a1ad156761f5ee2b7b13fa8e09943a5e8d252 # v1 - # - name: Xcode - # run: sudo xcode-select -s /Applications/${{ matrix.build-env.xcode }}.app/Contents/Developer - # - name: Setup Bundler - # run: ./scripts/setup_bundler.sh - # - name: Move frameworks - # run: | - # mkdir -p "${HOME}"/ios_frameworks/ - # find "${GITHUB_WORKSPACE}" -name "Firebase*latest.zip" -exec unzip -d "${HOME}"/ios_frameworks/ {} + - # - name: Setup quickstart - # run: SAMPLE="$SDK" TARGET="${SDK}Example" scripts/setup_quickstart_framework.sh \ - # "${HOME}"/ios_frameworks/Firebase/FirebaseMessaging/* \ - # "${HOME}"/ios_frameworks/Firebase/FirebaseAnalytics/* - # - name: Add frameworks to notification extension target - # run: | - # cd quickstart-ios/messaging - # "${GITHUB_WORKSPACE}"/quickstart-ios/scripts/add_framework_script.rb --sdk "Messaging" --target "NotificationServiceExtension" --framework_path Firebase/ - # - name: Install Secret GoogleService-Info.plist - # run: scripts/decrypt_gha_secret.sh scripts/gha-encrypted/qs-messaging.plist.gpg \ - # quickstart-ios/messaging/GoogleService-Info.plist "$plist_secret" - # - name: Test Quickstart - # run: ([ -z $plist_secret ] || scripts/third_party/travis/retry.sh scripts/test_quickstart_framework.sh "${SDK}") - # - uses: actions/upload-artifact@v4 - # if: failure() - # with: - # name: quickstart_artifacts_messaging_${{ matrix.artifact }} - # path: | - # quickstart-ios/ - # !quickstart-ios/**/GoogleService-Info.plist + quickstart_framework_messaging: + needs: packaging_done + if: ${{ !cancelled() }} + env: + plist_secret: ${{ secrets.GHASecretsGPGPassphrase1 }} + SDK: "Messaging" + strategy: + matrix: + artifact: [Firebase-actions-dir, Firebase-actions-dir-dynamic] + build-env: + - os: macos-15 + xcode: Xcode_16.4 + runs-on: ${{ matrix.build-env.os }} + steps: + - uses: actions/checkout@v4 + - name: Get framework dir + uses: actions/download-artifact@v4.1.7 + with: + name: ${{ matrix.artifact }} + run-id: ${{ needs.packaging_done.outputs.run_id }} + github-token: ${{ secrets.GITHUB_TOKEN }} + - uses: ruby/setup-ruby@354a1ad156761f5ee2b7b13fa8e09943a5e8d252 # v1 + - name: Xcode + run: sudo xcode-select -s /Applications/${{ matrix.build-env.xcode }}.app/Contents/Developer + - name: Setup Bundler + run: ./scripts/setup_bundler.sh + - name: Move frameworks + run: | + mkdir -p "${HOME}"/ios_frameworks/ + find "${GITHUB_WORKSPACE}" -name "Firebase*latest.zip" -exec unzip -d "${HOME}"/ios_frameworks/ {} + + - name: Setup quickstart + run: SAMPLE="$SDK" TARGET="${SDK}Example" scripts/setup_quickstart_framework.sh \ + "${HOME}"/ios_frameworks/Firebase/FirebaseMessaging/* \ + "${HOME}"/ios_frameworks/Firebase/FirebaseAnalytics/* + - name: Add frameworks to notification extension target + run: | + cd quickstart-ios/messaging + "${GITHUB_WORKSPACE}"/quickstart-ios/scripts/add_framework_script.rb --sdk "Messaging" --target "NotificationServiceExtension" --framework_path Firebase/ + - name: Install Secret GoogleService-Info.plist + run: scripts/decrypt_gha_secret.sh scripts/gha-encrypted/qs-messaging.plist.gpg \ + quickstart-ios/messaging/GoogleService-Info.plist "$plist_secret" + - name: Test Quickstart + run: ([ -z $plist_secret ] || scripts/third_party/travis/retry.sh scripts/test_quickstart_framework.sh "${SDK}") + - uses: actions/upload-artifact@v4 + if: failure() + with: + name: quickstart_artifacts_messaging_${{ matrix.artifact }} + path: | + quickstart-ios/ + !quickstart-ios/**/GoogleService-Info.plist - # quickstart_framework_storage: - # needs: packaging_done - # if: ${{ !cancelled() }} - # env: - # plist_secret: ${{ secrets.GHASecretsGPGPassphrase1 }} - # SDK: "Storage" - # strategy: - # matrix: - # artifact: [Firebase-actions-dir, Firebase-actions-dir-dynamic] - # build-env: - # - os: macos-15 - # xcode: Xcode_16.4 - # runs-on: ${{ matrix.build-env.os }} - # steps: - # - uses: actions/checkout@v4 - # - name: Get framework dir - # uses: actions/download-artifact@v4.1.7 - # with: - # name: ${{ matrix.artifact }} - # run-id: ${{ needs.packaging_done.outputs.run_id }} - # github-token: ${{ secrets.GITHUB_TOKEN }} - # - uses: ruby/setup-ruby@354a1ad156761f5ee2b7b13fa8e09943a5e8d252 # v1 - # - name: Xcode - # run: sudo xcode-select -s /Applications/${{ matrix.build-env.xcode }}.app/Contents/Developer - # - name: Setup Bundler - # run: ./scripts/setup_bundler.sh - # - name: Move frameworks - # run: | - # mkdir -p "${HOME}"/ios_frameworks/ - # find "${GITHUB_WORKSPACE}" -name "Firebase*latest.zip" -exec unzip -d "${HOME}"/ios_frameworks/ {} + - # - name: Setup quickstart - # run: SAMPLE="$SDK" TARGET="${SDK}Example" scripts/setup_quickstart_framework.sh \ - # "${HOME}"/ios_frameworks/Firebase/FirebaseStorage/* \ - # "${HOME}"/ios_frameworks/Firebase/FirebaseAuth/* \ - # "${HOME}"/ios_frameworks/Firebase/FirebaseAnalytics/* - # - name: Install Secret GoogleService-Info.plist - # run: scripts/decrypt_gha_secret.sh scripts/gha-encrypted/qs-storage.plist.gpg \ - # quickstart-ios/storage/GoogleService-Info.plist "$plist_secret" - # - name: Test Quickstart - # run: ([ -z $plist_secret ] || scripts/third_party/travis/retry.sh scripts/test_quickstart_framework.sh "${SDK}") - # - uses: actions/upload-artifact@v4 - # if: failure() - # with: - # name: quickstart_artifacts_storage_${{ matrix.artifact }} - # path: | - # quickstart-ios/ - # !quickstart-ios/**/GoogleService-Info.plist + quickstart_framework_storage: + needs: packaging_done + if: ${{ !cancelled() }} + env: + plist_secret: ${{ secrets.GHASecretsGPGPassphrase1 }} + SDK: "Storage" + strategy: + matrix: + artifact: [Firebase-actions-dir, Firebase-actions-dir-dynamic] + build-env: + - os: macos-15 + xcode: Xcode_16.4 + runs-on: ${{ matrix.build-env.os }} + steps: + - uses: actions/checkout@v4 + - name: Get framework dir + uses: actions/download-artifact@v4.1.7 + with: + name: ${{ matrix.artifact }} + run-id: ${{ needs.packaging_done.outputs.run_id }} + github-token: ${{ secrets.GITHUB_TOKEN }} + - uses: ruby/setup-ruby@354a1ad156761f5ee2b7b13fa8e09943a5e8d252 # v1 + - name: Xcode + run: sudo xcode-select -s /Applications/${{ matrix.build-env.xcode }}.app/Contents/Developer + - name: Setup Bundler + run: ./scripts/setup_bundler.sh + - name: Move frameworks + run: | + mkdir -p "${HOME}"/ios_frameworks/ + find "${GITHUB_WORKSPACE}" -name "Firebase*latest.zip" -exec unzip -d "${HOME}"/ios_frameworks/ {} + + - name: Setup quickstart + run: SAMPLE="$SDK" TARGET="${SDK}Example" scripts/setup_quickstart_framework.sh \ + "${HOME}"/ios_frameworks/Firebase/FirebaseStorage/* \ + "${HOME}"/ios_frameworks/Firebase/FirebaseAuth/* \ + "${HOME}"/ios_frameworks/Firebase/FirebaseAnalytics/* + - name: Install Secret GoogleService-Info.plist + run: scripts/decrypt_gha_secret.sh scripts/gha-encrypted/qs-storage.plist.gpg \ + quickstart-ios/storage/GoogleService-Info.plist "$plist_secret" + - name: Test Quickstart + run: ([ -z $plist_secret ] || scripts/third_party/travis/retry.sh scripts/test_quickstart_framework.sh "${SDK}") + - uses: actions/upload-artifact@v4 + if: failure() + with: + name: quickstart_artifacts_storage_${{ matrix.artifact }} + path: | + quickstart-ios/ + !quickstart-ios/**/GoogleService-Info.plist From 2888440ea13f9a0112976b7b4bbd40021c765ab2 Mon Sep 17 00:00:00 2001 From: Nick Cooke <36927374+ncooke3@users.noreply.github.com> Date: Fri, 14 Nov 2025 16:20:19 -0500 Subject: [PATCH 25/29] Update scripts/remove_data.sh Co-authored-by: gemini-code-assist[bot] <176961590+gemini-code-assist[bot]@users.noreply.github.com> --- scripts/remove_data.sh | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/scripts/remove_data.sh b/scripts/remove_data.sh index 90abf99b50b..eb6832b3916 100755 --- a/scripts/remove_data.sh +++ b/scripts/remove_data.sh @@ -26,7 +26,7 @@ DIR="${SDK}" TARGET_DIR="quickstart-ios/${DIR}" -if [ ! -d "$TARGET_DIR" ]; then +if [[ ! -d "$TARGET_DIR" ]]; then echo "Error: Directory '$TARGET_DIR' not found." >&2 echo "Please provide a valid SDK name." >&2 exit 1 From 699aa8844e58f5f0245eca98a64c84ea586eb6fd Mon Sep 17 00:00:00 2001 From: Nick Cooke <36927374+ncooke3@users.noreply.github.com> Date: Fri, 14 Nov 2025 16:38:08 -0500 Subject: [PATCH 26/29] Update .github/workflows/release.yml --- .github/workflows/release.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/release.yml b/.github/workflows/release.yml index 96c18c93bc0..0a3d4842b53 100644 --- a/.github/workflows/release.yml +++ b/.github/workflows/release.yml @@ -99,7 +99,7 @@ jobs: - name: Prereqs run: gem install xcpretty - name: Setup testing repo and quickstart - run: QUICKSTART_BRANCH=nc/quickstarts scripts/setup_quickstart_spm.sh ${{ matrix.product }} nightly_release_testing + run: scripts/setup_quickstart_spm.sh ${{ matrix.product }} nightly_release_testing - name: Install Secret GoogleService-Info.plist run: | scripts/decrypt_gha_secret.sh scripts/gha-encrypted/qs-${{ matrix.product }}.plist.gpg \ From dd5e7ff2e1b6b0c356a380839dbb79b2468f919b Mon Sep 17 00:00:00 2001 From: Nick Cooke <36927374+ncooke3@users.noreply.github.com> Date: Fri, 14 Nov 2025 16:38:16 -0500 Subject: [PATCH 27/29] Update scripts/setup_quickstart_framework.sh --- scripts/setup_quickstart_framework.sh | 1 - 1 file changed, 1 deletion(-) diff --git a/scripts/setup_quickstart_framework.sh b/scripts/setup_quickstart_framework.sh index ca69710a99f..d500666ae4f 100755 --- a/scripts/setup_quickstart_framework.sh +++ b/scripts/setup_quickstart_framework.sh @@ -20,7 +20,6 @@ if [ ! -d "quickstart-ios" ]; then fi QS_SCRIPTS="${REPO}"/quickstart-ios/scripts cd quickstart-ios/"${SAMPLE}" -git checkout nc/quickstarts # Remove all SPM dependencies from the project. This is necessary to prepare # the project for framework-based testing. From 6e1b8de75a1132984db5047ec7aadb451909fabd Mon Sep 17 00:00:00 2001 From: Nick Cooke <36927374+ncooke3@users.noreply.github.com> Date: Fri, 14 Nov 2025 16:38:23 -0500 Subject: [PATCH 28/29] Update Gemfile --- Gemfile | 1 - 1 file changed, 1 deletion(-) diff --git a/Gemfile b/Gemfile index cbd2bfb227e..cc267b2e746 100644 --- a/Gemfile +++ b/Gemfile @@ -1,5 +1,4 @@ # To update, change version below, run bundle install, test, -# # commit Gemfile and Gemfile.lock. source 'https://rubygems.org' From f8e50eb2a6fa67ce19502e10ff3e8202670de23d Mon Sep 17 00:00:00 2001 From: Nick Cooke Date: Fri, 14 Nov 2025 16:40:39 -0500 Subject: [PATCH 29/29] finishing touches --- .github/workflows/common_quickstart.yml | 3 +-- .github/workflows/prerelease.yml | 4 ++-- 2 files changed, 3 insertions(+), 4 deletions(-) diff --git a/.github/workflows/common_quickstart.yml b/.github/workflows/common_quickstart.yml index 7d10137e2a6..ef41a4332ba 100644 --- a/.github/workflows/common_quickstart.yml +++ b/.github/workflows/common_quickstart.yml @@ -33,8 +33,7 @@ on: quickstart_branch: type: string required: false - # default: 'main' # TODO: Revert to main before merging. - default: 'nc/quickstarts' + default: 'main' # The path to the encrypted `GoogleService-Info.plist` file. plist_src_path: diff --git a/.github/workflows/prerelease.yml b/.github/workflows/prerelease.yml index e03d6dbba73..e6575f9a614 100644 --- a/.github/workflows/prerelease.yml +++ b/.github/workflows/prerelease.yml @@ -101,7 +101,7 @@ jobs: - name: Xcode run: sudo xcode-select -s /Applications/Xcode_16.4.app/Contents/Developer - name: Setup testing repo and quickstart - run: QUICKSTART_BRANCH=nc/quickstarts scripts/setup_quickstart_spm.sh ${{ matrix.product }} prerelease_testing + run: scripts/setup_quickstart_spm.sh ${{ matrix.product }} prerelease_testing - name: Install Secret GoogleService-Info.plist run: | scripts/decrypt_gha_secret.sh \ @@ -117,7 +117,7 @@ jobs: command: DIR=${{ matrix.product }} scripts/test_quickstart.sh ${{ matrix.product }} ${{ matrix.run_tests }} # Failure sequence to upload artifact. - name: Remove data before upload. - if: ${{ failure() }} + if: ${{ failure() }} run: scripts/remove_data.sh ${{ matrix.product }} - uses: actions/upload-artifact@v4 if: ${{ failure() }}