From cca2823ab1f30287cb57053f09f1265f5268a2b3 Mon Sep 17 00:00:00 2001 From: Nick Cooke Date: Fri, 18 Apr 2025 16:46:01 -0400 Subject: [PATCH 01/24] [Infra] Create common SPM-focused reusable workflow --- .github/workflows/common.yml | 83 +++++++++++++ .github/workflows/core.yml | 226 ++++++++++++++--------------------- 2 files changed, 174 insertions(+), 135 deletions(-) create mode 100644 .github/workflows/common.yml diff --git a/.github/workflows/common.yml b/.github/workflows/common.yml new file mode 100644 index 00000000000..4dcf35e1eb9 --- /dev/null +++ b/.github/workflows/common.yml @@ -0,0 +1,83 @@ +name: common + +on: + workflow_call: + inputs: + target: + required: true + type: string + +jobs: + spm-package-resolved: + env: + FIREBASECI_USE_LATEST_GOOGLEAPPMEASUREMENT: 1 + runs-on: macos-15 + outputs: + cache_key: ${{ steps.generate_cache_key.outputs.cache_key }} + steps: + - uses: actions/checkout@v4 + - name: Xcode + run: sudo xcode-select -s /Applications/Xcode_16.2.app/Contents/Developer + - name: Generate Swift Package.resolved + id: swift_package_resolve + run: | + swift package resolve + - name: Generate cache key + id: generate_cache_key + run: | + cache_key="${{ runner.os }}-spm-${{ hashFiles('**/Package.resolved') }}" + echo "cache_key=${cache_key}" >> "$GITHUB_OUTPUT" + - uses: actions/cache/save@v4 + id: cache + with: + path: .build + key: ${{ steps.generate_cache_key.outputs.cache_key }} + + spm: + # 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-package-resolved] + strategy: + matrix: + # TODO: Add Xcode matrix when Xcode 16 is ubiquitous on CI runners. + include: + - os: macos-14 + xcode: Xcode_16.2 + platform: iOS + - os: macos-15 + xcode: Xcode_16.2 + platform: iOS + - os: macos-15 + xcode: Xcode_16.2 + platform: iOS + - os: macos-15 + xcode: Xcode_16.2 + platform: tvOS + - os: macos-15 + xcode: Xcode_16.2 + platform: macOS + - os: macos-15 + xcode: Xcode_16.2 + platform: watchOS + - os: macos-15 + xcode: Xcode_16.2 + platform: catalyst + - os: macos-15 + xcode: Xcode_16.2 + platform: visionOS + runs-on: ${{ matrix.os }} + steps: + - uses: actions/checkout@v4 + - uses: actions/cache/restore@v4 + with: + path: .build + key: ${{needs.spm-package-resolved.outputs.cache_key}} + - name: Xcode + run: sudo xcode-select -s /Applications/${{ matrix.xcode }}.app/Contents/Developer + - name: Install visionOS, if needed. + if: matrix.platform == 'visionOS' + run: xcodebuild -downloadPlatform visionOS + - name: Initialize xcodebuild + run: scripts/setup_spm_tests.sh + - name: Unit Tests + run: scripts/third_party/travis/retry.sh ./scripts/build.sh ${{ inputs.target }} ${{ matrix.platform }} spm diff --git a/.github/workflows/core.yml b/.github/workflows/core.yml index cff05b59633..aa040252916 100644 --- a/.github/workflows/core.yml +++ b/.github/workflows/core.yml @@ -16,142 +16,98 @@ concurrency: cancel-in-progress: true jobs: - pod-lib-lint: - # 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: - # TODO: macos tests are blocked by https://github.com/erikdoe/ocmock/pull/532 - target: [ios, tvos, macos --skip-tests, watchos] - build-env: - - os: macos-14 - xcode: Xcode_16.2 - - os: macos-15 - xcode: Xcode_16.2 - # TODO: Add Xcode matrix when Xcode 16 is ubiquitous on CI runners. +# pod-lib-lint: +# # 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: +# # TODO: macos tests are blocked by https://github.com/erikdoe/ocmock/pull/532 +# target: [ios, tvos, macos --skip-tests, watchos] +# build-env: +# - os: macos-14 +# xcode: Xcode_16.2 # - os: macos-15 -# xcode: Xcode_16.3 - runs-on: ${{ matrix.build-env.os }} - steps: - - uses: actions/checkout@v4 - - uses: ruby/setup-ruby@354a1ad156761f5ee2b7b13fa8e09943a5e8d252 # v1 - - name: Setup Bundler - run: scripts/setup_bundler.sh - - name: Xcode - run: sudo xcode-select -s /Applications/${{ matrix.build-env.xcode }}.app/Contents/Developer - - name: Build and test - run: scripts/third_party/travis/retry.sh scripts/pod_lib_lint.rb FirebaseCore.podspec --platforms=${{ matrix.target }} - - spm-package-resolved: - env: - FIREBASECI_USE_LATEST_GOOGLEAPPMEASUREMENT: 1 - runs-on: macos-15 - outputs: - cache_key: ${{ steps.generate_cache_key.outputs.cache_key }} - steps: - - uses: actions/checkout@v4 - - name: Xcode - run: sudo xcode-select -s /Applications/Xcode_16.2.app/Contents/Developer - - name: Generate Swift Package.resolved - id: swift_package_resolve - run: | - swift package resolve - - name: Generate cache key - id: generate_cache_key - run: | - cache_key="${{ runner.os }}-spm-${{ hashFiles('**/Package.resolved') }}" - echo "cache_key=${cache_key}" >> "$GITHUB_OUTPUT" - - uses: actions/cache/save@v4 - id: cache - with: - path: .build - key: ${{ steps.generate_cache_key.outputs.cache_key }} +# xcode: Xcode_16.2 +# # TODO: Add Xcode matrix when Xcode 16 is ubiquitous on CI runners. +## - os: macos-15 +## xcode: Xcode_16.3 +# runs-on: ${{ matrix.build-env.os }} +# steps: +# - uses: actions/checkout@v4 +# - uses: ruby/setup-ruby@354a1ad156761f5ee2b7b13fa8e09943a5e8d252 # v1 +# - name: Setup Bundler +# run: scripts/setup_bundler.sh +# - name: Xcode +# run: sudo xcode-select -s /Applications/${{ matrix.build-env.xcode }}.app/Contents/Developer +# - name: Build and test +# run: scripts/third_party/travis/retry.sh scripts/pod_lib_lint.rb FirebaseCore.podspec --platforms=${{ matrix.target }} +# +# spm-package-resolved: +# env: +# FIREBASECI_USE_LATEST_GOOGLEAPPMEASUREMENT: 1 +# runs-on: macos-15 +# outputs: +# cache_key: ${{ steps.generate_cache_key.outputs.cache_key }} +# steps: +# - uses: actions/checkout@v4 +# - name: Xcode +# run: sudo xcode-select -s /Applications/Xcode_16.2.app/Contents/Developer +# - name: Generate Swift Package.resolved +# id: swift_package_resolve +# run: | +# swift package resolve +# - name: Generate cache key +# id: generate_cache_key +# run: | +# cache_key="${{ runner.os }}-spm-${{ hashFiles('**/Package.resolved') }}" +# echo "cache_key=${cache_key}" >> "$GITHUB_OUTPUT" +# - uses: actions/cache/save@v4 +# id: cache +# with: +# path: .build +# key: ${{ steps.generate_cache_key.outputs.cache_key }} spm: - # 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-package-resolved] - strategy: - matrix: - # TODO: Add Xcode matrix when Xcode 16 is ubiquitous on CI runners. - include: - - os: macos-14 - xcode: Xcode_16.2 - target: iOS - - os: macos-15 - xcode: Xcode_16.2 - target: iOS - - os: macos-15 - xcode: Xcode_16.2 - target: iOS - - os: macos-15 - xcode: Xcode_16.2 - target: tvOS - - os: macos-15 - xcode: Xcode_16.2 - target: macOS - - os: macos-15 - xcode: Xcode_16.2 - target: watchOS - - os: macos-15 - xcode: Xcode_16.2 - target: catalyst - - os: macos-15 - xcode: Xcode_16.2 - target: visionOS - runs-on: ${{ matrix.os }} - steps: - - uses: actions/checkout@v4 - - uses: actions/cache/restore@v4 - with: - path: .build - key: ${{needs.spm-package-resolved.outputs.cache_key}} - - name: Xcode - run: sudo xcode-select -s /Applications/${{ matrix.xcode }}.app/Contents/Developer - - name: Install visionOS, if needed. - if: matrix.target == 'visionOS' - run: xcodebuild -downloadPlatform visionOS - - name: Initialize xcodebuild - run: scripts/setup_spm_tests.sh - - name: Unit Tests - run: scripts/third_party/travis/retry.sh ./scripts/build.sh CoreUnit ${{ matrix.target }} spm - - catalyst: - # 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: ${{ matrix.os }} - - uses: ruby/setup-ruby@354a1ad156761f5ee2b7b13fa8e09943a5e8d252 # v1 - - name: Setup Bundler - run: scripts/setup_bundler.sh - - name: Xcode - run: sudo xcode-select -s /Applications/Xcode_16.2.app/Contents/Developer - - name: Setup project and Build Catalyst - run: scripts/test_catalyst.sh FirebaseCore test FirebaseCore-Unit-unit - - core-cron-only: - # Don't run on private repo. - if: github.event_name == 'schedule' && github.repository == 'Firebase/firebase-ios-sdk' + uses: ./.github/workflows/common.yml + with: + target: CoreUnit - runs-on: macos-14 - strategy: - matrix: - target: [ios, tvos, macos] - flags: [ - '--use-static-frameworks' - ] - needs: pod-lib-lint - steps: - - uses: actions/checkout@v4 - - uses: ruby/setup-ruby@354a1ad156761f5ee2b7b13fa8e09943a5e8d252 # v1 - - name: Xcode - run: sudo xcode-select -s /Applications/Xcode_16.2.app/Contents/Developer - - name: Setup Bundler - run: scripts/setup_bundler.sh - - name: PodLibLint Core Cron - run: scripts/third_party/travis/retry.sh scripts/pod_lib_lint.rb FirebaseCore.podspec --platforms=${{ matrix.target }} ${{ matrix.flags }} +# catalyst: +# # 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: ${{ matrix.os }} +# - uses: ruby/setup-ruby@354a1ad156761f5ee2b7b13fa8e09943a5e8d252 # v1 +# - name: Setup Bundler +# run: scripts/setup_bundler.sh +# - name: Xcode +# run: sudo xcode-select -s /Applications/Xcode_16.2.app/Contents/Developer +# - name: Setup project and Build Catalyst +# run: scripts/test_catalyst.sh FirebaseCore test FirebaseCore-Unit-unit +# +# core-cron-only: +# # Don't run on private repo. +# if: github.event_name == 'schedule' && github.repository == 'Firebase/firebase-ios-sdk' +# +# runs-on: macos-14 +# strategy: +# matrix: +# target: [ios, tvos, macos] +# flags: [ +# '--use-static-frameworks' +# ] +# needs: pod-lib-lint +# steps: +# - uses: actions/checkout@v4 +# - uses: ruby/setup-ruby@354a1ad156761f5ee2b7b13fa8e09943a5e8d252 # v1 +# - name: Xcode +# run: sudo xcode-select -s /Applications/Xcode_16.2.app/Contents/Developer +# - name: Setup Bundler +# run: scripts/setup_bundler.sh +# - name: PodLibLint Core Cron +# run: scripts/third_party/travis/retry.sh scripts/pod_lib_lint.rb FirebaseCore.podspec --platforms=${{ matrix.target }} ${{ matrix.flags }} From 06fe51af109646ff404afdaf9a1a570cbba8b465 Mon Sep 17 00:00:00 2001 From: Nick Cooke Date: Fri, 18 Apr 2025 17:01:05 -0400 Subject: [PATCH 02/24] abtesting --- .github/workflows/abtesting.yml | 360 +++++++++++++------------------- .github/workflows/common.yml | 14 +- 2 files changed, 153 insertions(+), 221 deletions(-) diff --git a/.github/workflows/abtesting.yml b/.github/workflows/abtesting.yml index bd56f8190cc..9b2efc8e0dc 100644 --- a/.github/workflows/abtesting.yml +++ b/.github/workflows/abtesting.yml @@ -17,221 +17,151 @@ concurrency: cancel-in-progress: true jobs: - pod-lib-lint: - # 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: - include: - - os: macos-14 - xcode: Xcode_16.2 - target: ios - - os: macos-15 - xcode: Xcode_16.2 - target: ios - - os: macos-15 - xcode: Xcode_16.2 - target: tvos - - os: macos-15 - xcode: Xcode_16.2 - target: macos - - os: macos-15 - xcode: Xcode_16.2 - target: watchos - runs-on: ${{ matrix.os }} - steps: - - uses: actions/checkout@v4 - - 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 - - uses: nick-fields/retry@ce71cc2ab81d554ebbe88c79ab5975992d79ba08 # v3 - with: - timeout_minutes: 120 - max_attempts: 3 - retry_on: error - retry_wait_seconds: 120 - command: scripts/pod_lib_lint.rb FirebaseABTesting.podspec --platforms=${{ matrix.target }} - - spm-package-resolved: - env: - FIREBASECI_USE_LATEST_GOOGLEAPPMEASUREMENT: 1 - runs-on: macos-15 - outputs: - cache_key: ${{ steps.generate_cache_key.outputs.cache_key }} - steps: - - uses: actions/checkout@v4 - - name: Xcode - run: sudo xcode-select -s /Applications/Xcode_16.2.app/Contents/Developer - - name: Generate Swift Package.resolved - id: swift_package_resolve - run: | - swift package resolve - - name: Generate cache key - id: generate_cache_key - run: | - cache_key="${{ runner.os }}-spm-${{ hashFiles('**/Package.resolved') }}" - echo "cache_key=${cache_key}" >> "$GITHUB_OUTPUT" - - uses: actions/cache/save@v4 - id: cache - with: - path: .build - key: ${{ steps.generate_cache_key.outputs.cache_key }} +# pod-lib-lint: +# # 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: +# include: +# - os: macos-14 +# xcode: Xcode_16.2 +# target: ios +# - os: macos-15 +# xcode: Xcode_16.2 +# target: ios +# - os: macos-15 +# xcode: Xcode_16.2 +# target: tvos +# - os: macos-15 +# xcode: Xcode_16.2 +# target: macos +# - os: macos-15 +# xcode: Xcode_16.2 +# target: watchos +# runs-on: ${{ matrix.os }} +# steps: +# - uses: actions/checkout@v4 +# - 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 +# - uses: nick-fields/retry@ce71cc2ab81d554ebbe88c79ab5975992d79ba08 # v3 +# with: +# timeout_minutes: 120 +# max_attempts: 3 +# retry_on: error +# retry_wait_seconds: 120 +# command: scripts/pod_lib_lint.rb FirebaseABTesting.podspec --platforms=${{ matrix.target }} spm: - # 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-package-resolved] - strategy: - matrix: - include: - - os: macos-14 - xcode: Xcode_16.2 - target: iOS - - os: macos-15 - xcode: Xcode_16.2 - target: iOS - - os: macos-15 - xcode: Xcode_16.2 - target: tvOS - - os: macos-15 - xcode: Xcode_16.2 - target: macOS - - os: macos-15 - xcode: Xcode_16.2 - target: watchOS - - os: macos-15 - xcode: Xcode_16.2 - target: catalyst - - os: macos-15 - xcode: Xcode_16.2 - target: visionOS - runs-on: ${{ matrix.os }} - steps: - - uses: actions/checkout@v4 - - uses: actions/cache/restore@v4 - with: - path: .build - key: ${{needs.spm-package-resolved.outputs.cache_key}} - - name: Xcode - run: sudo xcode-select -s /Applications/${{ matrix.xcode }}.app/Contents/Developer - - name: Install visionOS, if needed. - if: matrix.target == 'visionOS' - run: xcodebuild -downloadPlatform visionOS - - name: Initialize xcodebuild - run: scripts/setup_spm_tests.sh - - uses: nick-fields/retry@ce71cc2ab81d554ebbe88c79ab5975992d79ba08 # v3 - with: - timeout_minutes: 120 - max_attempts: 3 - retry_on: error - retry_wait_seconds: 120 - command: scripts/build.sh ABTestingUnit ${{ matrix.target }} spm - - catalyst: - # 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: catalyst${{ matrix.os }} - - uses: ruby/setup-ruby@354a1ad156761f5ee2b7b13fa8e09943a5e8d252 # v1 - - name: Setup Bundler - run: scripts/setup_bundler.sh - - name: Xcode - run: sudo xcode-select -s /Applications/Xcode_16.2.app/Contents/Developer - - uses: nick-fields/retry@ce71cc2ab81d554ebbe88c79ab5975992d79ba08 # v3 - with: - timeout_minutes: 120 - max_attempts: 3 - retry_on: error - retry_wait_seconds: 120 - command: scripts/test_catalyst.sh FirebaseABTesting test FirebaseABTesting-Unit-unit - - quickstart: - # Don't run on private repo unless it is a PR. - if: (github.repository == 'Firebase/firebase-ios-sdk' && github.event_name == 'schedule') || github.event_name == 'pull_request' - - env: - plist_secret: ${{ secrets.GHASecretsGPGPassphrase1 }} - signin_secret: ${{ secrets.GHASecretsGPGPassphrase1 }} - runs-on: macos-15 - steps: - - uses: actions/checkout@v4 - - uses: ruby/setup-ruby@354a1ad156761f5ee2b7b13fa8e09943a5e8d252 # v1 - - name: Xcode - run: sudo xcode-select -s /Applications/Xcode_16.2.app/Contents/Developer - - name: Setup quickstart - env: - LEGACY: true - run: scripts/setup_quickstart.sh abtesting - - name: Install Secret GoogleService-Info.plist - run: scripts/decrypt_gha_secret.sh scripts/gha-encrypted/qs-abtesting.plist.gpg \ - quickstart-ios/abtesting/GoogleService-Info.plist "$plist_secret" - - name: Test swift quickstart - env: - LEGACY: true - run: ([ -z $plist_secret ] || scripts/third_party/travis/retry.sh scripts/test_quickstart.sh ABTesting true) - - quickstart-ftl-cron-only: - # Don't run on private repo. - if: github.repository == 'Firebase/firebase-ios-sdk' && github.event_name == 'schedule' - - env: - plist_secret: ${{ secrets.GHASecretsGPGPassphrase1 }} - signin_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.2.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: - # Don't run on private repo. - if: github.event_name == 'schedule' && github.repository == 'Firebase/firebase-ios-sdk' + uses: ./.github/workflows/common.yml + with: + target: ABTestingUnit - runs-on: macos-15 - strategy: - matrix: - target: [ios, tvos, macos] - flags: [ - '--use-static-frameworks' - ] - needs: pod-lib-lint - steps: - - uses: actions/checkout@v4 - - uses: ruby/setup-ruby@354a1ad156761f5ee2b7b13fa8e09943a5e8d252 # v1 - - name: Setup Bundler - run: scripts/setup_bundler.sh - - name: Xcode - run: sudo xcode-select -s /Applications/Xcode_16.2.app/Contents/Developer - - name: PodLibLint ABTesting Cron - run: | - scripts/third_party/travis/retry.sh scripts/pod_lib_lint.rb \ - FirebaseABTesting.podspec --platforms=${{ matrix.target }} ${{ matrix.flags }} +# catalyst: +# # 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: catalyst${{ matrix.os }} +# - uses: ruby/setup-ruby@354a1ad156761f5ee2b7b13fa8e09943a5e8d252 # v1 +# - name: Setup Bundler +# run: scripts/setup_bundler.sh +# - name: Xcode +# run: sudo xcode-select -s /Applications/Xcode_16.2.app/Contents/Developer +# - uses: nick-fields/retry@ce71cc2ab81d554ebbe88c79ab5975992d79ba08 # v3 +# with: +# timeout_minutes: 120 +# max_attempts: 3 +# retry_on: error +# retry_wait_seconds: 120 +# command: scripts/test_catalyst.sh FirebaseABTesting test FirebaseABTesting-Unit-unit +# +# quickstart: +# # Don't run on private repo unless it is a PR. +# if: (github.repository == 'Firebase/firebase-ios-sdk' && github.event_name == 'schedule') || github.event_name == 'pull_request' +# +# env: +# plist_secret: ${{ secrets.GHASecretsGPGPassphrase1 }} +# signin_secret: ${{ secrets.GHASecretsGPGPassphrase1 }} +# runs-on: macos-15 +# steps: +# - uses: actions/checkout@v4 +# - uses: ruby/setup-ruby@354a1ad156761f5ee2b7b13fa8e09943a5e8d252 # v1 +# - name: Xcode +# run: sudo xcode-select -s /Applications/Xcode_16.2.app/Contents/Developer +# - name: Setup quickstart +# env: +# LEGACY: true +# run: scripts/setup_quickstart.sh abtesting +# - name: Install Secret GoogleService-Info.plist +# run: scripts/decrypt_gha_secret.sh scripts/gha-encrypted/qs-abtesting.plist.gpg \ +# quickstart-ios/abtesting/GoogleService-Info.plist "$plist_secret" +# - name: Test swift quickstart +# env: +# LEGACY: true +# run: ([ -z $plist_secret ] || scripts/third_party/travis/retry.sh scripts/test_quickstart.sh ABTesting true) +# +# quickstart-ftl-cron-only: +# # Don't run on private repo. +# if: github.repository == 'Firebase/firebase-ios-sdk' && github.event_name == 'schedule' +# +# env: +# plist_secret: ${{ secrets.GHASecretsGPGPassphrase1 }} +# signin_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.2.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: +# # Don't run on private repo. +# if: github.event_name == 'schedule' && github.repository == 'Firebase/firebase-ios-sdk' +# +# runs-on: macos-15 +# strategy: +# matrix: +# target: [ios, tvos, macos] +# flags: [ +# '--use-static-frameworks' +# ] +# needs: pod-lib-lint +# steps: +# - uses: actions/checkout@v4 +# - uses: ruby/setup-ruby@354a1ad156761f5ee2b7b13fa8e09943a5e8d252 # v1 +# - name: Setup Bundler +# run: scripts/setup_bundler.sh +# - name: Xcode +# run: sudo xcode-select -s /Applications/Xcode_16.2.app/Contents/Developer +# - name: PodLibLint ABTesting Cron +# run: | +# scripts/third_party/travis/retry.sh scripts/pod_lib_lint.rb \ +# FirebaseABTesting.podspec --platforms=${{ matrix.target }} ${{ matrix.flags }} diff --git a/.github/workflows/common.yml b/.github/workflows/common.yml index 4dcf35e1eb9..599377aeb81 100644 --- a/.github/workflows/common.yml +++ b/.github/workflows/common.yml @@ -6,7 +6,7 @@ on: target: required: true type: string - + jobs: spm-package-resolved: env: @@ -47,9 +47,6 @@ jobs: - os: macos-15 xcode: Xcode_16.2 platform: iOS - - os: macos-15 - xcode: Xcode_16.2 - platform: iOS - os: macos-15 xcode: Xcode_16.2 platform: tvOS @@ -79,5 +76,10 @@ jobs: run: xcodebuild -downloadPlatform visionOS - name: Initialize xcodebuild run: scripts/setup_spm_tests.sh - - name: Unit Tests - run: scripts/third_party/travis/retry.sh ./scripts/build.sh ${{ inputs.target }} ${{ matrix.platform }} spm + - uses: nick-fields/retry@ce71cc2ab81d554ebbe88c79ab5975992d79ba08 # v3 + with: + timeout_minutes: 120 + max_attempts: 3 + retry_on: error + retry_wait_seconds: 120 + command: ./scripts/build.sh ${{ inputs.target }} ${{ matrix.platform }} spm From 5bce7aae8538af5b1787d901dbd5658c653b2e5e Mon Sep 17 00:00:00 2001 From: Nick Cooke Date: Fri, 18 Apr 2025 17:06:52 -0400 Subject: [PATCH 03/24] matrix --- .github/workflows/common.yml | 22 +++------------------- 1 file changed, 3 insertions(+), 19 deletions(-) diff --git a/.github/workflows/common.yml b/.github/workflows/common.yml index 599377aeb81..a6442be4c40 100644 --- a/.github/workflows/common.yml +++ b/.github/workflows/common.yml @@ -39,29 +39,13 @@ jobs: needs: [spm-package-resolved] strategy: matrix: - # TODO: Add Xcode matrix when Xcode 16 is ubiquitous on CI runners. + os: macos-15 + xcode: Xcode_16.2 + platform: [iOS, tvOS, macOS, watchOS, catalyst, visionOS] include: - os: macos-14 xcode: Xcode_16.2 platform: iOS - - os: macos-15 - xcode: Xcode_16.2 - platform: iOS - - os: macos-15 - xcode: Xcode_16.2 - platform: tvOS - - os: macos-15 - xcode: Xcode_16.2 - platform: macOS - - os: macos-15 - xcode: Xcode_16.2 - platform: watchOS - - os: macos-15 - xcode: Xcode_16.2 - platform: catalyst - - os: macos-15 - xcode: Xcode_16.2 - platform: visionOS runs-on: ${{ matrix.os }} steps: - uses: actions/checkout@v4 From f4030d573d4efba5acc6f92dff8665357ea1c543 Mon Sep 17 00:00:00 2001 From: Nick Cooke Date: Fri, 18 Apr 2025 17:09:51 -0400 Subject: [PATCH 04/24] fix? matrix --- .github/workflows/common.yml | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/.github/workflows/common.yml b/.github/workflows/common.yml index a6442be4c40..0cfceeac0ba 100644 --- a/.github/workflows/common.yml +++ b/.github/workflows/common.yml @@ -42,10 +42,10 @@ jobs: os: macos-15 xcode: Xcode_16.2 platform: [iOS, tvOS, macOS, watchOS, catalyst, visionOS] - include: - - os: macos-14 - xcode: Xcode_16.2 - platform: iOS +# include: +# - os: macos-14 +# xcode: Xcode_16.2 +# platform: iOS runs-on: ${{ matrix.os }} steps: - uses: actions/checkout@v4 From cbd2344060aee5ecadb0d388ed84863652e106a1 Mon Sep 17 00:00:00 2001 From: Nick Cooke Date: Fri, 18 Apr 2025 17:10:43 -0400 Subject: [PATCH 05/24] fix? matrix (1) --- .github/workflows/common.yml | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/.github/workflows/common.yml b/.github/workflows/common.yml index 0cfceeac0ba..b79a1ac992a 100644 --- a/.github/workflows/common.yml +++ b/.github/workflows/common.yml @@ -39,8 +39,8 @@ jobs: needs: [spm-package-resolved] strategy: matrix: - os: macos-15 - xcode: Xcode_16.2 + os: [macos-15] + xcode: [Xcode_16.2] platform: [iOS, tvOS, macOS, watchOS, catalyst, visionOS] # include: # - os: macos-14 From 4358d3d724b7d77677cd7bb3ee8817c9a589f93c Mon Sep 17 00:00:00 2001 From: Nick Cooke Date: Fri, 18 Apr 2025 17:12:18 -0400 Subject: [PATCH 06/24] add matrix pair --- .github/workflows/common.yml | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/.github/workflows/common.yml b/.github/workflows/common.yml index b79a1ac992a..80b0b83d70e 100644 --- a/.github/workflows/common.yml +++ b/.github/workflows/common.yml @@ -42,10 +42,10 @@ jobs: os: [macos-15] xcode: [Xcode_16.2] platform: [iOS, tvOS, macOS, watchOS, catalyst, visionOS] -# include: -# - os: macos-14 -# xcode: Xcode_16.2 -# platform: iOS + include: + - os: macos-14 + xcode: Xcode_16.2 + platform: iOS runs-on: ${{ matrix.os }} steps: - uses: actions/checkout@v4 From e02ea51237b7383d3640a401190d8a86c09bb67a Mon Sep 17 00:00:00 2001 From: Nick Cooke Date: Fri, 18 Apr 2025 17:30:18 -0400 Subject: [PATCH 07/24] more workflows --- .github/workflows/abtesting.yml | 8 +- .github/workflows/core.yml | 8 +- .github/workflows/core_internal.yml | 205 +++++---------- .github/workflows/crashlytics.yml | 383 +++++++++++----------------- .github/workflows/database.yml | 271 ++++++++------------ 5 files changed, 339 insertions(+), 536 deletions(-) diff --git a/.github/workflows/abtesting.yml b/.github/workflows/abtesting.yml index 9b2efc8e0dc..d9f327d53b2 100644 --- a/.github/workflows/abtesting.yml +++ b/.github/workflows/abtesting.yml @@ -55,10 +55,10 @@ jobs: # retry_wait_seconds: 120 # command: scripts/pod_lib_lint.rb FirebaseABTesting.podspec --platforms=${{ matrix.target }} - spm: - uses: ./.github/workflows/common.yml - with: - target: ABTestingUnit +# spm: +# uses: ./.github/workflows/common.yml +# with: +# target: ABTestingUnit # catalyst: # # Don't run on private repo unless it is a PR. diff --git a/.github/workflows/core.yml b/.github/workflows/core.yml index aa040252916..5e20c80b20f 100644 --- a/.github/workflows/core.yml +++ b/.github/workflows/core.yml @@ -67,10 +67,10 @@ jobs: # path: .build # key: ${{ steps.generate_cache_key.outputs.cache_key }} - spm: - uses: ./.github/workflows/common.yml - with: - target: CoreUnit +# spm: +# uses: ./.github/workflows/common.yml +# with: +# target: CoreUnit # catalyst: # # Don't run on private repo unless it is a PR. diff --git a/.github/workflows/core_internal.yml b/.github/workflows/core_internal.yml index 26054ed80ba..43db42820dd 100644 --- a/.github/workflows/core_internal.yml +++ b/.github/workflows/core_internal.yml @@ -13,141 +13,76 @@ on: - cron: '0 10 * * *' jobs: - pod-lib-lint: - # 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: - target: [ios, tvos, macos, watchos] - build-env: - - os: macos-14 - xcode: Xcode_16.2 - swift_version: 5.9 - - os: macos-15 - xcode: Xcode_16.2 - swift_version: 5.9 - - os: macos-15 - xcode: Xcode_16.2 - swift_version: 6.0 - runs-on: ${{ matrix.build-env.os }} - steps: - - uses: actions/checkout@v4 - - uses: ruby/setup-ruby@354a1ad156761f5ee2b7b13fa8e09943a5e8d252 # v1 - - name: Setup Bundler - run: scripts/setup_bundler.sh - - name: Xcode - run: sudo xcode-select -s /Applications/${{ matrix.build-env.xcode }}.app/Contents/Developer - - name: Set Swift swift_version - run: sed -i "" "s/s.swift_version[[:space:]]*=[[:space:]]*'5.9'/s.swift_version = '${{ matrix.build-env.swift_version }}'/" FirebaseCoreInternal.podspec - - name: Build and test - run: scripts/third_party/travis/retry.sh scripts/pod_lib_lint.rb FirebaseCoreInternal.podspec --platforms=${{ matrix.target }} - - spm-package-resolved: - env: - FIREBASECI_USE_LATEST_GOOGLEAPPMEASUREMENT: 1 - runs-on: macos-14 - outputs: - cache_key: ${{ steps.generate_cache_key.outputs.cache_key }} - steps: - - uses: actions/checkout@v4 - - name: Xcode - run: sudo xcode-select -s /Applications/Xcode_16.2.app/Contents/Developer - - name: Generate Swift Package.resolved - id: swift_package_resolve - run: | - swift package resolve - - name: Generate cache key - id: generate_cache_key - run: | - cache_key="${{ runner.os }}-spm-${{ hashFiles('**/Package.resolved') }}" - echo "cache_key=${cache_key}" >> "$GITHUB_OUTPUT" - - uses: actions/cache/save@v4 - id: cache - with: - path: .build - key: ${{ steps.generate_cache_key.outputs.cache_key }} +# pod-lib-lint: +# # 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: +# target: [ios, tvos, macos, watchos] +# build-env: +# - os: macos-14 +# xcode: Xcode_16.2 +# swift_version: 5.9 +# - os: macos-15 +# xcode: Xcode_16.2 +# swift_version: 5.9 +# - os: macos-15 +# xcode: Xcode_16.2 +# swift_version: 6.0 +# runs-on: ${{ matrix.build-env.os }} +# steps: +# - uses: actions/checkout@v4 +# - uses: ruby/setup-ruby@354a1ad156761f5ee2b7b13fa8e09943a5e8d252 # v1 +# - name: Setup Bundler +# run: scripts/setup_bundler.sh +# - name: Xcode +# run: sudo xcode-select -s /Applications/${{ matrix.build-env.xcode }}.app/Contents/Developer +# - name: Set Swift swift_version +# run: sed -i "" "s/s.swift_version[[:space:]]*=[[:space:]]*'5.9'/s.swift_version = '${{ matrix.build-env.swift_version }}'/" FirebaseCoreInternal.podspec +# - name: Build and test +# run: scripts/third_party/travis/retry.sh scripts/pod_lib_lint.rb FirebaseCoreInternal.podspec --platforms=${{ matrix.target }} spm: - # 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-package-resolved] - strategy: - matrix: - include: - - os: macos-14 - xcode: Xcode_16.2 - target: iOS - - os: macos-15 - xcode: Xcode_16.2 - target: iOS - - os: macos-15 - xcode: Xcode_16.2 - target: tvOS - - os: macos-15 - xcode: Xcode_16.2 - target: macOS - - os: macos-15 - xcode: Xcode_16.2 - target: watchOS - - os: macos-15 - xcode: Xcode_16.2 - target: catalyst - - os: macos-15 - xcode: Xcode_16.2 - target: visionOS - runs-on: ${{ matrix.os }} - steps: - - uses: actions/checkout@v4 - - uses: actions/cache/restore@v4 - with: - path: .build - key: ${{needs.spm-package-resolved.outputs.cache_key}} - - name: Initialize xcodebuild - run: scripts/setup_spm_tests.sh - - name: Xcode - run: sudo xcode-select -s /Applications/${{ matrix.xcode }}.app/Contents/Developer - - name: Install visionOS, if needed. - if: matrix.target == 'visionOS' - run: xcodebuild -downloadPlatform visionOS - - name: FirebaseCoreInternalTests - run: scripts/third_party/travis/retry.sh ./scripts/build.sh FirebaseCoreInternalTests ${{ matrix.target }} spm - - catalyst: - # 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: catalyst${{ matrix.os }} - - uses: ruby/setup-ruby@354a1ad156761f5ee2b7b13fa8e09943a5e8d252 # v1 - - name: Setup Bundler - run: scripts/setup_bundler.sh - - name: Xcode - run: sudo xcode-select -s /Applications/Xcode_16.2.app/Contents/Developer - - name: Setup Catalyst project and run unit tests - run: scripts/test_catalyst.sh FirebaseCoreInternal test FirebaseCoreInternal-Unit-Unit - - name: Setup Catalyst project and run integration tests - run: scripts/test_catalyst.sh FirebaseCoreInternal test FirebaseCoreInternal-Unit-Integration + uses: ./.github/workflows/common.yml + with: + target: FirebaseCoreInternalTests - core-internal-cron-only: - # Don't run on private repo. - if: github.event_name == 'schedule' && github.repository == 'Firebase/firebase-ios-sdk' - runs-on: macos-15 - strategy: - matrix: - target: [ios, tvos, macos] - flags: [ - '--use-static-frameworks' - ] - needs: pod-lib-lint - steps: - - uses: actions/checkout@v4 - - uses: ruby/setup-ruby@354a1ad156761f5ee2b7b13fa8e09943a5e8d252 # v1 - - name: Xcode - run: sudo xcode-select -s /Applications/Xcode_16.2.app/Contents/Developer - - name: Setup Bundler - run: scripts/setup_bundler.sh - - name: PodLibLint CoreInternal Cron - run: scripts/third_party/travis/retry.sh scripts/pod_lib_lint.rb FirebaseCoreInternal.podspec --platforms=${{ matrix.target }} ${{ matrix.flags }} +# catalyst: +# # 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: catalyst${{ matrix.os }} +# - uses: ruby/setup-ruby@354a1ad156761f5ee2b7b13fa8e09943a5e8d252 # v1 +# - name: Setup Bundler +# run: scripts/setup_bundler.sh +# - name: Xcode +# run: sudo xcode-select -s /Applications/Xcode_16.2.app/Contents/Developer +# - name: Setup Catalyst project and run unit tests +# run: scripts/test_catalyst.sh FirebaseCoreInternal test FirebaseCoreInternal-Unit-Unit +# - name: Setup Catalyst project and run integration tests +# run: scripts/test_catalyst.sh FirebaseCoreInternal test FirebaseCoreInternal-Unit-Integration +# +# core-internal-cron-only: +# # Don't run on private repo. +# if: github.event_name == 'schedule' && github.repository == 'Firebase/firebase-ios-sdk' +# runs-on: macos-15 +# strategy: +# matrix: +# target: [ios, tvos, macos] +# flags: [ +# '--use-static-frameworks' +# ] +# needs: pod-lib-lint +# steps: +# - uses: actions/checkout@v4 +# - uses: ruby/setup-ruby@354a1ad156761f5ee2b7b13fa8e09943a5e8d252 # v1 +# - name: Xcode +# run: sudo xcode-select -s /Applications/Xcode_16.2.app/Contents/Developer +# - name: Setup Bundler +# run: scripts/setup_bundler.sh +# - name: PodLibLint CoreInternal Cron +# run: scripts/third_party/travis/retry.sh scripts/pod_lib_lint.rb FirebaseCoreInternal.podspec --platforms=${{ matrix.target }} ${{ matrix.flags }} diff --git a/.github/workflows/crashlytics.yml b/.github/workflows/crashlytics.yml index e49d316e398..e8beb92ffa7 100644 --- a/.github/workflows/crashlytics.yml +++ b/.github/workflows/crashlytics.yml @@ -19,232 +19,161 @@ concurrency: jobs: - pod-lib-lint: - # 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: - target: [ios, tvos, macos, watchos --skip-tests] - flags: [ - '--use-modular-headers --skip-tests', - '' - ] - build-env: - - os: macos-14 - xcode: Xcode_16.2 - tests: - - os: macos-15 - xcode: Xcode_16.2 - tests: - runs-on: ${{ matrix.build-env.os }} - steps: - - uses: actions/checkout@v4 - - uses: ruby/setup-ruby@354a1ad156761f5ee2b7b13fa8e09943a5e8d252 # v1 - - name: Setup Bundler - run: scripts/setup_bundler.sh - - name: Xcode - run: sudo xcode-select -s /Applications/${{ matrix.build-env.xcode }}.app/Contents/Developer - - uses: nick-fields/retry@ce71cc2ab81d554ebbe88c79ab5975992d79ba08 # v3 - with: - timeout_minutes: 120 - max_attempts: 3 - retry_on: error - retry_wait_seconds: 120 - command: scripts/pod_lib_lint.rb FirebaseCrashlytics.podspec --platforms=${{ matrix.target }} ${{ matrix.build-env.tests }} ${{ matrix.flags }} - - - spm-package-resolved: - env: - FIREBASECI_USE_LATEST_GOOGLEAPPMEASUREMENT: 1 - runs-on: macos-14 - outputs: - cache_key: ${{ steps.generate_cache_key.outputs.cache_key }} - steps: - - uses: actions/checkout@v4 - - name: Xcode - run: sudo xcode-select -s /Applications/Xcode_16.2.app/Contents/Developer - - name: Generate Swift Package.resolved - id: swift_package_resolve - run: | - swift package resolve - - name: Generate cache key - id: generate_cache_key - run: | - cache_key="${{ runner.os }}-spm-${{ hashFiles('**/Package.resolved') }}" - echo "cache_key=${cache_key}" >> "$GITHUB_OUTPUT" - - uses: actions/cache/save@v4 - id: cache - with: - path: .build - key: ${{ steps.generate_cache_key.outputs.cache_key }} +# pod-lib-lint: +# # 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: +# target: [ios, tvos, macos, watchos --skip-tests] +# flags: [ +# '--use-modular-headers --skip-tests', +# '' +# ] +# build-env: +# - os: macos-14 +# xcode: Xcode_16.2 +# tests: +# - os: macos-15 +# xcode: Xcode_16.2 +# tests: +# runs-on: ${{ matrix.build-env.os }} +# steps: +# - uses: actions/checkout@v4 +# - uses: ruby/setup-ruby@354a1ad156761f5ee2b7b13fa8e09943a5e8d252 # v1 +# - name: Setup Bundler +# run: scripts/setup_bundler.sh +# - name: Xcode +# run: sudo xcode-select -s /Applications/${{ matrix.build-env.xcode }}.app/Contents/Developer +# - uses: nick-fields/retry@ce71cc2ab81d554ebbe88c79ab5975992d79ba08 # v3 +# with: +# timeout_minutes: 120 +# max_attempts: 3 +# retry_on: error +# retry_wait_seconds: 120 +# command: scripts/pod_lib_lint.rb FirebaseCrashlytics.podspec --platforms=${{ matrix.target }} ${{ matrix.build-env.tests }} ${{ matrix.flags }} spm: - # 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-package-resolved] - strategy: - matrix: - include: - - os: macos-14 - xcode: Xcode_16.2 - target: iOS - - os: macos-15 - xcode: Xcode_16.2 - target: iOS - - os: macos-15 - xcode: Xcode_16.2 - target: tvOS - - os: macos-15 - xcode: Xcode_16.2 - target: macOS - - os: macos-15 - xcode: Xcode_16.2 - target: watchOS - - os: macos-15 - xcode: Xcode_16.2 - target: catalyst - - os: macos-15 - xcode: Xcode_16.2 - target: visionOS - runs-on: ${{ matrix.os }} - steps: - - uses: actions/checkout@v4 - - uses: actions/cache/restore@v4 - with: - path: .build - key: ${{needs.spm-package-resolved.outputs.cache_key}} - - name: Xcode - run: sudo xcode-select -s /Applications/${{ matrix.xcode }}.app/Contents/Developer - - name: Install visionOS, if needed. - if: matrix.target == 'visionOS' - run: xcodebuild -downloadPlatform visionOS - - name: Initialize xcodebuild - run: scripts/setup_spm_tests.sh - - uses: nick-fields/retry@ce71cc2ab81d554ebbe88c79ab5975992d79ba08 # v3 - with: - timeout_minutes: 120 - max_attempts: 3 - retry_on: error - retry_wait_seconds: 120 - command: scripts/third_party/travis/retry.sh ./scripts/build.sh FirebaseCrashlyticsUnit ${{ matrix.target }} spm - - catalyst: - # 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: catalyst${{ matrix.os }} - - uses: ruby/setup-ruby@354a1ad156761f5ee2b7b13fa8e09943a5e8d252 # v1 - - name: Setup Bundler - run: scripts/setup_bundler.sh - - name: Xcode - run: sudo xcode-select -s /Applications/Xcode_16.2.app/Contents/Developer - - uses: nick-fields/retry@ce71cc2ab81d554ebbe88c79ab5975992d79ba08 # v3 - with: - timeout_minutes: 120 - max_attempts: 5 - retry_on: error - retry_wait_seconds: 120 - command: scripts/test_catalyst.sh FirebaseCrashlytics test FirebaseCrashlytics-Unit-unit - - quickstart: - # Don't run on private repo unless it is a PR. - if: (github.repository == 'Firebase/firebase-ios-sdk' && github.event_name == 'schedule') || github.event_name == 'pull_request' - - env: - plist_secret: ${{ secrets.GHASecretsGPGPassphrase1 }} - signin_secret: ${{ secrets.GHASecretsGPGPassphrase1 }} - runs-on: macos-15 - steps: - - uses: actions/checkout@v4 - - uses: ruby/setup-ruby@354a1ad156761f5ee2b7b13fa8e09943a5e8d252 # v1 - - name: Xcode - run: sudo xcode-select -s /Applications/Xcode_16.2.app/Contents/Developer - - name: Setup quickstart - run: scripts/setup_quickstart.sh crashlytics - env: - LEGACY: true - - name: Install Secret GoogleService-Info.plist - run: scripts/decrypt_gha_secret.sh scripts/gha-encrypted/qs-crashlytics.plist.gpg \ - quickstart-ios/crashlytics/GoogleService-Info.plist "$plist_secret" - - name: Test swift quickstart - run: | - mkdir quickstart-ios/crashlytics/LegacyCrashlyticsQuickstart/Pods/FirebaseCrashlytics - # Set the deployed pod location of run and upload-symbols with the development pod version. - cp Crashlytics/run quickstart-ios/crashlytics/LegacyCrashlyticsQuickstart/Pods/FirebaseCrashlytics/ - cp Crashlytics/upload-symbols quickstart-ios/crashlytics/LegacyCrashlyticsQuickstart/Pods/FirebaseCrashlytics/ - ([ -z $plist_secret ] || scripts/third_party/travis/retry.sh scripts/test_quickstart.sh Crashlytics true swift) - env: - LEGACY: true - - 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 }} - signin_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.2.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: - # Don't run on private repo. - if: github.event_name == 'schedule' && github.repository == 'Firebase/firebase-ios-sdk' - - runs-on: macos-15 - strategy: - matrix: - # Disable watchos because it does not support XCTest. - target: [ios, tvos, macos, watchos --skip-tests] - flags: [ - '--use-static-frameworks' - ] - needs: pod-lib-lint - steps: - - uses: actions/checkout@v4 - - uses: ruby/setup-ruby@354a1ad156761f5ee2b7b13fa8e09943a5e8d252 # v1 - - name: Setup Bundler - run: scripts/setup_bundler.sh - - name: Xcode - run: sudo xcode-select -s /Applications/Xcode_16.2.app/Contents/Developer - - uses: nick-fields/retry@ce71cc2ab81d554ebbe88c79ab5975992d79ba08 # v3 - with: - timeout_minutes: 120 - max_attempts: 3 - retry_on: error - retry_wait_seconds: 120 - command: scripts/third_party/travis/retry.sh scripts/pod_lib_lint.rb FirebaseCrashlytics.podspec --platforms=${{ matrix.target }} ${{ matrix.flags }} + uses: ./.github/workflows/common.yml + with: + target: FirebaseCrashlyticsUnit + +# catalyst: +# # 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: catalyst${{ matrix.os }} +# - uses: ruby/setup-ruby@354a1ad156761f5ee2b7b13fa8e09943a5e8d252 # v1 +# - name: Setup Bundler +# run: scripts/setup_bundler.sh +# - name: Xcode +# run: sudo xcode-select -s /Applications/Xcode_16.2.app/Contents/Developer +# - uses: nick-fields/retry@ce71cc2ab81d554ebbe88c79ab5975992d79ba08 # v3 +# with: +# timeout_minutes: 120 +# max_attempts: 5 +# retry_on: error +# retry_wait_seconds: 120 +# command: scripts/test_catalyst.sh FirebaseCrashlytics test FirebaseCrashlytics-Unit-unit +# +# quickstart: +# # Don't run on private repo unless it is a PR. +# if: (github.repository == 'Firebase/firebase-ios-sdk' && github.event_name == 'schedule') || github.event_name == 'pull_request' +# +# env: +# plist_secret: ${{ secrets.GHASecretsGPGPassphrase1 }} +# signin_secret: ${{ secrets.GHASecretsGPGPassphrase1 }} +# runs-on: macos-15 +# steps: +# - uses: actions/checkout@v4 +# - uses: ruby/setup-ruby@354a1ad156761f5ee2b7b13fa8e09943a5e8d252 # v1 +# - name: Xcode +# run: sudo xcode-select -s /Applications/Xcode_16.2.app/Contents/Developer +# - name: Setup quickstart +# run: scripts/setup_quickstart.sh crashlytics +# env: +# LEGACY: true +# - name: Install Secret GoogleService-Info.plist +# run: scripts/decrypt_gha_secret.sh scripts/gha-encrypted/qs-crashlytics.plist.gpg \ +# quickstart-ios/crashlytics/GoogleService-Info.plist "$plist_secret" +# - name: Test swift quickstart +# run: | +# mkdir quickstart-ios/crashlytics/LegacyCrashlyticsQuickstart/Pods/FirebaseCrashlytics +# # Set the deployed pod location of run and upload-symbols with the development pod version. +# cp Crashlytics/run quickstart-ios/crashlytics/LegacyCrashlyticsQuickstart/Pods/FirebaseCrashlytics/ +# cp Crashlytics/upload-symbols quickstart-ios/crashlytics/LegacyCrashlyticsQuickstart/Pods/FirebaseCrashlytics/ +# ([ -z $plist_secret ] || scripts/third_party/travis/retry.sh scripts/test_quickstart.sh Crashlytics true swift) +# env: +# LEGACY: true +# +# 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 }} +# signin_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.2.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: +# # Don't run on private repo. +# if: github.event_name == 'schedule' && github.repository == 'Firebase/firebase-ios-sdk' +# +# runs-on: macos-15 +# strategy: +# matrix: +# # Disable watchos because it does not support XCTest. +# target: [ios, tvos, macos, watchos --skip-tests] +# flags: [ +# '--use-static-frameworks' +# ] +# needs: pod-lib-lint +# steps: +# - uses: actions/checkout@v4 +# - uses: ruby/setup-ruby@354a1ad156761f5ee2b7b13fa8e09943a5e8d252 # v1 +# - name: Setup Bundler +# run: scripts/setup_bundler.sh +# - name: Xcode +# run: sudo xcode-select -s /Applications/Xcode_16.2.app/Contents/Developer +# - uses: nick-fields/retry@ce71cc2ab81d554ebbe88c79ab5975992d79ba08 # v3 +# with: +# timeout_minutes: 120 +# max_attempts: 3 +# retry_on: error +# retry_wait_seconds: 120 +# command: scripts/third_party/travis/retry.sh scripts/pod_lib_lint.rb FirebaseCrashlytics.podspec --platforms=${{ matrix.target }} ${{ matrix.flags }} diff --git a/.github/workflows/database.yml b/.github/workflows/database.yml index 4f6ef256257..d4c08c3e84a 100644 --- a/.github/workflows/database.yml +++ b/.github/workflows/database.yml @@ -21,174 +21,113 @@ concurrency: cancel-in-progress: true jobs: - pod-lib-lint: - # 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: - target: [ios, tvos, macos --skip-tests, watchos] - build-env: - - os: macos-14 - xcode: Xcode_16.2 - - os: macos-15 - xcode: Xcode_16.2 - runs-on: ${{ matrix.build-env.os }} - steps: - - uses: actions/checkout@v4 - - uses: ruby/setup-ruby@354a1ad156761f5ee2b7b13fa8e09943a5e8d252 # v1 - - name: Setup Bundler - run: scripts/setup_bundler.sh - - name: Xcode - run: sudo xcode-select -s /Applications/${{ matrix.build-env.xcode }}.app/Contents/Developer - - name: Build and test - run: scripts/third_party/travis/retry.sh scripts/pod_lib_lint.rb FirebaseDatabase.podspec --test-specs=unit --platforms=${{ matrix.target }} - - 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.2.app/Contents/Developer - - name: IntegrationTest - # Only iOS to mitigate flakes. - run: scripts/third_party/travis/retry.sh scripts/build.sh Database iOS integration - - spm-package-resolved: - env: - FIREBASECI_USE_LATEST_GOOGLEAPPMEASUREMENT: 1 - runs-on: macos-14 - outputs: - cache_key: ${{ steps.generate_cache_key.outputs.cache_key }} - steps: - - uses: actions/checkout@v4 - - name: Xcode - run: sudo xcode-select -s /Applications/Xcode_16.2.app/Contents/Developer - - name: Generate Swift Package.resolved - id: swift_package_resolve - run: | - swift package resolve - - name: Generate cache key - id: generate_cache_key - run: | - cache_key="${{ runner.os }}-spm-${{ hashFiles('**/Package.resolved') }}" - echo "cache_key=${cache_key}" >> "$GITHUB_OUTPUT" - - uses: actions/cache/save@v4 - id: cache - with: - path: .build - key: ${{ steps.generate_cache_key.outputs.cache_key }} +# pod-lib-lint: +# # 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: +# target: [ios, tvos, macos --skip-tests, watchos] +# build-env: +# - os: macos-14 +# xcode: Xcode_16.2 +# - os: macos-15 +# xcode: Xcode_16.2 +# runs-on: ${{ matrix.build-env.os }} +# steps: +# - uses: actions/checkout@v4 +# - uses: ruby/setup-ruby@354a1ad156761f5ee2b7b13fa8e09943a5e8d252 # v1 +# - name: Setup Bundler +# run: scripts/setup_bundler.sh +# - name: Xcode +# run: sudo xcode-select -s /Applications/${{ matrix.build-env.xcode }}.app/Contents/Developer +# - name: Build and test +# run: scripts/third_party/travis/retry.sh scripts/pod_lib_lint.rb FirebaseDatabase.podspec --test-specs=unit --platforms=${{ matrix.target }} +# +# 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.2.app/Contents/Developer +# - name: IntegrationTest +# # Only iOS to mitigate flakes. +# run: scripts/third_party/travis/retry.sh scripts/build.sh Database iOS integration spm: - # 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-package-resolved] strategy: matrix: - include: - - os: macos-14 - xcode: Xcode_16.2 - target: iOS - - os: macos-15 - xcode: Xcode_16.2 - target: iOS - - os: macos-15 - xcode: Xcode_16.2 - target: tvOS - - os: macos-15 - xcode: Xcode_16.2 - target: macOS - - os: macos-15 - xcode: Xcode_16.2 - target: watchOS - - os: macos-15 - xcode: Xcode_16.2 - target: catalyst - - os: macos-15 - xcode: Xcode_16.2 - target: visionOS - runs-on: ${{ matrix.os }} - steps: - - uses: actions/checkout@v4 - - uses: actions/cache/restore@v4 - with: - path: .build - key: ${{needs.spm-package-resolved.outputs.cache_key}} - - name: Xcode - run: sudo xcode-select -s /Applications/${{ matrix.xcode }}.app/Contents/Developer - - name: Initialize xcodebuild - run: scripts/setup_spm_tests.sh - - name: Unit Tests - run: scripts/third_party/travis/retry.sh ./scripts/build.sh DatabaseUnit ${{ matrix.target }} spm - - name: iOS Swift Unit Tests - run: scripts/third_party/travis/retry.sh ./scripts/build.sh DatabaseUnitSwift ${{ matrix.target }} spm + target: [DatabaseUnit, DatabaseUnitSwift] + uses: ./.github/workflows/common.yml + with: + target: ${{ matrix.target }} - catalyst: - # 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: catalyst${{ matrix.os }} - - uses: ruby/setup-ruby@354a1ad156761f5ee2b7b13fa8e09943a5e8d252 # v1 - - name: Setup Bundler - run: scripts/setup_bundler.sh - - name: Xcode - run: sudo xcode-select -s /Applications/Xcode_16.2.app/Contents/Developer - - name: Setup project and Build for Catalyst - run: scripts/test_catalyst.sh FirebaseDatabase test FirebaseDatabase-Unit-unit - - quickstart: - # Don't run on private repo unless it is a PR. - if: (github.repository == 'Firebase/firebase-ios-sdk' && github.event_name == 'schedule') || github.event_name == 'pull_request' - env: - plist_secret: ${{ secrets.GHASecretsGPGPassphrase1 }} - signin_secret: ${{ secrets.GHASecretsGPGPassphrase1 }} - runs-on: macos-15 - steps: - - uses: actions/checkout@v4 - - uses: ruby/setup-ruby@354a1ad156761f5ee2b7b13fa8e09943a5e8d252 # v1 - - name: Setup quickstart - run: scripts/setup_quickstart.sh database - - name: Install Secret GoogleService-Info.plist - run: scripts/decrypt_gha_secret.sh scripts/gha-encrypted/qs-database.plist.gpg \ - quickstart-ios/database/GoogleService-Info.plist "$plist_secret" - - name: Xcode - run: sudo xcode-select -s /Applications/Xcode_16.2.app/Contents/Developer - - name: Test objc quickstart - run: ([ -z $plist_secret ] || scripts/third_party/travis/retry.sh scripts/test_quickstart.sh Database false) - - name: Test swift quickstart - run: ([ -z $plist_secret ] || scripts/third_party/travis/retry.sh scripts/test_quickstart.sh Database false swift) - - database-cron-only: - # Don't run on private repo. - if: github.event_name == 'schedule' && github.repository == 'Firebase/firebase-ios-sdk' - runs-on: macos-15 - strategy: - matrix: - podspec: [FirebaseDatabase.podspec] - target: [ios, tvos, macos] - flags: [ - '--skip-tests --use-static-frameworks' - ] - needs: pod-lib-lint - steps: - - uses: actions/checkout@v4 - - uses: ruby/setup-ruby@354a1ad156761f5ee2b7b13fa8e09943a5e8d252 # v1 - - name: Xcode - run: sudo xcode-select -s /Applications/Xcode_16.2.app/Contents/Developer - - name: Setup Bundler - run: scripts/setup_bundler.sh - - name: PodLibLint database Cron - run: scripts/third_party/travis/retry.sh scripts/pod_lib_lint.rb ${{ matrix.podspec }} --platforms=${{ matrix.target }} ${{ matrix.flags }} +# catalyst: +# # 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: catalyst${{ matrix.os }} +# - uses: ruby/setup-ruby@354a1ad156761f5ee2b7b13fa8e09943a5e8d252 # v1 +# - name: Setup Bundler +# run: scripts/setup_bundler.sh +# - name: Xcode +# run: sudo xcode-select -s /Applications/Xcode_16.2.app/Contents/Developer +# - name: Setup project and Build for Catalyst +# run: scripts/test_catalyst.sh FirebaseDatabase test FirebaseDatabase-Unit-unit +# +# quickstart: +# # Don't run on private repo unless it is a PR. +# if: (github.repository == 'Firebase/firebase-ios-sdk' && github.event_name == 'schedule') || github.event_name == 'pull_request' +# env: +# plist_secret: ${{ secrets.GHASecretsGPGPassphrase1 }} +# signin_secret: ${{ secrets.GHASecretsGPGPassphrase1 }} +# runs-on: macos-15 +# steps: +# - uses: actions/checkout@v4 +# - uses: ruby/setup-ruby@354a1ad156761f5ee2b7b13fa8e09943a5e8d252 # v1 +# - name: Setup quickstart +# run: scripts/setup_quickstart.sh database +# - name: Install Secret GoogleService-Info.plist +# run: scripts/decrypt_gha_secret.sh scripts/gha-encrypted/qs-database.plist.gpg \ +# quickstart-ios/database/GoogleService-Info.plist "$plist_secret" +# - name: Xcode +# run: sudo xcode-select -s /Applications/Xcode_16.2.app/Contents/Developer +# - name: Test objc quickstart +# run: ([ -z $plist_secret ] || scripts/third_party/travis/retry.sh scripts/test_quickstart.sh Database false) +# - name: Test swift quickstart +# run: ([ -z $plist_secret ] || scripts/third_party/travis/retry.sh scripts/test_quickstart.sh Database false swift) +# +# database-cron-only: +# # Don't run on private repo. +# if: github.event_name == 'schedule' && github.repository == 'Firebase/firebase-ios-sdk' +# runs-on: macos-15 +# strategy: +# matrix: +# podspec: [FirebaseDatabase.podspec] +# target: [ios, tvos, macos] +# flags: [ +# '--skip-tests --use-static-frameworks' +# ] +# needs: pod-lib-lint +# steps: +# - uses: actions/checkout@v4 +# - uses: ruby/setup-ruby@354a1ad156761f5ee2b7b13fa8e09943a5e8d252 # v1 +# - name: Xcode +# run: sudo xcode-select -s /Applications/Xcode_16.2.app/Contents/Developer +# - name: Setup Bundler +# run: scripts/setup_bundler.sh +# - name: PodLibLint database Cron +# run: scripts/third_party/travis/retry.sh scripts/pod_lib_lint.rb ${{ matrix.podspec }} --platforms=${{ matrix.target }} ${{ matrix.flags }} From e62498d95b4c6fe6399df6fb2ee15be9abf4da8d Mon Sep 17 00:00:00 2001 From: Nick Cooke Date: Fri, 18 Apr 2025 17:40:01 -0400 Subject: [PATCH 08/24] more migration --- .github/workflows/abtesting.yml | 9 +- .github/workflows/core.yml | 9 +- .github/workflows/core_internal.yml | 9 +- .github/workflows/crashlytics.yml | 10 +- .github/workflows/database.yml | 16 +- .github/workflows/mlmodeldownloader.yml | 264 ++++++--------- .github/workflows/sessions.yml | 185 ++++------- .github/workflows/shared-swift.yml | 113 ++----- .github/workflows/storage.yml | 417 ++++++++++-------------- .github/workflows/vertexai.yml | 214 ++++-------- 10 files changed, 462 insertions(+), 784 deletions(-) diff --git a/.github/workflows/abtesting.yml b/.github/workflows/abtesting.yml index d9f327d53b2..805876cbeb9 100644 --- a/.github/workflows/abtesting.yml +++ b/.github/workflows/abtesting.yml @@ -17,6 +17,10 @@ concurrency: cancel-in-progress: true jobs: + spm: + uses: ./.github/workflows/common.yml + with: + target: ABTestingUnit # pod-lib-lint: # # 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' @@ -55,11 +59,6 @@ jobs: # retry_wait_seconds: 120 # command: scripts/pod_lib_lint.rb FirebaseABTesting.podspec --platforms=${{ matrix.target }} -# spm: -# uses: ./.github/workflows/common.yml -# with: -# target: ABTestingUnit - # catalyst: # # 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' diff --git a/.github/workflows/core.yml b/.github/workflows/core.yml index 5e20c80b20f..acf499ed63f 100644 --- a/.github/workflows/core.yml +++ b/.github/workflows/core.yml @@ -16,6 +16,10 @@ concurrency: cancel-in-progress: true jobs: + spm: + uses: ./.github/workflows/common.yml + with: + target: CoreUnit # pod-lib-lint: # # 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' @@ -67,11 +71,6 @@ jobs: # path: .build # key: ${{ steps.generate_cache_key.outputs.cache_key }} -# spm: -# uses: ./.github/workflows/common.yml -# with: -# target: CoreUnit - # catalyst: # # 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' diff --git a/.github/workflows/core_internal.yml b/.github/workflows/core_internal.yml index 43db42820dd..ef37b23a54c 100644 --- a/.github/workflows/core_internal.yml +++ b/.github/workflows/core_internal.yml @@ -13,6 +13,10 @@ on: - cron: '0 10 * * *' jobs: + spm: + uses: ./.github/workflows/common.yml + with: + target: FirebaseCoreInternalTests # pod-lib-lint: # # 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' @@ -42,11 +46,6 @@ jobs: # - name: Build and test # run: scripts/third_party/travis/retry.sh scripts/pod_lib_lint.rb FirebaseCoreInternal.podspec --platforms=${{ matrix.target }} - spm: - uses: ./.github/workflows/common.yml - with: - target: FirebaseCoreInternalTests - # catalyst: # # 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' diff --git a/.github/workflows/crashlytics.yml b/.github/workflows/crashlytics.yml index e8beb92ffa7..046883dd90c 100644 --- a/.github/workflows/crashlytics.yml +++ b/.github/workflows/crashlytics.yml @@ -18,7 +18,10 @@ concurrency: cancel-in-progress: true jobs: - + spm: + uses: ./.github/workflows/common.yml + with: + target: FirebaseCrashlyticsUnit # pod-lib-lint: # # 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' @@ -53,11 +56,6 @@ jobs: # retry_wait_seconds: 120 # command: scripts/pod_lib_lint.rb FirebaseCrashlytics.podspec --platforms=${{ matrix.target }} ${{ matrix.build-env.tests }} ${{ matrix.flags }} - spm: - uses: ./.github/workflows/common.yml - with: - target: FirebaseCrashlyticsUnit - # catalyst: # # 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' diff --git a/.github/workflows/database.yml b/.github/workflows/database.yml index d4c08c3e84a..dabca273648 100644 --- a/.github/workflows/database.yml +++ b/.github/workflows/database.yml @@ -21,6 +21,14 @@ concurrency: cancel-in-progress: true jobs: + spm: + strategy: + matrix: + target: [DatabaseUnit, DatabaseUnitSwift] + uses: ./.github/workflows/common.yml + with: + target: ${{ matrix.target }} + # pod-lib-lint: # # 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' @@ -63,14 +71,6 @@ jobs: # # Only iOS to mitigate flakes. # run: scripts/third_party/travis/retry.sh scripts/build.sh Database iOS integration - spm: - strategy: - matrix: - target: [DatabaseUnit, DatabaseUnitSwift] - uses: ./.github/workflows/common.yml - with: - target: ${{ matrix.target }} - # catalyst: # # 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' diff --git a/.github/workflows/mlmodeldownloader.yml b/.github/workflows/mlmodeldownloader.yml index b68db76e5c7..41d42d6eff0 100644 --- a/.github/workflows/mlmodeldownloader.yml +++ b/.github/workflows/mlmodeldownloader.yml @@ -16,169 +16,105 @@ concurrency: cancel-in-progress: true jobs: - pod-lib-lint: - if: (github.repository == 'Firebase/firebase-ios-sdk' && github.event_name == 'schedule') || github.event_name == 'pull_request' - env: - plist_secret: ${{ secrets.GHASecretsGPGPassphrase1 }} - strategy: - matrix: - target: [ios, tvos, macos, watchos] - build-env: - - os: macos-14 - xcode: Xcode_16.2 - - os: macos-15 - xcode: Xcode_16.2 - runs-on: ${{ matrix.build-env.os }} - steps: - - uses: actions/checkout@v4 - - uses: ruby/setup-ruby@354a1ad156761f5ee2b7b13fa8e09943a5e8d252 # v1 - - name: Setup Bundler - run: scripts/setup_bundler.sh - - name: Configure test keychain - run: scripts/configure_test_keychain.sh - - name: Install GoogleService-Info.plist - run: | - mkdir FirebaseMLModelDownloader/Tests/Integration/Resources - scripts/decrypt_gha_secret.sh scripts/gha-encrypted/MLModelDownloader/GoogleService-Info.plist.gpg \ - FirebaseMLModelDownloader/Tests/Integration/Resources/GoogleService-Info.plist "$plist_secret" - - name: Xcode - run: sudo xcode-select -s /Applications/${{ matrix.build-env.xcode }}.app/Contents/Developer - - name: Build and test - run: ([ -z $plist_secret ] || scripts/third_party/travis/retry.sh scripts/pod_lib_lint.rb FirebaseMLModelDownloader.podspec --platforms=${{ matrix.target }}) - - mlmodeldownloader-cron-only: - if: github.event_name == 'schedule' && github.repository == 'Firebase/firebase-ios-sdk' - runs-on: macos-15 - env: - plist_secret: ${{ secrets.GHASecretsGPGPassphrase1 }} - strategy: - matrix: - target: [ios, tvos, macos] - needs: pod-lib-lint - steps: - - uses: actions/checkout@v4 - - uses: ruby/setup-ruby@354a1ad156761f5ee2b7b13fa8e09943a5e8d252 # v1 - - name: Xcode - run: sudo xcode-select -s /Applications/Xcode_16.2.app/Contents/Developer - - name: Setup Bundler - run: scripts/setup_bundler.sh - - name: Configure test keychain - run: scripts/configure_test_keychain.sh - - name: Install GoogleService-Info.plist - run: | - mkdir FirebaseMLModelDownloader/Tests/Integration/Resources - scripts/decrypt_gha_secret.sh scripts/gha-encrypted/MLModelDownloader/GoogleService-Info.plist.gpg \ - FirebaseMLModelDownloader/Tests/Integration/Resources/GoogleService-Info.plist "$plist_secret" - - name: PodLibLint MLModelDownloader Cron - run: scripts/third_party/travis/retry.sh scripts/pod_lib_lint.rb FirebaseMLModelDownloader.podspec --platforms=${{ matrix.target }} --use-static-frameworks - - spm-package-resolved: - env: - FIREBASECI_USE_LATEST_GOOGLEAPPMEASUREMENT: 1 - runs-on: macos-14 - outputs: - cache_key: ${{ steps.generate_cache_key.outputs.cache_key }} - steps: - - uses: actions/checkout@v4 - - name: Xcode - run: sudo xcode-select -s /Applications/Xcode_16.2.app/Contents/Developer - - name: Generate Swift Package.resolved - id: swift_package_resolve - run: | - swift package resolve - - name: Generate cache key - id: generate_cache_key - run: | - cache_key="${{ runner.os }}-spm-${{ hashFiles('**/Package.resolved') }}" - echo "cache_key=${cache_key}" >> "$GITHUB_OUTPUT" - - uses: actions/cache/save@v4 - id: cache - with: - path: .build - key: ${{ steps.generate_cache_key.outputs.cache_key }} - spm: - if: (github.repository == 'Firebase/firebase-ios-sdk' && github.event_name == 'schedule') || github.event_name == 'pull_request' - needs: [spm-package-resolved] - strategy: - matrix: - include: - - os: macos-14 - xcode: Xcode_16.2 - target: iOS - - os: macos-15 - xcode: Xcode_16.2 - target: iOS - - os: macos-15 - xcode: Xcode_16.2 - target: tvOS - - os: macos-15 - xcode: Xcode_16.2 - target: macOS - - os: macos-15 - xcode: Xcode_16.2 - target: watchOS - - os: macos-15 - xcode: Xcode_16.2 - target: catalyst - - os: macos-15 - xcode: Xcode_16.2 - target: visionOS - runs-on: ${{ matrix.os }} - steps: - - uses: actions/checkout@v4 - - uses: actions/cache/restore@v4 - with: - path: .build - key: ${{needs.spm-package-resolved.outputs.cache_key}} - - name: Xcode - run: sudo xcode-select -s /Applications/${{ matrix.xcode }}.app/Contents/Developer - - name: Install visionOS, if needed. - if: matrix.target == 'visionOS' - run: xcodebuild -downloadPlatform visionOS - - name: Initialize xcodebuild - run: scripts/setup_spm_tests.sh - - name: Unit Tests - run: scripts/third_party/travis/retry.sh ./scripts/build.sh FirebaseMLModelDownloaderUnit ${{ matrix.target }} spm - - catalyst: - 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: catalyst${{ matrix.os }} - - uses: ruby/setup-ruby@354a1ad156761f5ee2b7b13fa8e09943a5e8d252 # v1 - - name: Setup Bundler - run: scripts/setup_bundler.sh - - name: Xcode - run: sudo xcode-select -s /Applications/Xcode_16.2.app/Contents/Developer - - name: Setup project and Build Catalyst - run: scripts/test_catalyst.sh FirebaseMLModelDownloader test FirebaseMLModelDownloader-Unit-unit + uses: ./.github/workflows/common.yml + with: + target: FirebaseMLModelDownloaderUnit - mlmodeldownloader-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: build-test${{ matrix.os }} - - uses: ruby/setup-ruby@354a1ad156761f5ee2b7b13fa8e09943a5e8d252 # v1 - - name: Xcode - run: sudo xcode-select -s /Applications/Xcode_16.2.app/Contents/Developer - - name: Setup Bundler - run: scripts/setup_bundler.sh - - name: Install GoogleService-Info.plist - run: | - mkdir FirebaseMLModelDownloader/Apps/Sample/Resources - scripts/decrypt_gha_secret.sh scripts/gha-encrypted/MLModelDownloader/GoogleService-Info.plist.gpg \ - FirebaseMLModelDownloader/Apps/Sample/Resources/GoogleService-Info.plist "$plist_secret" - - name: Prereqs - run: scripts/install_prereqs.sh MLModelDownloaderSample iOS - - name: Build - run: ([ -z $plist_secret ] || scripts/build.sh MLModelDownloaderSample iOS) +# pod-lib-lint: +# if: (github.repository == 'Firebase/firebase-ios-sdk' && github.event_name == 'schedule') || github.event_name == 'pull_request' +# env: +# plist_secret: ${{ secrets.GHASecretsGPGPassphrase1 }} +# strategy: +# matrix: +# target: [ios, tvos, macos, watchos] +# build-env: +# - os: macos-14 +# xcode: Xcode_16.2 +# - os: macos-15 +# xcode: Xcode_16.2 +# runs-on: ${{ matrix.build-env.os }} +# steps: +# - uses: actions/checkout@v4 +# - uses: ruby/setup-ruby@354a1ad156761f5ee2b7b13fa8e09943a5e8d252 # v1 +# - name: Setup Bundler +# run: scripts/setup_bundler.sh +# - name: Configure test keychain +# run: scripts/configure_test_keychain.sh +# - name: Install GoogleService-Info.plist +# run: | +# mkdir FirebaseMLModelDownloader/Tests/Integration/Resources +# scripts/decrypt_gha_secret.sh scripts/gha-encrypted/MLModelDownloader/GoogleService-Info.plist.gpg \ +# FirebaseMLModelDownloader/Tests/Integration/Resources/GoogleService-Info.plist "$plist_secret" +# - name: Xcode +# run: sudo xcode-select -s /Applications/${{ matrix.build-env.xcode }}.app/Contents/Developer +# - name: Build and test +# run: ([ -z $plist_secret ] || scripts/third_party/travis/retry.sh scripts/pod_lib_lint.rb FirebaseMLModelDownloader.podspec --platforms=${{ matrix.target }}) +# +# mlmodeldownloader-cron-only: +# if: github.event_name == 'schedule' && github.repository == 'Firebase/firebase-ios-sdk' +# runs-on: macos-15 +# env: +# plist_secret: ${{ secrets.GHASecretsGPGPassphrase1 }} +# strategy: +# matrix: +# target: [ios, tvos, macos] +# needs: pod-lib-lint +# steps: +# - uses: actions/checkout@v4 +# - uses: ruby/setup-ruby@354a1ad156761f5ee2b7b13fa8e09943a5e8d252 # v1 +# - name: Xcode +# run: sudo xcode-select -s /Applications/Xcode_16.2.app/Contents/Developer +# - name: Setup Bundler +# run: scripts/setup_bundler.sh +# - name: Configure test keychain +# run: scripts/configure_test_keychain.sh +# - name: Install GoogleService-Info.plist +# run: | +# mkdir FirebaseMLModelDownloader/Tests/Integration/Resources +# scripts/decrypt_gha_secret.sh scripts/gha-encrypted/MLModelDownloader/GoogleService-Info.plist.gpg \ +# FirebaseMLModelDownloader/Tests/Integration/Resources/GoogleService-Info.plist "$plist_secret" +# - name: PodLibLint MLModelDownloader Cron +# run: scripts/third_party/travis/retry.sh scripts/pod_lib_lint.rb FirebaseMLModelDownloader.podspec --platforms=${{ matrix.target }} --use-static-frameworks +# +# catalyst: +# 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: catalyst${{ matrix.os }} +# - uses: ruby/setup-ruby@354a1ad156761f5ee2b7b13fa8e09943a5e8d252 # v1 +# - name: Setup Bundler +# run: scripts/setup_bundler.sh +# - name: Xcode +# run: sudo xcode-select -s /Applications/Xcode_16.2.app/Contents/Developer +# - name: Setup project and Build Catalyst +# run: scripts/test_catalyst.sh FirebaseMLModelDownloader test FirebaseMLModelDownloader-Unit-unit +# +# mlmodeldownloader-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: build-test${{ matrix.os }} +# - uses: ruby/setup-ruby@354a1ad156761f5ee2b7b13fa8e09943a5e8d252 # v1 +# - name: Xcode +# run: sudo xcode-select -s /Applications/Xcode_16.2.app/Contents/Developer +# - name: Setup Bundler +# run: scripts/setup_bundler.sh +# - name: Install GoogleService-Info.plist +# run: | +# mkdir FirebaseMLModelDownloader/Apps/Sample/Resources +# scripts/decrypt_gha_secret.sh scripts/gha-encrypted/MLModelDownloader/GoogleService-Info.plist.gpg \ +# FirebaseMLModelDownloader/Apps/Sample/Resources/GoogleService-Info.plist "$plist_secret" +# - name: Prereqs +# run: scripts/install_prereqs.sh MLModelDownloaderSample iOS +# - name: Build +# run: ([ -z $plist_secret ] || scripts/build.sh MLModelDownloaderSample iOS) diff --git a/.github/workflows/sessions.yml b/.github/workflows/sessions.yml index 4fbd1ccb643..b37c7f049b1 100644 --- a/.github/workflows/sessions.yml +++ b/.github/workflows/sessions.yml @@ -17,132 +17,61 @@ concurrency: cancel-in-progress: true jobs: - - pod-lib-lint: - # 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: - target: [ios, tvos, macos, watchos] - build-env: - - os: macos-14 - xcode: Xcode_16.2 - tests: - # Flaky tests on CI - - os: macos-15 - xcode: Xcode_16.2 - tests: --skip-tests - runs-on: ${{ matrix.build-env.os }} - steps: - - uses: actions/checkout@v4 - - uses: ruby/setup-ruby@354a1ad156761f5ee2b7b13fa8e09943a5e8d252 # v1 - - name: Setup Bundler - run: scripts/setup_bundler.sh - - name: Xcode - run: sudo xcode-select -s /Applications/${{ matrix.build-env.xcode }}.app/Contents/Developer - - uses: nick-fields/retry@ce71cc2ab81d554ebbe88c79ab5975992d79ba08 # v3 - with: - timeout_minutes: 120 - max_attempts: 3 - retry_on: error - retry_wait_seconds: 120 - command: scripts/third_party/travis/retry.sh scripts/pod_lib_lint.rb FirebaseSessions.podspec --platforms=${{ matrix.target }} ${{ matrix.build-env.tests }} - - spm-package-resolved: - env: - FIREBASECI_USE_LATEST_GOOGLEAPPMEASUREMENT: 1 - runs-on: macos-15 - outputs: - cache_key: ${{ steps.generate_cache_key.outputs.cache_key }} - steps: - - uses: actions/checkout@v4 - - name: Xcode - run: sudo xcode-select -s /Applications/Xcode_16.2.app/Contents/Developer - - name: Generate Swift Package.resolved - id: swift_package_resolve - run: | - swift package resolve - - name: Generate cache key - id: generate_cache_key - run: | - cache_key="${{ runner.os }}-spm-${{ hashFiles('**/Package.resolved') }}" - echo "cache_key=${cache_key}" >> "$GITHUB_OUTPUT" - - uses: actions/cache/save@v4 - id: cache - with: - path: .build - key: ${{ steps.generate_cache_key.outputs.cache_key }} - spm: - # 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-package-resolved] - strategy: - matrix: - include: - - os: macos-14 - xcode: Xcode_16.2 - target: iOS - - os: macos-15 - xcode: Xcode_16.2 - target: iOS - - os: macos-15 - xcode: Xcode_16.2 - target: tvOS - - os: macos-15 - xcode: Xcode_16.2 - target: macOS - - os: macos-15 - xcode: Xcode_16.2 - target: watchOS - - os: macos-15 - xcode: Xcode_16.2 - target: catalyst - - os: macos-15 - xcode: Xcode_16.2 - target: visionOS - runs-on: ${{ matrix.os }} - steps: - - uses: actions/checkout@v4 - - uses: actions/cache/restore@v4 - with: - path: .build - key: ${{needs.spm-package-resolved.outputs.cache_key}} - - name: Xcode - run: sudo xcode-select -s /Applications/${{ matrix.xcode }}.app/Contents/Developer - - name: Install visionOS, if needed. - if: matrix.target == 'visionOS' - run: xcodebuild -downloadPlatform visionOS - - name: Initialize xcodebuild - run: scripts/setup_spm_tests.sh - - uses: nick-fields/retry@ce71cc2ab81d554ebbe88c79ab5975992d79ba08 # v3 - with: - timeout_minutes: 120 - max_attempts: 3 - retry_on: error - retry_wait_seconds: 120 - command: scripts/third_party/travis/retry.sh ./scripts/build.sh FirebaseSessionsUnit ${{ matrix.target }} spm - - catalyst: - # 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: catalyst${{ matrix.os }} - - uses: ruby/setup-ruby@354a1ad156761f5ee2b7b13fa8e09943a5e8d252 # v1 - - name: Setup Bundler - run: scripts/setup_bundler.sh - - name: Xcode - run: sudo xcode-select -s /Applications/Xcode_16.2.app/Contents/Developer - - uses: nick-fields/retry@ce71cc2ab81d554ebbe88c79ab5975992d79ba08 # v3 - with: - timeout_minutes: 120 - max_attempts: 3 - retry_on: error - retry_wait_seconds: 120 - command: scripts/test_catalyst.sh FirebaseSessions test FirebaseSessions-Unit-unit + uses: ./.github/workflows/common.yml + with: + target: FirebaseSessionsUnit +# +# pod-lib-lint: +# # 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: +# target: [ios, tvos, macos, watchos] +# build-env: +# - os: macos-14 +# xcode: Xcode_16.2 +# tests: +# # Flaky tests on CI +# - os: macos-15 +# xcode: Xcode_16.2 +# tests: --skip-tests +# runs-on: ${{ matrix.build-env.os }} +# steps: +# - uses: actions/checkout@v4 +# - uses: ruby/setup-ruby@354a1ad156761f5ee2b7b13fa8e09943a5e8d252 # v1 +# - name: Setup Bundler +# run: scripts/setup_bundler.sh +# - name: Xcode +# run: sudo xcode-select -s /Applications/${{ matrix.build-env.xcode }}.app/Contents/Developer +# - uses: nick-fields/retry@ce71cc2ab81d554ebbe88c79ab5975992d79ba08 # v3 +# with: +# timeout_minutes: 120 +# max_attempts: 3 +# retry_on: error +# retry_wait_seconds: 120 +# command: scripts/third_party/travis/retry.sh scripts/pod_lib_lint.rb FirebaseSessions.podspec --platforms=${{ matrix.target }} ${{ matrix.build-env.tests }} +# +# catalyst: +# # 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: catalyst${{ matrix.os }} +# - uses: ruby/setup-ruby@354a1ad156761f5ee2b7b13fa8e09943a5e8d252 # v1 +# - name: Setup Bundler +# run: scripts/setup_bundler.sh +# - name: Xcode +# run: sudo xcode-select -s /Applications/Xcode_16.2.app/Contents/Developer +# - uses: nick-fields/retry@ce71cc2ab81d554ebbe88c79ab5975992d79ba08 # v3 +# with: +# timeout_minutes: 120 +# max_attempts: 3 +# retry_on: error +# retry_wait_seconds: 120 +# command: scripts/test_catalyst.sh FirebaseSessions test FirebaseSessions-Unit-unit diff --git a/.github/workflows/shared-swift.yml b/.github/workflows/shared-swift.yml index 4975512fcf2..ed19242e07c 100644 --- a/.github/workflows/shared-swift.yml +++ b/.github/workflows/shared-swift.yml @@ -17,84 +17,37 @@ concurrency: cancel-in-progress: true jobs: - - pod-lib-lint: - # 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: - target: [ios, tvos, macos, watchos] - build-env: - - os: macos-14 - xcode: Xcode_16.2 - swift_version: 5.9 - - os: macos-15 - xcode: Xcode_16.2 - swift_version: 5.9 - - os: macos-15 - xcode: Xcode_16.2 - swift_version: 6.0 - runs-on: ${{ matrix.build-env.os }} - steps: - - uses: actions/checkout@v4 - - uses: ruby/setup-ruby@354a1ad156761f5ee2b7b13fa8e09943a5e8d252 # v1 - - name: Setup Bundler - run: scripts/setup_bundler.sh - - name: Xcode - run: sudo xcode-select -s /Applications/${{ matrix.build-env.xcode }}.app/Contents/Developer - - name: Set Swift swift_version - run: sed -i "" "s/s.swift_version[[:space:]]*=[[:space:]]*'5.9'/s.swift_version = '${{ matrix.build-env.swift_version }}'/" FirebaseSharedSwift.podspec - - name: Build and test - run: scripts/third_party/travis/retry.sh scripts/pod_lib_lint.rb FirebaseSharedSwift.podspec --platforms=${{ matrix.target }} - - spm-package-resolved: - env: - FIREBASECI_USE_LATEST_GOOGLEAPPMEASUREMENT: 1 - runs-on: macos-14 - outputs: - cache_key: ${{ steps.generate_cache_key.outputs.cache_key }} - steps: - - uses: actions/checkout@v4 - - name: Xcode - run: sudo xcode-select -s /Applications/Xcode_16.2.app/Contents/Developer - - name: Generate Swift Package.resolved - id: swift_package_resolve - run: | - swift package resolve - - name: Generate cache key - id: generate_cache_key - run: | - cache_key="${{ runner.os }}-spm-${{ hashFiles('**/Package.resolved') }}" - echo "cache_key=${cache_key}" >> "$GITHUB_OUTPUT" - - uses: actions/cache/save@v4 - id: cache - with: - path: .build - key: ${{ steps.generate_cache_key.outputs.cache_key }} - spm: - # 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-package-resolved] - strategy: - matrix: - target: [iOS, tvOS, macOS, catalyst, watchOS] - build-env: - - os: macos-14 - xcode: Xcode_16.2 - - os: macos-15 - xcode: Xcode_16.2 - runs-on: ${{ matrix.build-env.os }} - steps: - - uses: actions/checkout@v4 - - uses: actions/cache/restore@v4 - with: - path: .build - key: ${{needs.spm-package-resolved.outputs.cache_key}} - - name: Xcode - run: sudo xcode-select -s /Applications/${{ matrix.build-env.xcode }}.app/Contents/Developer - - name: Initialize xcodebuild - run: scripts/setup_spm_tests.sh - - name: Unit Tests - run: scripts/third_party/travis/retry.sh ./scripts/build.sh FirebaseSharedSwiftTests ${{ matrix.target }} spm + uses: ./.github/workflows/common.yml + with: + target: FirebaseSharedSwiftTests + +# pod-lib-lint: +# # 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: +# target: [ios, tvos, macos, watchos] +# build-env: +# - os: macos-14 +# xcode: Xcode_16.2 +# swift_version: 5.9 +# - os: macos-15 +# xcode: Xcode_16.2 +# swift_version: 5.9 +# - os: macos-15 +# xcode: Xcode_16.2 +# swift_version: 6.0 +# runs-on: ${{ matrix.build-env.os }} +# steps: +# - uses: actions/checkout@v4 +# - uses: ruby/setup-ruby@354a1ad156761f5ee2b7b13fa8e09943a5e8d252 # v1 +# - name: Setup Bundler +# run: scripts/setup_bundler.sh +# - name: Xcode +# run: sudo xcode-select -s /Applications/${{ matrix.build-env.xcode }}.app/Contents/Developer +# - name: Set Swift swift_version +# run: sed -i "" "s/s.swift_version[[:space:]]*=[[:space:]]*'5.9'/s.swift_version = '${{ matrix.build-env.swift_version }}'/" FirebaseSharedSwift.podspec +# - name: Build and test +# run: scripts/third_party/travis/retry.sh scripts/pod_lib_lint.rb FirebaseSharedSwift.podspec --platforms=${{ matrix.target }} diff --git a/.github/workflows/storage.yml b/.github/workflows/storage.yml index 6e77207d651..015bbd3369b 100644 --- a/.github/workflows/storage.yml +++ b/.github/workflows/storage.yml @@ -18,247 +18,182 @@ concurrency: cancel-in-progress: true jobs: - 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.2 - 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: 120 - max_attempts: 3 - retry_on: error - retry_wait_seconds: 120 - command: ([ -z $plist_secret ] || scripts/build.sh Storage${{ matrix.language }} all) - - spm-package-resolved: - env: - FIREBASECI_USE_LATEST_GOOGLEAPPMEASUREMENT: 1 - runs-on: macos-14 - outputs: - cache_key: ${{ steps.generate_cache_key.outputs.cache_key }} - steps: - - uses: actions/checkout@v4 - - name: Generate Swift Package.resolved - id: swift_package_resolve - run: | - swift package resolve - - name: Generate cache key - id: generate_cache_key - run: | - cache_key="${{ runner.os }}-spm-${{ hashFiles('**/Package.resolved') }}" - echo "cache_key=${cache_key}" >> "$GITHUB_OUTPUT" - - uses: actions/cache/save@v4 - id: cache - with: - path: .build - key: ${{ steps.generate_cache_key.outputs.cache_key }} - spm: - # 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-package-resolved] - strategy: - matrix: - include: - - os: macos-14 - xcode: Xcode_16.2 - target: iOS - - os: macos-15 - xcode: Xcode_16.2 - target: iOS - - os: macos-15 - xcode: Xcode_16.2 - target: tvOS - - os: macos-15 - xcode: Xcode_16.2 - target: macOS - - os: macos-15 - xcode: Xcode_16.2 - target: watchOS - - os: macos-15 - xcode: Xcode_16.2 - target: catalyst - - os: macos-15 - xcode: Xcode_16.2 - target: visionOS - runs-on: ${{ matrix.os }} - steps: - - uses: actions/checkout@v4 - - uses: actions/cache/restore@v4 - with: - path: .build - key: ${{needs.spm-package-resolved.outputs.cache_key}} - - name: Xcodes - run: ls -l /Applications/Xcode* - - name: Xcode - run: sudo xcode-select -s /Applications/${{ matrix.xcode }}.app/Contents/Developer - - name: Install visionOS, if needed. - if: matrix.target == 'visionOS spm' - run: xcodebuild -downloadPlatform visionOS - - name: Initialize xcodebuild - run: scripts/setup_spm_tests.sh - - name: Unit Tests - run: scripts/third_party/travis/retry.sh ./scripts/build.sh FirebaseStorageUnit ${{ matrix.target }} spm - - catalyst: - # 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: catalyst${{ matrix.os }} - - uses: ruby/setup-ruby@354a1ad156761f5ee2b7b13fa8e09943a5e8d252 # v1 - - name: Setup Bundler - run: scripts/setup_bundler.sh - - name: Xcode - run: sudo xcode-select -s /Applications/Xcode_16.2.app/Contents/Developer - - uses: nick-fields/retry@ce71cc2ab81d554ebbe88c79ab5975992d79ba08 # v3 - with: - timeout_minutes: 120 - max_attempts: 3 - retry_on: error - retry_wait_seconds: 120 - command: scripts/test_catalyst.sh FirebaseStorage test FirebaseStorage-Unit-unit - - 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' - # TODO: See #12399 and restore Objective-C testing for Xcode 15 if GHA is fixed. - strategy: - matrix: - include: - #- os: macos-13 - # xcode: Xcode_14.2 # TODO: the legacy ObjC quickstart doesn't build with Xcode 15. - - swift: swift - os: macos-15 - xcode: Xcode_16.2 - env: - plist_secret: ${{ secrets.GHASecretsGPGPassphrase1 }} - signin_secret: ${{ secrets.GHASecretsGPGPassphrase1 }} - LEGACY: true - runs-on: ${{ matrix.os }} - steps: - - uses: actions/checkout@v4 - - uses: ruby/setup-ruby@354a1ad156761f5ee2b7b13fa8e09943a5e8d252 # v1 - - 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: Xcode - run: sudo xcode-select -s /Applications/${{ matrix.xcode }}.app/Contents/Developer - - name: Test quickstart - run: ([ -z $plist_secret ] || scripts/third_party/travis/retry.sh scripts/test_quickstart.sh Storage false ${{ matrix.swift }}) - - 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 }} - signin_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" + uses: ./.github/workflows/common.yml + with: + target: FirebaseStorageUnit - pod-lib-lint: - # 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: - target: [ios, tvos, macos, watchos] - build-env: - - os: macos-15 - xcode: Xcode_16.2 - tests: --skip-tests - - os: macos-15 - xcode: Xcode_16.2 - tests: --test-specs=unit - runs-on: ${{ matrix.build-env.os }} - steps: - - uses: actions/checkout@v4 - - uses: ruby/setup-ruby@354a1ad156761f5ee2b7b13fa8e09943a5e8d252 # v1 - - name: Setup Bundler - run: scripts/setup_bundler.sh - - name: Xcodes - run: ls -l /Applications/Xcode* - - name: Xcode - run: sudo xcode-select -s /Applications/${{ matrix.build-env.xcode }}.app/Contents/Developer - - name: Build and test - run: | - scripts/third_party/travis/retry.sh scripts/pod_lib_lint.rb FirebaseStorage.podspec ${{ matrix.build-env.tests }} \ - --platforms=${{ matrix.target }} +# 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.2 +# 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: 120 +# max_attempts: 3 +# retry_on: error +# retry_wait_seconds: 120 +# command: ([ -z $plist_secret ] || scripts/build.sh Storage${{ matrix.language }} all) - storage-cron-only: - # Don't run on private repo. - if: github.event_name == 'schedule' && github.repository == 'Firebase/firebase-ios-sdk' - strategy: - matrix: - target: [ios, tvos, macos, watchos] - build-env: - - os: macos-14 - xcode: Xcode_16.2 - - os: macos-15 - xcode: Xcode_16.2 - runs-on: ${{ matrix.build-env.os }} - needs: pod-lib-lint - steps: - - uses: actions/checkout@v4 - - uses: ruby/setup-ruby@354a1ad156761f5ee2b7b13fa8e09943a5e8d252 # v1 - - name: Setup Bundler - run: scripts/setup_bundler.sh - - name: Xcode - run: sudo xcode-select -s /Applications/${{ matrix.build-env.xcode }}.app/Contents/Developer - - name: PodLibLint Storage Cron - run: scripts/third_party/travis/retry.sh scripts/pod_lib_lint.rb FirebaseStorage.podspec --platforms=${{ matrix.target }} --use-static-frameworks --skip-tests +# catalyst: +# # 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: catalyst${{ matrix.os }} +# - uses: ruby/setup-ruby@354a1ad156761f5ee2b7b13fa8e09943a5e8d252 # v1 +# - name: Setup Bundler +# run: scripts/setup_bundler.sh +# - name: Xcode +# run: sudo xcode-select -s /Applications/Xcode_16.2.app/Contents/Developer +# - uses: nick-fields/retry@ce71cc2ab81d554ebbe88c79ab5975992d79ba08 # v3 +# with: +# timeout_minutes: 120 +# max_attempts: 3 +# retry_on: error +# retry_wait_seconds: 120 +# command: scripts/test_catalyst.sh FirebaseStorage test FirebaseStorage-Unit-unit +# +# 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' +# # TODO: See #12399 and restore Objective-C testing for Xcode 15 if GHA is fixed. +# strategy: +# matrix: +# include: +# #- os: macos-13 +# # xcode: Xcode_14.2 # TODO: the legacy ObjC quickstart doesn't build with Xcode 15. +# - swift: swift +# os: macos-15 +# xcode: Xcode_16.2 +# env: +# plist_secret: ${{ secrets.GHASecretsGPGPassphrase1 }} +# signin_secret: ${{ secrets.GHASecretsGPGPassphrase1 }} +# LEGACY: true +# runs-on: ${{ matrix.os }} +# steps: +# - uses: actions/checkout@v4 +# - uses: ruby/setup-ruby@354a1ad156761f5ee2b7b13fa8e09943a5e8d252 # v1 +# - 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: Xcode +# run: sudo xcode-select -s /Applications/${{ matrix.xcode }}.app/Contents/Developer +# - name: Test quickstart +# run: ([ -z $plist_secret ] || scripts/third_party/travis/retry.sh scripts/test_quickstart.sh Storage false ${{ matrix.swift }}) +# +# 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 }} +# signin_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: +# # 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: +# target: [ios, tvos, macos, watchos] +# build-env: +# - os: macos-15 +# xcode: Xcode_16.2 +# tests: --skip-tests +# - os: macos-15 +# xcode: Xcode_16.2 +# tests: --test-specs=unit +# runs-on: ${{ matrix.build-env.os }} +# steps: +# - uses: actions/checkout@v4 +# - uses: ruby/setup-ruby@354a1ad156761f5ee2b7b13fa8e09943a5e8d252 # v1 +# - name: Setup Bundler +# run: scripts/setup_bundler.sh +# - name: Xcodes +# run: ls -l /Applications/Xcode* +# - name: Xcode +# run: sudo xcode-select -s /Applications/${{ matrix.build-env.xcode }}.app/Contents/Developer +# - name: Build and test +# run: | +# scripts/third_party/travis/retry.sh scripts/pod_lib_lint.rb FirebaseStorage.podspec ${{ matrix.build-env.tests }} \ +# --platforms=${{ matrix.target }} +# +# storage-cron-only: +# # Don't run on private repo. +# if: github.event_name == 'schedule' && github.repository == 'Firebase/firebase-ios-sdk' +# strategy: +# matrix: +# target: [ios, tvos, macos, watchos] +# build-env: +# - os: macos-14 +# xcode: Xcode_16.2 +# - os: macos-15 +# xcode: Xcode_16.2 +# runs-on: ${{ matrix.build-env.os }} +# needs: pod-lib-lint +# steps: +# - uses: actions/checkout@v4 +# - uses: ruby/setup-ruby@354a1ad156761f5ee2b7b13fa8e09943a5e8d252 # v1 +# - name: Setup Bundler +# run: scripts/setup_bundler.sh +# - name: Xcode +# run: sudo xcode-select -s /Applications/${{ matrix.build-env.xcode }}.app/Contents/Developer +# - name: PodLibLint Storage Cron +# run: scripts/third_party/travis/retry.sh scripts/pod_lib_lint.rb FirebaseStorage.podspec --platforms=${{ matrix.target }} --use-static-frameworks --skip-tests diff --git a/.github/workflows/vertexai.yml b/.github/workflows/vertexai.yml index 2b08ca897df..5be8109c1a5 100644 --- a/.github/workflows/vertexai.yml +++ b/.github/workflows/vertexai.yml @@ -15,146 +15,76 @@ concurrency: group: ${{ github.workflow }}-${{ github.head_ref || github.ref }} cancel-in-progress: true -jobs: - spm-package-resolved: - runs-on: macos-14 - outputs: - cache_key: ${{ steps.generate_cache_key.outputs.cache_key }} - env: - FIREBASECI_USE_LATEST_GOOGLEAPPMEASUREMENT: 1 - steps: - - uses: actions/checkout@v4 - - name: Generate Swift Package.resolved - id: swift_package_resolve - run: | - swift package resolve - - name: Generate cache key - id: generate_cache_key - run: | - cache_key="${{ runner.os }}-spm-${{ hashFiles('**/Package.resolved') }}" - echo "cache_key=${cache_key}" >> "$GITHUB_OUTPUT" - - uses: actions/cache/save@v4 - id: cache - with: - path: .build - key: ${{ steps.generate_cache_key.outputs.cache_key }} +jobs: + spm: + uses: ./.github/workflows/common.yml + with: + target: FirebaseVertexAIUnit - spm-unit: - strategy: - matrix: - include: - - os: macos-14 - xcode: Xcode_16.2 - target: iOS - - os: macos-15 - xcode: Xcode_16.3 - target: iOS - - os: macos-15 - xcode: Xcode_16.3 - target: tvOS - - os: macos-15 - xcode: Xcode_16.3 - target: macOS - - os: macos-15 - xcode: Xcode_16.3 - target: watchOS - - os: macos-15 - xcode: Xcode_16.3 - target: catalyst - - os: macos-15 - xcode: Xcode_16.3 - target: visionOS - runs-on: ${{ matrix.os }} - needs: spm-package-resolved - env: - FIREBASECI_USE_LATEST_GOOGLEAPPMEASUREMENT: 1 - steps: - - uses: actions/checkout@v4 - - uses: actions/cache/restore@v4 - with: - path: .build - key: ${{needs.spm-package-resolved.outputs.cache_key}} - - name: Clone mock responses - run: scripts/update_vertexai_responses.sh - - name: Xcode - run: sudo xcode-select -s /Applications/${{ matrix.xcode }}.app/Contents/Developer - - name: Install visionOS, if needed. - if: matrix.target == 'visionOS' - run: xcodebuild -downloadPlatform visionOS - - name: Initialize xcodebuild - run: scripts/setup_spm_tests.sh - - uses: nick-fields/retry@ce71cc2ab81d554ebbe88c79ab5975992d79ba08 # v3 - with: - timeout_minutes: 120 - max_attempts: 3 - retry_on: error - retry_wait_seconds: 120 - command: scripts/build.sh FirebaseVertexAIUnit ${{ matrix.target }} spm - - testapp-integration: - strategy: - matrix: - target: [iOS] - os: [macos-15] - include: - - os: macos-15 - xcode: Xcode_16.3 - runs-on: ${{ matrix.os }} - needs: spm-package-resolved - env: - TEST_RUNNER_FIRAAppCheckDebugToken: ${{ secrets.VERTEXAI_INTEGRATION_FAC_DEBUG_TOKEN }} - TEST_RUNNER_VTXIntegrationImagen: ${{ github.event_name == 'schedule' || github.event_name == 'workflow_dispatch' }} - FIREBASECI_USE_LATEST_GOOGLEAPPMEASUREMENT: 1 - secrets_passphrase: ${{ secrets.GHASecretsGPGPassphrase1 }} - steps: - - uses: actions/checkout@v4 - - uses: actions/cache/restore@v4 - with: - path: .build - key: ${{needs.spm-package-resolved.outputs.cache_key}} - - name: Install Secret GoogleService-Info.plist - run: scripts/decrypt_gha_secret.sh scripts/gha-encrypted/VertexAI/TestApp-GoogleService-Info.plist.gpg \ - FirebaseVertexAI/Tests/TestApp/Resources/GoogleService-Info.plist "$secrets_passphrase" - - name: Install Secret GoogleService-Info-Spark.plist - run: scripts/decrypt_gha_secret.sh scripts/gha-encrypted/VertexAI/TestApp-GoogleService-Info-Spark.plist.gpg \ - FirebaseVertexAI/Tests/TestApp/Resources/GoogleService-Info-Spark.plist "$secrets_passphrase" - - name: Install Secret Credentials.swift - run: scripts/decrypt_gha_secret.sh scripts/gha-encrypted/VertexAI/TestApp-Credentials.swift.gpg \ - FirebaseVertexAI/Tests/TestApp/Tests/Integration/Credentials.swift "$secrets_passphrase" - - name: Xcode - run: sudo xcode-select -s /Applications/${{ matrix.xcode }}.app/Contents/Developer - - name: Run IntegrationTests - run: scripts/build.sh VertexIntegration ${{ matrix.target }} - - pod-lib-lint: - # 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: - include: - - os: macos-14 - xcode: Xcode_16.2 - swift_version: 5.9 - warnings: - - os: macos-15 - xcode: Xcode_16.3 - swift_version: 5.9 - warnings: - - os: macos-15 - xcode: Xcode_16.3 - swift_version: 6.0 - warnings: - runs-on: ${{ matrix.os }} - steps: - - uses: actions/checkout@v4 - - name: Clone mock responses - run: scripts/update_vertexai_responses.sh - - 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: Set Swift swift_version - run: sed -i "" "s#s.swift_version = '5.9'#s.swift_version = '${{ matrix.swift_version}}'#" FirebaseVertexAI.podspec - - name: Build and test - run: scripts/third_party/travis/retry.sh scripts/pod_lib_lint.rb FirebaseVertexAI.podspec --platforms=${{ matrix.target }} ${{ matrix.warnings }} +# testapp-integration: +# strategy: +# matrix: +# target: [iOS] +# os: [macos-15] +# include: +# - os: macos-15 +# xcode: Xcode_16.3 +# runs-on: ${{ matrix.os }} +# needs: spm-package-resolved +# env: +# TEST_RUNNER_FIRAAppCheckDebugToken: ${{ secrets.VERTEXAI_INTEGRATION_FAC_DEBUG_TOKEN }} +# TEST_RUNNER_VTXIntegrationImagen: ${{ github.event_name == 'schedule' || github.event_name == 'workflow_dispatch' }} +# FIREBASECI_USE_LATEST_GOOGLEAPPMEASUREMENT: 1 +# secrets_passphrase: ${{ secrets.GHASecretsGPGPassphrase1 }} +# steps: +# - uses: actions/checkout@v4 +# - uses: actions/cache/restore@v4 +# with: +# path: .build +# key: ${{needs.spm-package-resolved.outputs.cache_key}} +# - name: Install Secret GoogleService-Info.plist +# run: scripts/decrypt_gha_secret.sh scripts/gha-encrypted/VertexAI/TestApp-GoogleService-Info.plist.gpg \ +# FirebaseVertexAI/Tests/TestApp/Resources/GoogleService-Info.plist "$secrets_passphrase" +# - name: Install Secret GoogleService-Info-Spark.plist +# run: scripts/decrypt_gha_secret.sh scripts/gha-encrypted/VertexAI/TestApp-GoogleService-Info-Spark.plist.gpg \ +# FirebaseVertexAI/Tests/TestApp/Resources/GoogleService-Info-Spark.plist "$secrets_passphrase" +# - name: Install Secret Credentials.swift +# run: scripts/decrypt_gha_secret.sh scripts/gha-encrypted/VertexAI/TestApp-Credentials.swift.gpg \ +# FirebaseVertexAI/Tests/TestApp/Tests/Integration/Credentials.swift "$secrets_passphrase" +# - name: Xcode +# run: sudo xcode-select -s /Applications/${{ matrix.xcode }}.app/Contents/Developer +# - name: Run IntegrationTests +# run: scripts/build.sh VertexIntegration ${{ matrix.target }} +# +# pod-lib-lint: +# # 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: +# include: +# - os: macos-14 +# xcode: Xcode_16.2 +# swift_version: 5.9 +# warnings: +# - os: macos-15 +# xcode: Xcode_16.3 +# swift_version: 5.9 +# warnings: +# - os: macos-15 +# xcode: Xcode_16.3 +# swift_version: 6.0 +# warnings: +# runs-on: ${{ matrix.os }} +# steps: +# - uses: actions/checkout@v4 +# - name: Clone mock responses +# run: scripts/update_vertexai_responses.sh +# - 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: Set Swift swift_version +# run: sed -i "" "s#s.swift_version = '5.9'#s.swift_version = '${{ matrix.swift_version}}'#" FirebaseVertexAI.podspec +# - name: Build and test +# run: scripts/third_party/travis/retry.sh scripts/pod_lib_lint.rb FirebaseVertexAI.podspec --platforms=${{ matrix.target }} ${{ matrix.warnings }} From fcc9e122f1b00c9b77e497808d4d96a53f3e41a7 Mon Sep 17 00:00:00 2001 From: Nick Cooke Date: Mon, 21 Apr 2025 09:54:13 -0400 Subject: [PATCH 09/24] remove trailing whitespace --- .github/workflows/database.yml | 2 +- .github/workflows/vertexai.yml | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/.github/workflows/database.yml b/.github/workflows/database.yml index dabca273648..fb6d7c35db4 100644 --- a/.github/workflows/database.yml +++ b/.github/workflows/database.yml @@ -28,7 +28,7 @@ jobs: uses: ./.github/workflows/common.yml with: target: ${{ matrix.target }} - + # pod-lib-lint: # # 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' diff --git a/.github/workflows/vertexai.yml b/.github/workflows/vertexai.yml index 5be8109c1a5..b624e97116f 100644 --- a/.github/workflows/vertexai.yml +++ b/.github/workflows/vertexai.yml @@ -15,7 +15,7 @@ concurrency: group: ${{ github.workflow }}-${{ github.head_ref || github.ref }} cancel-in-progress: true -jobs: +jobs: spm: uses: ./.github/workflows/common.yml with: From 373052acc3ebeb20f4c8b016a2427b30f6874ec9 Mon Sep 17 00:00:00 2001 From: Nick Cooke Date: Mon, 21 Apr 2025 09:59:35 -0400 Subject: [PATCH 10/24] Punt vertexai to different PR --- .github/workflows/vertexai.yml | 212 ++++++++++++++++++++++----------- 1 file changed, 141 insertions(+), 71 deletions(-) diff --git a/.github/workflows/vertexai.yml b/.github/workflows/vertexai.yml index b624e97116f..2b08ca897df 100644 --- a/.github/workflows/vertexai.yml +++ b/.github/workflows/vertexai.yml @@ -16,75 +16,145 @@ concurrency: cancel-in-progress: true jobs: - spm: - uses: ./.github/workflows/common.yml - with: - target: FirebaseVertexAIUnit + spm-package-resolved: + runs-on: macos-14 + outputs: + cache_key: ${{ steps.generate_cache_key.outputs.cache_key }} + env: + FIREBASECI_USE_LATEST_GOOGLEAPPMEASUREMENT: 1 + steps: + - uses: actions/checkout@v4 + - name: Generate Swift Package.resolved + id: swift_package_resolve + run: | + swift package resolve + - name: Generate cache key + id: generate_cache_key + run: | + cache_key="${{ runner.os }}-spm-${{ hashFiles('**/Package.resolved') }}" + echo "cache_key=${cache_key}" >> "$GITHUB_OUTPUT" + - uses: actions/cache/save@v4 + id: cache + with: + path: .build + key: ${{ steps.generate_cache_key.outputs.cache_key }} -# testapp-integration: -# strategy: -# matrix: -# target: [iOS] -# os: [macos-15] -# include: -# - os: macos-15 -# xcode: Xcode_16.3 -# runs-on: ${{ matrix.os }} -# needs: spm-package-resolved -# env: -# TEST_RUNNER_FIRAAppCheckDebugToken: ${{ secrets.VERTEXAI_INTEGRATION_FAC_DEBUG_TOKEN }} -# TEST_RUNNER_VTXIntegrationImagen: ${{ github.event_name == 'schedule' || github.event_name == 'workflow_dispatch' }} -# FIREBASECI_USE_LATEST_GOOGLEAPPMEASUREMENT: 1 -# secrets_passphrase: ${{ secrets.GHASecretsGPGPassphrase1 }} -# steps: -# - uses: actions/checkout@v4 -# - uses: actions/cache/restore@v4 -# with: -# path: .build -# key: ${{needs.spm-package-resolved.outputs.cache_key}} -# - name: Install Secret GoogleService-Info.plist -# run: scripts/decrypt_gha_secret.sh scripts/gha-encrypted/VertexAI/TestApp-GoogleService-Info.plist.gpg \ -# FirebaseVertexAI/Tests/TestApp/Resources/GoogleService-Info.plist "$secrets_passphrase" -# - name: Install Secret GoogleService-Info-Spark.plist -# run: scripts/decrypt_gha_secret.sh scripts/gha-encrypted/VertexAI/TestApp-GoogleService-Info-Spark.plist.gpg \ -# FirebaseVertexAI/Tests/TestApp/Resources/GoogleService-Info-Spark.plist "$secrets_passphrase" -# - name: Install Secret Credentials.swift -# run: scripts/decrypt_gha_secret.sh scripts/gha-encrypted/VertexAI/TestApp-Credentials.swift.gpg \ -# FirebaseVertexAI/Tests/TestApp/Tests/Integration/Credentials.swift "$secrets_passphrase" -# - name: Xcode -# run: sudo xcode-select -s /Applications/${{ matrix.xcode }}.app/Contents/Developer -# - name: Run IntegrationTests -# run: scripts/build.sh VertexIntegration ${{ matrix.target }} -# -# pod-lib-lint: -# # 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: -# include: -# - os: macos-14 -# xcode: Xcode_16.2 -# swift_version: 5.9 -# warnings: -# - os: macos-15 -# xcode: Xcode_16.3 -# swift_version: 5.9 -# warnings: -# - os: macos-15 -# xcode: Xcode_16.3 -# swift_version: 6.0 -# warnings: -# runs-on: ${{ matrix.os }} -# steps: -# - uses: actions/checkout@v4 -# - name: Clone mock responses -# run: scripts/update_vertexai_responses.sh -# - 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: Set Swift swift_version -# run: sed -i "" "s#s.swift_version = '5.9'#s.swift_version = '${{ matrix.swift_version}}'#" FirebaseVertexAI.podspec -# - name: Build and test -# run: scripts/third_party/travis/retry.sh scripts/pod_lib_lint.rb FirebaseVertexAI.podspec --platforms=${{ matrix.target }} ${{ matrix.warnings }} + spm-unit: + strategy: + matrix: + include: + - os: macos-14 + xcode: Xcode_16.2 + target: iOS + - os: macos-15 + xcode: Xcode_16.3 + target: iOS + - os: macos-15 + xcode: Xcode_16.3 + target: tvOS + - os: macos-15 + xcode: Xcode_16.3 + target: macOS + - os: macos-15 + xcode: Xcode_16.3 + target: watchOS + - os: macos-15 + xcode: Xcode_16.3 + target: catalyst + - os: macos-15 + xcode: Xcode_16.3 + target: visionOS + runs-on: ${{ matrix.os }} + needs: spm-package-resolved + env: + FIREBASECI_USE_LATEST_GOOGLEAPPMEASUREMENT: 1 + steps: + - uses: actions/checkout@v4 + - uses: actions/cache/restore@v4 + with: + path: .build + key: ${{needs.spm-package-resolved.outputs.cache_key}} + - name: Clone mock responses + run: scripts/update_vertexai_responses.sh + - name: Xcode + run: sudo xcode-select -s /Applications/${{ matrix.xcode }}.app/Contents/Developer + - name: Install visionOS, if needed. + if: matrix.target == 'visionOS' + run: xcodebuild -downloadPlatform visionOS + - name: Initialize xcodebuild + run: scripts/setup_spm_tests.sh + - uses: nick-fields/retry@ce71cc2ab81d554ebbe88c79ab5975992d79ba08 # v3 + with: + timeout_minutes: 120 + max_attempts: 3 + retry_on: error + retry_wait_seconds: 120 + command: scripts/build.sh FirebaseVertexAIUnit ${{ matrix.target }} spm + + testapp-integration: + strategy: + matrix: + target: [iOS] + os: [macos-15] + include: + - os: macos-15 + xcode: Xcode_16.3 + runs-on: ${{ matrix.os }} + needs: spm-package-resolved + env: + TEST_RUNNER_FIRAAppCheckDebugToken: ${{ secrets.VERTEXAI_INTEGRATION_FAC_DEBUG_TOKEN }} + TEST_RUNNER_VTXIntegrationImagen: ${{ github.event_name == 'schedule' || github.event_name == 'workflow_dispatch' }} + FIREBASECI_USE_LATEST_GOOGLEAPPMEASUREMENT: 1 + secrets_passphrase: ${{ secrets.GHASecretsGPGPassphrase1 }} + steps: + - uses: actions/checkout@v4 + - uses: actions/cache/restore@v4 + with: + path: .build + key: ${{needs.spm-package-resolved.outputs.cache_key}} + - name: Install Secret GoogleService-Info.plist + run: scripts/decrypt_gha_secret.sh scripts/gha-encrypted/VertexAI/TestApp-GoogleService-Info.plist.gpg \ + FirebaseVertexAI/Tests/TestApp/Resources/GoogleService-Info.plist "$secrets_passphrase" + - name: Install Secret GoogleService-Info-Spark.plist + run: scripts/decrypt_gha_secret.sh scripts/gha-encrypted/VertexAI/TestApp-GoogleService-Info-Spark.plist.gpg \ + FirebaseVertexAI/Tests/TestApp/Resources/GoogleService-Info-Spark.plist "$secrets_passphrase" + - name: Install Secret Credentials.swift + run: scripts/decrypt_gha_secret.sh scripts/gha-encrypted/VertexAI/TestApp-Credentials.swift.gpg \ + FirebaseVertexAI/Tests/TestApp/Tests/Integration/Credentials.swift "$secrets_passphrase" + - name: Xcode + run: sudo xcode-select -s /Applications/${{ matrix.xcode }}.app/Contents/Developer + - name: Run IntegrationTests + run: scripts/build.sh VertexIntegration ${{ matrix.target }} + + pod-lib-lint: + # 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: + include: + - os: macos-14 + xcode: Xcode_16.2 + swift_version: 5.9 + warnings: + - os: macos-15 + xcode: Xcode_16.3 + swift_version: 5.9 + warnings: + - os: macos-15 + xcode: Xcode_16.3 + swift_version: 6.0 + warnings: + runs-on: ${{ matrix.os }} + steps: + - uses: actions/checkout@v4 + - name: Clone mock responses + run: scripts/update_vertexai_responses.sh + - 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: Set Swift swift_version + run: sed -i "" "s#s.swift_version = '5.9'#s.swift_version = '${{ matrix.swift_version}}'#" FirebaseVertexAI.podspec + - name: Build and test + run: scripts/third_party/travis/retry.sh scripts/pod_lib_lint.rb FirebaseVertexAI.podspec --platforms=${{ matrix.target }} ${{ matrix.warnings }} From fad743bd8ff16f86d76e26e7cfc8b2f812bf69d1 Mon Sep 17 00:00:00 2001 From: Nick Cooke Date: Mon, 21 Apr 2025 10:09:21 -0400 Subject: [PATCH 11/24] uncomment --- .github/workflows/abtesting.yml | 285 +++++++++---------- .github/workflows/core.yml | 177 ++++++------ .github/workflows/core_internal.yml | 135 ++++----- .github/workflows/crashlytics.yml | 305 ++++++++++----------- .github/workflows/database.yml | 202 +++++++------- .github/workflows/mlmodeldownloader.yml | 194 ++++++------- .github/workflows/sessions.yml | 108 ++++---- .github/workflows/shared-swift.yml | 58 ++-- .github/workflows/storage.yml | 346 ++++++++++++------------ 9 files changed, 907 insertions(+), 903 deletions(-) diff --git a/.github/workflows/abtesting.yml b/.github/workflows/abtesting.yml index 805876cbeb9..ed1e574d5e0 100644 --- a/.github/workflows/abtesting.yml +++ b/.github/workflows/abtesting.yml @@ -21,146 +21,147 @@ jobs: uses: ./.github/workflows/common.yml with: target: ABTestingUnit -# pod-lib-lint: -# # 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: -# include: -# - os: macos-14 -# xcode: Xcode_16.2 -# target: ios -# - os: macos-15 -# xcode: Xcode_16.2 -# target: ios -# - os: macos-15 -# xcode: Xcode_16.2 -# target: tvos -# - os: macos-15 -# xcode: Xcode_16.2 -# target: macos -# - os: macos-15 -# xcode: Xcode_16.2 -# target: watchos -# runs-on: ${{ matrix.os }} -# steps: -# - uses: actions/checkout@v4 -# - 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 -# - uses: nick-fields/retry@ce71cc2ab81d554ebbe88c79ab5975992d79ba08 # v3 -# with: -# timeout_minutes: 120 -# max_attempts: 3 -# retry_on: error -# retry_wait_seconds: 120 -# command: scripts/pod_lib_lint.rb FirebaseABTesting.podspec --platforms=${{ matrix.target }} -# catalyst: -# # 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: catalyst${{ matrix.os }} -# - uses: ruby/setup-ruby@354a1ad156761f5ee2b7b13fa8e09943a5e8d252 # v1 -# - name: Setup Bundler -# run: scripts/setup_bundler.sh -# - name: Xcode -# run: sudo xcode-select -s /Applications/Xcode_16.2.app/Contents/Developer -# - uses: nick-fields/retry@ce71cc2ab81d554ebbe88c79ab5975992d79ba08 # v3 -# with: -# timeout_minutes: 120 -# max_attempts: 3 -# retry_on: error -# retry_wait_seconds: 120 -# command: scripts/test_catalyst.sh FirebaseABTesting test FirebaseABTesting-Unit-unit -# -# quickstart: -# # Don't run on private repo unless it is a PR. -# if: (github.repository == 'Firebase/firebase-ios-sdk' && github.event_name == 'schedule') || github.event_name == 'pull_request' -# -# env: -# plist_secret: ${{ secrets.GHASecretsGPGPassphrase1 }} -# signin_secret: ${{ secrets.GHASecretsGPGPassphrase1 }} -# runs-on: macos-15 -# steps: -# - uses: actions/checkout@v4 -# - uses: ruby/setup-ruby@354a1ad156761f5ee2b7b13fa8e09943a5e8d252 # v1 -# - name: Xcode -# run: sudo xcode-select -s /Applications/Xcode_16.2.app/Contents/Developer -# - name: Setup quickstart -# env: -# LEGACY: true -# run: scripts/setup_quickstart.sh abtesting -# - name: Install Secret GoogleService-Info.plist -# run: scripts/decrypt_gha_secret.sh scripts/gha-encrypted/qs-abtesting.plist.gpg \ -# quickstart-ios/abtesting/GoogleService-Info.plist "$plist_secret" -# - name: Test swift quickstart -# env: -# LEGACY: true -# run: ([ -z $plist_secret ] || scripts/third_party/travis/retry.sh scripts/test_quickstart.sh ABTesting true) -# -# quickstart-ftl-cron-only: -# # Don't run on private repo. -# if: github.repository == 'Firebase/firebase-ios-sdk' && github.event_name == 'schedule' -# -# env: -# plist_secret: ${{ secrets.GHASecretsGPGPassphrase1 }} -# signin_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.2.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: -# # Don't run on private repo. -# if: github.event_name == 'schedule' && github.repository == 'Firebase/firebase-ios-sdk' -# -# runs-on: macos-15 -# strategy: -# matrix: -# target: [ios, tvos, macos] -# flags: [ -# '--use-static-frameworks' -# ] -# needs: pod-lib-lint -# steps: -# - uses: actions/checkout@v4 -# - uses: ruby/setup-ruby@354a1ad156761f5ee2b7b13fa8e09943a5e8d252 # v1 -# - name: Setup Bundler -# run: scripts/setup_bundler.sh -# - name: Xcode -# run: sudo xcode-select -s /Applications/Xcode_16.2.app/Contents/Developer -# - name: PodLibLint ABTesting Cron -# run: | -# scripts/third_party/travis/retry.sh scripts/pod_lib_lint.rb \ -# FirebaseABTesting.podspec --platforms=${{ matrix.target }} ${{ matrix.flags }} + pod-lib-lint: + # 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: + include: + - os: macos-14 + xcode: Xcode_16.2 + target: ios + - os: macos-15 + xcode: Xcode_16.2 + target: ios + - os: macos-15 + xcode: Xcode_16.2 + target: tvos + - os: macos-15 + xcode: Xcode_16.2 + target: macos + - os: macos-15 + xcode: Xcode_16.2 + target: watchos + runs-on: ${{ matrix.os }} + steps: + - uses: actions/checkout@v4 + - 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 + - uses: nick-fields/retry@ce71cc2ab81d554ebbe88c79ab5975992d79ba08 # v3 + with: + timeout_minutes: 120 + max_attempts: 3 + retry_on: error + retry_wait_seconds: 120 + command: scripts/pod_lib_lint.rb FirebaseABTesting.podspec --platforms=${{ matrix.target }} + + catalyst: + # 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: catalyst${{ matrix.os }} + - uses: ruby/setup-ruby@354a1ad156761f5ee2b7b13fa8e09943a5e8d252 # v1 + - name: Setup Bundler + run: scripts/setup_bundler.sh + - name: Xcode + run: sudo xcode-select -s /Applications/Xcode_16.2.app/Contents/Developer + - uses: nick-fields/retry@ce71cc2ab81d554ebbe88c79ab5975992d79ba08 # v3 + with: + timeout_minutes: 120 + max_attempts: 3 + retry_on: error + retry_wait_seconds: 120 + command: scripts/test_catalyst.sh FirebaseABTesting test FirebaseABTesting-Unit-unit + + quickstart: + # Don't run on private repo unless it is a PR. + if: (github.repository == 'Firebase/firebase-ios-sdk' && github.event_name == 'schedule') || github.event_name == 'pull_request' + + env: + plist_secret: ${{ secrets.GHASecretsGPGPassphrase1 }} + signin_secret: ${{ secrets.GHASecretsGPGPassphrase1 }} + runs-on: macos-15 + steps: + - uses: actions/checkout@v4 + - uses: ruby/setup-ruby@354a1ad156761f5ee2b7b13fa8e09943a5e8d252 # v1 + - name: Xcode + run: sudo xcode-select -s /Applications/Xcode_16.2.app/Contents/Developer + - name: Setup quickstart + env: + LEGACY: true + run: scripts/setup_quickstart.sh abtesting + - name: Install Secret GoogleService-Info.plist + run: scripts/decrypt_gha_secret.sh scripts/gha-encrypted/qs-abtesting.plist.gpg \ + quickstart-ios/abtesting/GoogleService-Info.plist "$plist_secret" + - name: Test swift quickstart + env: + LEGACY: true + run: ([ -z $plist_secret ] || scripts/third_party/travis/retry.sh scripts/test_quickstart.sh ABTesting true) + + quickstart-ftl-cron-only: + # Don't run on private repo. + if: github.repository == 'Firebase/firebase-ios-sdk' && github.event_name == 'schedule' + + env: + plist_secret: ${{ secrets.GHASecretsGPGPassphrase1 }} + signin_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.2.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: + # Don't run on private repo. + if: github.event_name == 'schedule' && github.repository == 'Firebase/firebase-ios-sdk' + + runs-on: macos-15 + strategy: + matrix: + target: [ios, tvos, macos] + flags: [ + '--use-static-frameworks' + ] + needs: pod-lib-lint + steps: + - uses: actions/checkout@v4 + - uses: ruby/setup-ruby@354a1ad156761f5ee2b7b13fa8e09943a5e8d252 # v1 + - name: Setup Bundler + run: scripts/setup_bundler.sh + - name: Xcode + run: sudo xcode-select -s /Applications/Xcode_16.2.app/Contents/Developer + - name: PodLibLint ABTesting Cron + run: | + scripts/third_party/travis/retry.sh scripts/pod_lib_lint.rb \ + FirebaseABTesting.podspec --platforms=${{ matrix.target }} ${{ matrix.flags }} diff --git a/.github/workflows/core.yml b/.github/workflows/core.yml index acf499ed63f..0387677c351 100644 --- a/.github/workflows/core.yml +++ b/.github/workflows/core.yml @@ -20,93 +20,94 @@ jobs: uses: ./.github/workflows/common.yml with: target: CoreUnit -# pod-lib-lint: -# # 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: -# # TODO: macos tests are blocked by https://github.com/erikdoe/ocmock/pull/532 -# target: [ios, tvos, macos --skip-tests, watchos] -# build-env: -# - os: macos-14 -# xcode: Xcode_16.2 + + pod-lib-lint: + # 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: + # TODO: macos tests are blocked by https://github.com/erikdoe/ocmock/pull/532 + target: [ios, tvos, macos --skip-tests, watchos] + build-env: + - os: macos-14 + xcode: Xcode_16.2 + - os: macos-15 + xcode: Xcode_16.2 + # TODO: Add Xcode matrix when Xcode 16 is ubiquitous on CI runners. # - os: macos-15 -# xcode: Xcode_16.2 -# # TODO: Add Xcode matrix when Xcode 16 is ubiquitous on CI runners. -## - os: macos-15 -## xcode: Xcode_16.3 -# runs-on: ${{ matrix.build-env.os }} -# steps: -# - uses: actions/checkout@v4 -# - uses: ruby/setup-ruby@354a1ad156761f5ee2b7b13fa8e09943a5e8d252 # v1 -# - name: Setup Bundler -# run: scripts/setup_bundler.sh -# - name: Xcode -# run: sudo xcode-select -s /Applications/${{ matrix.build-env.xcode }}.app/Contents/Developer -# - name: Build and test -# run: scripts/third_party/travis/retry.sh scripts/pod_lib_lint.rb FirebaseCore.podspec --platforms=${{ matrix.target }} -# -# spm-package-resolved: -# env: -# FIREBASECI_USE_LATEST_GOOGLEAPPMEASUREMENT: 1 -# runs-on: macos-15 -# outputs: -# cache_key: ${{ steps.generate_cache_key.outputs.cache_key }} -# steps: -# - uses: actions/checkout@v4 -# - name: Xcode -# run: sudo xcode-select -s /Applications/Xcode_16.2.app/Contents/Developer -# - name: Generate Swift Package.resolved -# id: swift_package_resolve -# run: | -# swift package resolve -# - name: Generate cache key -# id: generate_cache_key -# run: | -# cache_key="${{ runner.os }}-spm-${{ hashFiles('**/Package.resolved') }}" -# echo "cache_key=${cache_key}" >> "$GITHUB_OUTPUT" -# - uses: actions/cache/save@v4 -# id: cache -# with: -# path: .build -# key: ${{ steps.generate_cache_key.outputs.cache_key }} +# xcode: Xcode_16.3 + runs-on: ${{ matrix.build-env.os }} + steps: + - uses: actions/checkout@v4 + - uses: ruby/setup-ruby@354a1ad156761f5ee2b7b13fa8e09943a5e8d252 # v1 + - name: Setup Bundler + run: scripts/setup_bundler.sh + - name: Xcode + run: sudo xcode-select -s /Applications/${{ matrix.build-env.xcode }}.app/Contents/Developer + - name: Build and test + run: scripts/third_party/travis/retry.sh scripts/pod_lib_lint.rb FirebaseCore.podspec --platforms=${{ matrix.target }} + + spm-package-resolved: + env: + FIREBASECI_USE_LATEST_GOOGLEAPPMEASUREMENT: 1 + runs-on: macos-15 + outputs: + cache_key: ${{ steps.generate_cache_key.outputs.cache_key }} + steps: + - uses: actions/checkout@v4 + - name: Xcode + run: sudo xcode-select -s /Applications/Xcode_16.2.app/Contents/Developer + - name: Generate Swift Package.resolved + id: swift_package_resolve + run: | + swift package resolve + - name: Generate cache key + id: generate_cache_key + run: | + cache_key="${{ runner.os }}-spm-${{ hashFiles('**/Package.resolved') }}" + echo "cache_key=${cache_key}" >> "$GITHUB_OUTPUT" + - uses: actions/cache/save@v4 + id: cache + with: + path: .build + key: ${{ steps.generate_cache_key.outputs.cache_key }} + + catalyst: + # 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: ${{ matrix.os }} + - uses: ruby/setup-ruby@354a1ad156761f5ee2b7b13fa8e09943a5e8d252 # v1 + - name: Setup Bundler + run: scripts/setup_bundler.sh + - name: Xcode + run: sudo xcode-select -s /Applications/Xcode_16.2.app/Contents/Developer + - name: Setup project and Build Catalyst + run: scripts/test_catalyst.sh FirebaseCore test FirebaseCore-Unit-unit + + core-cron-only: + # Don't run on private repo. + if: github.event_name == 'schedule' && github.repository == 'Firebase/firebase-ios-sdk' -# catalyst: -# # 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: ${{ matrix.os }} -# - uses: ruby/setup-ruby@354a1ad156761f5ee2b7b13fa8e09943a5e8d252 # v1 -# - name: Setup Bundler -# run: scripts/setup_bundler.sh -# - name: Xcode -# run: sudo xcode-select -s /Applications/Xcode_16.2.app/Contents/Developer -# - name: Setup project and Build Catalyst -# run: scripts/test_catalyst.sh FirebaseCore test FirebaseCore-Unit-unit -# -# core-cron-only: -# # Don't run on private repo. -# if: github.event_name == 'schedule' && github.repository == 'Firebase/firebase-ios-sdk' -# -# runs-on: macos-14 -# strategy: -# matrix: -# target: [ios, tvos, macos] -# flags: [ -# '--use-static-frameworks' -# ] -# needs: pod-lib-lint -# steps: -# - uses: actions/checkout@v4 -# - uses: ruby/setup-ruby@354a1ad156761f5ee2b7b13fa8e09943a5e8d252 # v1 -# - name: Xcode -# run: sudo xcode-select -s /Applications/Xcode_16.2.app/Contents/Developer -# - name: Setup Bundler -# run: scripts/setup_bundler.sh -# - name: PodLibLint Core Cron -# run: scripts/third_party/travis/retry.sh scripts/pod_lib_lint.rb FirebaseCore.podspec --platforms=${{ matrix.target }} ${{ matrix.flags }} + runs-on: macos-14 + strategy: + matrix: + target: [ios, tvos, macos] + flags: [ + '--use-static-frameworks' + ] + needs: pod-lib-lint + steps: + - uses: actions/checkout@v4 + - uses: ruby/setup-ruby@354a1ad156761f5ee2b7b13fa8e09943a5e8d252 # v1 + - name: Xcode + run: sudo xcode-select -s /Applications/Xcode_16.2.app/Contents/Developer + - name: Setup Bundler + run: scripts/setup_bundler.sh + - name: PodLibLint Core Cron + run: scripts/third_party/travis/retry.sh scripts/pod_lib_lint.rb FirebaseCore.podspec --platforms=${{ matrix.target }} ${{ matrix.flags }} diff --git a/.github/workflows/core_internal.yml b/.github/workflows/core_internal.yml index ef37b23a54c..ffdb590559c 100644 --- a/.github/workflows/core_internal.yml +++ b/.github/workflows/core_internal.yml @@ -17,71 +17,72 @@ jobs: uses: ./.github/workflows/common.yml with: target: FirebaseCoreInternalTests -# pod-lib-lint: -# # 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: -# target: [ios, tvos, macos, watchos] -# build-env: -# - os: macos-14 -# xcode: Xcode_16.2 -# swift_version: 5.9 -# - os: macos-15 -# xcode: Xcode_16.2 -# swift_version: 5.9 -# - os: macos-15 -# xcode: Xcode_16.2 -# swift_version: 6.0 -# runs-on: ${{ matrix.build-env.os }} -# steps: -# - uses: actions/checkout@v4 -# - uses: ruby/setup-ruby@354a1ad156761f5ee2b7b13fa8e09943a5e8d252 # v1 -# - name: Setup Bundler -# run: scripts/setup_bundler.sh -# - name: Xcode -# run: sudo xcode-select -s /Applications/${{ matrix.build-env.xcode }}.app/Contents/Developer -# - name: Set Swift swift_version -# run: sed -i "" "s/s.swift_version[[:space:]]*=[[:space:]]*'5.9'/s.swift_version = '${{ matrix.build-env.swift_version }}'/" FirebaseCoreInternal.podspec -# - name: Build and test -# run: scripts/third_party/travis/retry.sh scripts/pod_lib_lint.rb FirebaseCoreInternal.podspec --platforms=${{ matrix.target }} -# catalyst: -# # 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: catalyst${{ matrix.os }} -# - uses: ruby/setup-ruby@354a1ad156761f5ee2b7b13fa8e09943a5e8d252 # v1 -# - name: Setup Bundler -# run: scripts/setup_bundler.sh -# - name: Xcode -# run: sudo xcode-select -s /Applications/Xcode_16.2.app/Contents/Developer -# - name: Setup Catalyst project and run unit tests -# run: scripts/test_catalyst.sh FirebaseCoreInternal test FirebaseCoreInternal-Unit-Unit -# - name: Setup Catalyst project and run integration tests -# run: scripts/test_catalyst.sh FirebaseCoreInternal test FirebaseCoreInternal-Unit-Integration -# -# core-internal-cron-only: -# # Don't run on private repo. -# if: github.event_name == 'schedule' && github.repository == 'Firebase/firebase-ios-sdk' -# runs-on: macos-15 -# strategy: -# matrix: -# target: [ios, tvos, macos] -# flags: [ -# '--use-static-frameworks' -# ] -# needs: pod-lib-lint -# steps: -# - uses: actions/checkout@v4 -# - uses: ruby/setup-ruby@354a1ad156761f5ee2b7b13fa8e09943a5e8d252 # v1 -# - name: Xcode -# run: sudo xcode-select -s /Applications/Xcode_16.2.app/Contents/Developer -# - name: Setup Bundler -# run: scripts/setup_bundler.sh -# - name: PodLibLint CoreInternal Cron -# run: scripts/third_party/travis/retry.sh scripts/pod_lib_lint.rb FirebaseCoreInternal.podspec --platforms=${{ matrix.target }} ${{ matrix.flags }} + pod-lib-lint: + # 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: + target: [ios, tvos, macos, watchos] + build-env: + - os: macos-14 + xcode: Xcode_16.2 + swift_version: 5.9 + - os: macos-15 + xcode: Xcode_16.2 + swift_version: 5.9 + - os: macos-15 + xcode: Xcode_16.2 + swift_version: 6.0 + runs-on: ${{ matrix.build-env.os }} + steps: + - uses: actions/checkout@v4 + - uses: ruby/setup-ruby@354a1ad156761f5ee2b7b13fa8e09943a5e8d252 # v1 + - name: Setup Bundler + run: scripts/setup_bundler.sh + - name: Xcode + run: sudo xcode-select -s /Applications/${{ matrix.build-env.xcode }}.app/Contents/Developer + - name: Set Swift swift_version + run: sed -i "" "s/s.swift_version[[:space:]]*=[[:space:]]*'5.9'/s.swift_version = '${{ matrix.build-env.swift_version }}'/" FirebaseCoreInternal.podspec + - name: Build and test + run: scripts/third_party/travis/retry.sh scripts/pod_lib_lint.rb FirebaseCoreInternal.podspec --platforms=${{ matrix.target }} + + catalyst: + # 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: catalyst${{ matrix.os }} + - uses: ruby/setup-ruby@354a1ad156761f5ee2b7b13fa8e09943a5e8d252 # v1 + - name: Setup Bundler + run: scripts/setup_bundler.sh + - name: Xcode + run: sudo xcode-select -s /Applications/Xcode_16.2.app/Contents/Developer + - name: Setup Catalyst project and run unit tests + run: scripts/test_catalyst.sh FirebaseCoreInternal test FirebaseCoreInternal-Unit-Unit + - name: Setup Catalyst project and run integration tests + run: scripts/test_catalyst.sh FirebaseCoreInternal test FirebaseCoreInternal-Unit-Integration + + core-internal-cron-only: + # Don't run on private repo. + if: github.event_name == 'schedule' && github.repository == 'Firebase/firebase-ios-sdk' + runs-on: macos-15 + strategy: + matrix: + target: [ios, tvos, macos] + flags: [ + '--use-static-frameworks' + ] + needs: pod-lib-lint + steps: + - uses: actions/checkout@v4 + - uses: ruby/setup-ruby@354a1ad156761f5ee2b7b13fa8e09943a5e8d252 # v1 + - name: Xcode + run: sudo xcode-select -s /Applications/Xcode_16.2.app/Contents/Developer + - name: Setup Bundler + run: scripts/setup_bundler.sh + - name: PodLibLint CoreInternal Cron + run: scripts/third_party/travis/retry.sh scripts/pod_lib_lint.rb FirebaseCoreInternal.podspec --platforms=${{ matrix.target }} ${{ matrix.flags }} diff --git a/.github/workflows/crashlytics.yml b/.github/workflows/crashlytics.yml index 046883dd90c..07ff1b1def4 100644 --- a/.github/workflows/crashlytics.yml +++ b/.github/workflows/crashlytics.yml @@ -22,156 +22,157 @@ jobs: uses: ./.github/workflows/common.yml with: target: FirebaseCrashlyticsUnit -# pod-lib-lint: -# # 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: -# target: [ios, tvos, macos, watchos --skip-tests] -# flags: [ -# '--use-modular-headers --skip-tests', -# '' -# ] -# build-env: -# - os: macos-14 -# xcode: Xcode_16.2 -# tests: -# - os: macos-15 -# xcode: Xcode_16.2 -# tests: -# runs-on: ${{ matrix.build-env.os }} -# steps: -# - uses: actions/checkout@v4 -# - uses: ruby/setup-ruby@354a1ad156761f5ee2b7b13fa8e09943a5e8d252 # v1 -# - name: Setup Bundler -# run: scripts/setup_bundler.sh -# - name: Xcode -# run: sudo xcode-select -s /Applications/${{ matrix.build-env.xcode }}.app/Contents/Developer -# - uses: nick-fields/retry@ce71cc2ab81d554ebbe88c79ab5975992d79ba08 # v3 -# with: -# timeout_minutes: 120 -# max_attempts: 3 -# retry_on: error -# retry_wait_seconds: 120 -# command: scripts/pod_lib_lint.rb FirebaseCrashlytics.podspec --platforms=${{ matrix.target }} ${{ matrix.build-env.tests }} ${{ matrix.flags }} -# catalyst: -# # 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: catalyst${{ matrix.os }} -# - uses: ruby/setup-ruby@354a1ad156761f5ee2b7b13fa8e09943a5e8d252 # v1 -# - name: Setup Bundler -# run: scripts/setup_bundler.sh -# - name: Xcode -# run: sudo xcode-select -s /Applications/Xcode_16.2.app/Contents/Developer -# - uses: nick-fields/retry@ce71cc2ab81d554ebbe88c79ab5975992d79ba08 # v3 -# with: -# timeout_minutes: 120 -# max_attempts: 5 -# retry_on: error -# retry_wait_seconds: 120 -# command: scripts/test_catalyst.sh FirebaseCrashlytics test FirebaseCrashlytics-Unit-unit -# -# quickstart: -# # Don't run on private repo unless it is a PR. -# if: (github.repository == 'Firebase/firebase-ios-sdk' && github.event_name == 'schedule') || github.event_name == 'pull_request' -# -# env: -# plist_secret: ${{ secrets.GHASecretsGPGPassphrase1 }} -# signin_secret: ${{ secrets.GHASecretsGPGPassphrase1 }} -# runs-on: macos-15 -# steps: -# - uses: actions/checkout@v4 -# - uses: ruby/setup-ruby@354a1ad156761f5ee2b7b13fa8e09943a5e8d252 # v1 -# - name: Xcode -# run: sudo xcode-select -s /Applications/Xcode_16.2.app/Contents/Developer -# - name: Setup quickstart -# run: scripts/setup_quickstart.sh crashlytics -# env: -# LEGACY: true -# - name: Install Secret GoogleService-Info.plist -# run: scripts/decrypt_gha_secret.sh scripts/gha-encrypted/qs-crashlytics.plist.gpg \ -# quickstart-ios/crashlytics/GoogleService-Info.plist "$plist_secret" -# - name: Test swift quickstart -# run: | -# mkdir quickstart-ios/crashlytics/LegacyCrashlyticsQuickstart/Pods/FirebaseCrashlytics -# # Set the deployed pod location of run and upload-symbols with the development pod version. -# cp Crashlytics/run quickstart-ios/crashlytics/LegacyCrashlyticsQuickstart/Pods/FirebaseCrashlytics/ -# cp Crashlytics/upload-symbols quickstart-ios/crashlytics/LegacyCrashlyticsQuickstart/Pods/FirebaseCrashlytics/ -# ([ -z $plist_secret ] || scripts/third_party/travis/retry.sh scripts/test_quickstart.sh Crashlytics true swift) -# env: -# LEGACY: true -# -# 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 }} -# signin_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.2.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: -# # Don't run on private repo. -# if: github.event_name == 'schedule' && github.repository == 'Firebase/firebase-ios-sdk' -# -# runs-on: macos-15 -# strategy: -# matrix: -# # Disable watchos because it does not support XCTest. -# target: [ios, tvos, macos, watchos --skip-tests] -# flags: [ -# '--use-static-frameworks' -# ] -# needs: pod-lib-lint -# steps: -# - uses: actions/checkout@v4 -# - uses: ruby/setup-ruby@354a1ad156761f5ee2b7b13fa8e09943a5e8d252 # v1 -# - name: Setup Bundler -# run: scripts/setup_bundler.sh -# - name: Xcode -# run: sudo xcode-select -s /Applications/Xcode_16.2.app/Contents/Developer -# - uses: nick-fields/retry@ce71cc2ab81d554ebbe88c79ab5975992d79ba08 # v3 -# with: -# timeout_minutes: 120 -# max_attempts: 3 -# retry_on: error -# retry_wait_seconds: 120 -# command: scripts/third_party/travis/retry.sh scripts/pod_lib_lint.rb FirebaseCrashlytics.podspec --platforms=${{ matrix.target }} ${{ matrix.flags }} + pod-lib-lint: + # 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: + target: [ios, tvos, macos, watchos --skip-tests] + flags: [ + '--use-modular-headers --skip-tests', + '' + ] + build-env: + - os: macos-14 + xcode: Xcode_16.2 + tests: + - os: macos-15 + xcode: Xcode_16.2 + tests: + runs-on: ${{ matrix.build-env.os }} + steps: + - uses: actions/checkout@v4 + - uses: ruby/setup-ruby@354a1ad156761f5ee2b7b13fa8e09943a5e8d252 # v1 + - name: Setup Bundler + run: scripts/setup_bundler.sh + - name: Xcode + run: sudo xcode-select -s /Applications/${{ matrix.build-env.xcode }}.app/Contents/Developer + - uses: nick-fields/retry@ce71cc2ab81d554ebbe88c79ab5975992d79ba08 # v3 + with: + timeout_minutes: 120 + max_attempts: 3 + retry_on: error + retry_wait_seconds: 120 + command: scripts/pod_lib_lint.rb FirebaseCrashlytics.podspec --platforms=${{ matrix.target }} ${{ matrix.build-env.tests }} ${{ matrix.flags }} + + catalyst: + # 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: catalyst${{ matrix.os }} + - uses: ruby/setup-ruby@354a1ad156761f5ee2b7b13fa8e09943a5e8d252 # v1 + - name: Setup Bundler + run: scripts/setup_bundler.sh + - name: Xcode + run: sudo xcode-select -s /Applications/Xcode_16.2.app/Contents/Developer + - uses: nick-fields/retry@ce71cc2ab81d554ebbe88c79ab5975992d79ba08 # v3 + with: + timeout_minutes: 120 + max_attempts: 5 + retry_on: error + retry_wait_seconds: 120 + command: scripts/test_catalyst.sh FirebaseCrashlytics test FirebaseCrashlytics-Unit-unit + + quickstart: + # Don't run on private repo unless it is a PR. + if: (github.repository == 'Firebase/firebase-ios-sdk' && github.event_name == 'schedule') || github.event_name == 'pull_request' + + env: + plist_secret: ${{ secrets.GHASecretsGPGPassphrase1 }} + signin_secret: ${{ secrets.GHASecretsGPGPassphrase1 }} + runs-on: macos-15 + steps: + - uses: actions/checkout@v4 + - uses: ruby/setup-ruby@354a1ad156761f5ee2b7b13fa8e09943a5e8d252 # v1 + - name: Xcode + run: sudo xcode-select -s /Applications/Xcode_16.2.app/Contents/Developer + - name: Setup quickstart + run: scripts/setup_quickstart.sh crashlytics + env: + LEGACY: true + - name: Install Secret GoogleService-Info.plist + run: scripts/decrypt_gha_secret.sh scripts/gha-encrypted/qs-crashlytics.plist.gpg \ + quickstart-ios/crashlytics/GoogleService-Info.plist "$plist_secret" + - name: Test swift quickstart + run: | + mkdir quickstart-ios/crashlytics/LegacyCrashlyticsQuickstart/Pods/FirebaseCrashlytics + # Set the deployed pod location of run and upload-symbols with the development pod version. + cp Crashlytics/run quickstart-ios/crashlytics/LegacyCrashlyticsQuickstart/Pods/FirebaseCrashlytics/ + cp Crashlytics/upload-symbols quickstart-ios/crashlytics/LegacyCrashlyticsQuickstart/Pods/FirebaseCrashlytics/ + ([ -z $plist_secret ] || scripts/third_party/travis/retry.sh scripts/test_quickstart.sh Crashlytics true swift) + env: + LEGACY: true + + 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 }} + signin_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.2.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: + # Don't run on private repo. + if: github.event_name == 'schedule' && github.repository == 'Firebase/firebase-ios-sdk' + + runs-on: macos-15 + strategy: + matrix: + # Disable watchos because it does not support XCTest. + target: [ios, tvos, macos, watchos --skip-tests] + flags: [ + '--use-static-frameworks' + ] + needs: pod-lib-lint + steps: + - uses: actions/checkout@v4 + - uses: ruby/setup-ruby@354a1ad156761f5ee2b7b13fa8e09943a5e8d252 # v1 + - name: Setup Bundler + run: scripts/setup_bundler.sh + - name: Xcode + run: sudo xcode-select -s /Applications/Xcode_16.2.app/Contents/Developer + - uses: nick-fields/retry@ce71cc2ab81d554ebbe88c79ab5975992d79ba08 # v3 + with: + timeout_minutes: 120 + max_attempts: 3 + retry_on: error + retry_wait_seconds: 120 + command: scripts/third_party/travis/retry.sh scripts/pod_lib_lint.rb FirebaseCrashlytics.podspec --platforms=${{ matrix.target }} ${{ matrix.flags }} diff --git a/.github/workflows/database.yml b/.github/workflows/database.yml index fb6d7c35db4..7a1b286cb4d 100644 --- a/.github/workflows/database.yml +++ b/.github/workflows/database.yml @@ -29,105 +29,105 @@ jobs: with: target: ${{ matrix.target }} -# pod-lib-lint: -# # 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: -# target: [ios, tvos, macos --skip-tests, watchos] -# build-env: -# - os: macos-14 -# xcode: Xcode_16.2 -# - os: macos-15 -# xcode: Xcode_16.2 -# runs-on: ${{ matrix.build-env.os }} -# steps: -# - uses: actions/checkout@v4 -# - uses: ruby/setup-ruby@354a1ad156761f5ee2b7b13fa8e09943a5e8d252 # v1 -# - name: Setup Bundler -# run: scripts/setup_bundler.sh -# - name: Xcode -# run: sudo xcode-select -s /Applications/${{ matrix.build-env.xcode }}.app/Contents/Developer -# - name: Build and test -# run: scripts/third_party/travis/retry.sh scripts/pod_lib_lint.rb FirebaseDatabase.podspec --test-specs=unit --platforms=${{ matrix.target }} -# -# 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.2.app/Contents/Developer -# - name: IntegrationTest -# # Only iOS to mitigate flakes. -# run: scripts/third_party/travis/retry.sh scripts/build.sh Database iOS integration + pod-lib-lint: + # 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: + target: [ios, tvos, macos --skip-tests, watchos] + build-env: + - os: macos-14 + xcode: Xcode_16.2 + - os: macos-15 + xcode: Xcode_16.2 + runs-on: ${{ matrix.build-env.os }} + steps: + - uses: actions/checkout@v4 + - uses: ruby/setup-ruby@354a1ad156761f5ee2b7b13fa8e09943a5e8d252 # v1 + - name: Setup Bundler + run: scripts/setup_bundler.sh + - name: Xcode + run: sudo xcode-select -s /Applications/${{ matrix.build-env.xcode }}.app/Contents/Developer + - name: Build and test + run: scripts/third_party/travis/retry.sh scripts/pod_lib_lint.rb FirebaseDatabase.podspec --test-specs=unit --platforms=${{ matrix.target }} + + 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.2.app/Contents/Developer + - name: IntegrationTest + # Only iOS to mitigate flakes. + run: scripts/third_party/travis/retry.sh scripts/build.sh Database iOS integration + + catalyst: + # 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: catalyst${{ matrix.os }} + - uses: ruby/setup-ruby@354a1ad156761f5ee2b7b13fa8e09943a5e8d252 # v1 + - name: Setup Bundler + run: scripts/setup_bundler.sh + - name: Xcode + run: sudo xcode-select -s /Applications/Xcode_16.2.app/Contents/Developer + - name: Setup project and Build for Catalyst + run: scripts/test_catalyst.sh FirebaseDatabase test FirebaseDatabase-Unit-unit -# catalyst: -# # 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: catalyst${{ matrix.os }} -# - uses: ruby/setup-ruby@354a1ad156761f5ee2b7b13fa8e09943a5e8d252 # v1 -# - name: Setup Bundler -# run: scripts/setup_bundler.sh -# - name: Xcode -# run: sudo xcode-select -s /Applications/Xcode_16.2.app/Contents/Developer -# - name: Setup project and Build for Catalyst -# run: scripts/test_catalyst.sh FirebaseDatabase test FirebaseDatabase-Unit-unit -# -# quickstart: -# # Don't run on private repo unless it is a PR. -# if: (github.repository == 'Firebase/firebase-ios-sdk' && github.event_name == 'schedule') || github.event_name == 'pull_request' -# env: -# plist_secret: ${{ secrets.GHASecretsGPGPassphrase1 }} -# signin_secret: ${{ secrets.GHASecretsGPGPassphrase1 }} -# runs-on: macos-15 -# steps: -# - uses: actions/checkout@v4 -# - uses: ruby/setup-ruby@354a1ad156761f5ee2b7b13fa8e09943a5e8d252 # v1 -# - name: Setup quickstart -# run: scripts/setup_quickstart.sh database -# - name: Install Secret GoogleService-Info.plist -# run: scripts/decrypt_gha_secret.sh scripts/gha-encrypted/qs-database.plist.gpg \ -# quickstart-ios/database/GoogleService-Info.plist "$plist_secret" -# - name: Xcode -# run: sudo xcode-select -s /Applications/Xcode_16.2.app/Contents/Developer -# - name: Test objc quickstart -# run: ([ -z $plist_secret ] || scripts/third_party/travis/retry.sh scripts/test_quickstart.sh Database false) -# - name: Test swift quickstart -# run: ([ -z $plist_secret ] || scripts/third_party/travis/retry.sh scripts/test_quickstart.sh Database false swift) -# -# database-cron-only: -# # Don't run on private repo. -# if: github.event_name == 'schedule' && github.repository == 'Firebase/firebase-ios-sdk' -# runs-on: macos-15 -# strategy: -# matrix: -# podspec: [FirebaseDatabase.podspec] -# target: [ios, tvos, macos] -# flags: [ -# '--skip-tests --use-static-frameworks' -# ] -# needs: pod-lib-lint -# steps: -# - uses: actions/checkout@v4 -# - uses: ruby/setup-ruby@354a1ad156761f5ee2b7b13fa8e09943a5e8d252 # v1 -# - name: Xcode -# run: sudo xcode-select -s /Applications/Xcode_16.2.app/Contents/Developer -# - name: Setup Bundler -# run: scripts/setup_bundler.sh -# - name: PodLibLint database Cron -# run: scripts/third_party/travis/retry.sh scripts/pod_lib_lint.rb ${{ matrix.podspec }} --platforms=${{ matrix.target }} ${{ matrix.flags }} + quickstart: + # Don't run on private repo unless it is a PR. + if: (github.repository == 'Firebase/firebase-ios-sdk' && github.event_name == 'schedule') || github.event_name == 'pull_request' + env: + plist_secret: ${{ secrets.GHASecretsGPGPassphrase1 }} + signin_secret: ${{ secrets.GHASecretsGPGPassphrase1 }} + runs-on: macos-15 + steps: + - uses: actions/checkout@v4 + - uses: ruby/setup-ruby@354a1ad156761f5ee2b7b13fa8e09943a5e8d252 # v1 + - name: Setup quickstart + run: scripts/setup_quickstart.sh database + - name: Install Secret GoogleService-Info.plist + run: scripts/decrypt_gha_secret.sh scripts/gha-encrypted/qs-database.plist.gpg \ + quickstart-ios/database/GoogleService-Info.plist "$plist_secret" + - name: Xcode + run: sudo xcode-select -s /Applications/Xcode_16.2.app/Contents/Developer + - name: Test objc quickstart + run: ([ -z $plist_secret ] || scripts/third_party/travis/retry.sh scripts/test_quickstart.sh Database false) + - name: Test swift quickstart + run: ([ -z $plist_secret ] || scripts/third_party/travis/retry.sh scripts/test_quickstart.sh Database false swift) + + database-cron-only: + # Don't run on private repo. + if: github.event_name == 'schedule' && github.repository == 'Firebase/firebase-ios-sdk' + runs-on: macos-15 + strategy: + matrix: + podspec: [FirebaseDatabase.podspec] + target: [ios, tvos, macos] + flags: [ + '--skip-tests --use-static-frameworks' + ] + needs: pod-lib-lint + steps: + - uses: actions/checkout@v4 + - uses: ruby/setup-ruby@354a1ad156761f5ee2b7b13fa8e09943a5e8d252 # v1 + - name: Xcode + run: sudo xcode-select -s /Applications/Xcode_16.2.app/Contents/Developer + - name: Setup Bundler + run: scripts/setup_bundler.sh + - name: PodLibLint database Cron + run: scripts/third_party/travis/retry.sh scripts/pod_lib_lint.rb ${{ matrix.podspec }} --platforms=${{ matrix.target }} ${{ matrix.flags }} diff --git a/.github/workflows/mlmodeldownloader.yml b/.github/workflows/mlmodeldownloader.yml index 41d42d6eff0..3f59912e4ad 100644 --- a/.github/workflows/mlmodeldownloader.yml +++ b/.github/workflows/mlmodeldownloader.yml @@ -21,100 +21,100 @@ jobs: with: target: FirebaseMLModelDownloaderUnit -# pod-lib-lint: -# if: (github.repository == 'Firebase/firebase-ios-sdk' && github.event_name == 'schedule') || github.event_name == 'pull_request' -# env: -# plist_secret: ${{ secrets.GHASecretsGPGPassphrase1 }} -# strategy: -# matrix: -# target: [ios, tvos, macos, watchos] -# build-env: -# - os: macos-14 -# xcode: Xcode_16.2 -# - os: macos-15 -# xcode: Xcode_16.2 -# runs-on: ${{ matrix.build-env.os }} -# steps: -# - uses: actions/checkout@v4 -# - uses: ruby/setup-ruby@354a1ad156761f5ee2b7b13fa8e09943a5e8d252 # v1 -# - name: Setup Bundler -# run: scripts/setup_bundler.sh -# - name: Configure test keychain -# run: scripts/configure_test_keychain.sh -# - name: Install GoogleService-Info.plist -# run: | -# mkdir FirebaseMLModelDownloader/Tests/Integration/Resources -# scripts/decrypt_gha_secret.sh scripts/gha-encrypted/MLModelDownloader/GoogleService-Info.plist.gpg \ -# FirebaseMLModelDownloader/Tests/Integration/Resources/GoogleService-Info.plist "$plist_secret" -# - name: Xcode -# run: sudo xcode-select -s /Applications/${{ matrix.build-env.xcode }}.app/Contents/Developer -# - name: Build and test -# run: ([ -z $plist_secret ] || scripts/third_party/travis/retry.sh scripts/pod_lib_lint.rb FirebaseMLModelDownloader.podspec --platforms=${{ matrix.target }}) -# -# mlmodeldownloader-cron-only: -# if: github.event_name == 'schedule' && github.repository == 'Firebase/firebase-ios-sdk' -# runs-on: macos-15 -# env: -# plist_secret: ${{ secrets.GHASecretsGPGPassphrase1 }} -# strategy: -# matrix: -# target: [ios, tvos, macos] -# needs: pod-lib-lint -# steps: -# - uses: actions/checkout@v4 -# - uses: ruby/setup-ruby@354a1ad156761f5ee2b7b13fa8e09943a5e8d252 # v1 -# - name: Xcode -# run: sudo xcode-select -s /Applications/Xcode_16.2.app/Contents/Developer -# - name: Setup Bundler -# run: scripts/setup_bundler.sh -# - name: Configure test keychain -# run: scripts/configure_test_keychain.sh -# - name: Install GoogleService-Info.plist -# run: | -# mkdir FirebaseMLModelDownloader/Tests/Integration/Resources -# scripts/decrypt_gha_secret.sh scripts/gha-encrypted/MLModelDownloader/GoogleService-Info.plist.gpg \ -# FirebaseMLModelDownloader/Tests/Integration/Resources/GoogleService-Info.plist "$plist_secret" -# - name: PodLibLint MLModelDownloader Cron -# run: scripts/third_party/travis/retry.sh scripts/pod_lib_lint.rb FirebaseMLModelDownloader.podspec --platforms=${{ matrix.target }} --use-static-frameworks -# -# catalyst: -# 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: catalyst${{ matrix.os }} -# - uses: ruby/setup-ruby@354a1ad156761f5ee2b7b13fa8e09943a5e8d252 # v1 -# - name: Setup Bundler -# run: scripts/setup_bundler.sh -# - name: Xcode -# run: sudo xcode-select -s /Applications/Xcode_16.2.app/Contents/Developer -# - name: Setup project and Build Catalyst -# run: scripts/test_catalyst.sh FirebaseMLModelDownloader test FirebaseMLModelDownloader-Unit-unit -# -# mlmodeldownloader-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: build-test${{ matrix.os }} -# - uses: ruby/setup-ruby@354a1ad156761f5ee2b7b13fa8e09943a5e8d252 # v1 -# - name: Xcode -# run: sudo xcode-select -s /Applications/Xcode_16.2.app/Contents/Developer -# - name: Setup Bundler -# run: scripts/setup_bundler.sh -# - name: Install GoogleService-Info.plist -# run: | -# mkdir FirebaseMLModelDownloader/Apps/Sample/Resources -# scripts/decrypt_gha_secret.sh scripts/gha-encrypted/MLModelDownloader/GoogleService-Info.plist.gpg \ -# FirebaseMLModelDownloader/Apps/Sample/Resources/GoogleService-Info.plist "$plist_secret" -# - name: Prereqs -# run: scripts/install_prereqs.sh MLModelDownloaderSample iOS -# - name: Build -# run: ([ -z $plist_secret ] || scripts/build.sh MLModelDownloaderSample iOS) + pod-lib-lint: + if: (github.repository == 'Firebase/firebase-ios-sdk' && github.event_name == 'schedule') || github.event_name == 'pull_request' + env: + plist_secret: ${{ secrets.GHASecretsGPGPassphrase1 }} + strategy: + matrix: + target: [ios, tvos, macos, watchos] + build-env: + - os: macos-14 + xcode: Xcode_16.2 + - os: macos-15 + xcode: Xcode_16.2 + runs-on: ${{ matrix.build-env.os }} + steps: + - uses: actions/checkout@v4 + - uses: ruby/setup-ruby@354a1ad156761f5ee2b7b13fa8e09943a5e8d252 # v1 + - name: Setup Bundler + run: scripts/setup_bundler.sh + - name: Configure test keychain + run: scripts/configure_test_keychain.sh + - name: Install GoogleService-Info.plist + run: | + mkdir FirebaseMLModelDownloader/Tests/Integration/Resources + scripts/decrypt_gha_secret.sh scripts/gha-encrypted/MLModelDownloader/GoogleService-Info.plist.gpg \ + FirebaseMLModelDownloader/Tests/Integration/Resources/GoogleService-Info.plist "$plist_secret" + - name: Xcode + run: sudo xcode-select -s /Applications/${{ matrix.build-env.xcode }}.app/Contents/Developer + - name: Build and test + run: ([ -z $plist_secret ] || scripts/third_party/travis/retry.sh scripts/pod_lib_lint.rb FirebaseMLModelDownloader.podspec --platforms=${{ matrix.target }}) + + mlmodeldownloader-cron-only: + if: github.event_name == 'schedule' && github.repository == 'Firebase/firebase-ios-sdk' + runs-on: macos-15 + env: + plist_secret: ${{ secrets.GHASecretsGPGPassphrase1 }} + strategy: + matrix: + target: [ios, tvos, macos] + needs: pod-lib-lint + steps: + - uses: actions/checkout@v4 + - uses: ruby/setup-ruby@354a1ad156761f5ee2b7b13fa8e09943a5e8d252 # v1 + - name: Xcode + run: sudo xcode-select -s /Applications/Xcode_16.2.app/Contents/Developer + - name: Setup Bundler + run: scripts/setup_bundler.sh + - name: Configure test keychain + run: scripts/configure_test_keychain.sh + - name: Install GoogleService-Info.plist + run: | + mkdir FirebaseMLModelDownloader/Tests/Integration/Resources + scripts/decrypt_gha_secret.sh scripts/gha-encrypted/MLModelDownloader/GoogleService-Info.plist.gpg \ + FirebaseMLModelDownloader/Tests/Integration/Resources/GoogleService-Info.plist "$plist_secret" + - name: PodLibLint MLModelDownloader Cron + run: scripts/third_party/travis/retry.sh scripts/pod_lib_lint.rb FirebaseMLModelDownloader.podspec --platforms=${{ matrix.target }} --use-static-frameworks + + catalyst: + 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: catalyst${{ matrix.os }} + - uses: ruby/setup-ruby@354a1ad156761f5ee2b7b13fa8e09943a5e8d252 # v1 + - name: Setup Bundler + run: scripts/setup_bundler.sh + - name: Xcode + run: sudo xcode-select -s /Applications/Xcode_16.2.app/Contents/Developer + - name: Setup project and Build Catalyst + run: scripts/test_catalyst.sh FirebaseMLModelDownloader test FirebaseMLModelDownloader-Unit-unit + + mlmodeldownloader-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: build-test${{ matrix.os }} + - uses: ruby/setup-ruby@354a1ad156761f5ee2b7b13fa8e09943a5e8d252 # v1 + - name: Xcode + run: sudo xcode-select -s /Applications/Xcode_16.2.app/Contents/Developer + - name: Setup Bundler + run: scripts/setup_bundler.sh + - name: Install GoogleService-Info.plist + run: | + mkdir FirebaseMLModelDownloader/Apps/Sample/Resources + scripts/decrypt_gha_secret.sh scripts/gha-encrypted/MLModelDownloader/GoogleService-Info.plist.gpg \ + FirebaseMLModelDownloader/Apps/Sample/Resources/GoogleService-Info.plist "$plist_secret" + - name: Prereqs + run: scripts/install_prereqs.sh MLModelDownloaderSample iOS + - name: Build + run: ([ -z $plist_secret ] || scripts/build.sh MLModelDownloaderSample iOS) diff --git a/.github/workflows/sessions.yml b/.github/workflows/sessions.yml index b37c7f049b1..33e9dbfba9b 100644 --- a/.github/workflows/sessions.yml +++ b/.github/workflows/sessions.yml @@ -21,57 +21,57 @@ jobs: uses: ./.github/workflows/common.yml with: target: FirebaseSessionsUnit -# -# pod-lib-lint: -# # 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: -# target: [ios, tvos, macos, watchos] -# build-env: -# - os: macos-14 -# xcode: Xcode_16.2 -# tests: -# # Flaky tests on CI -# - os: macos-15 -# xcode: Xcode_16.2 -# tests: --skip-tests -# runs-on: ${{ matrix.build-env.os }} -# steps: -# - uses: actions/checkout@v4 -# - uses: ruby/setup-ruby@354a1ad156761f5ee2b7b13fa8e09943a5e8d252 # v1 -# - name: Setup Bundler -# run: scripts/setup_bundler.sh -# - name: Xcode -# run: sudo xcode-select -s /Applications/${{ matrix.build-env.xcode }}.app/Contents/Developer -# - uses: nick-fields/retry@ce71cc2ab81d554ebbe88c79ab5975992d79ba08 # v3 -# with: -# timeout_minutes: 120 -# max_attempts: 3 -# retry_on: error -# retry_wait_seconds: 120 -# command: scripts/third_party/travis/retry.sh scripts/pod_lib_lint.rb FirebaseSessions.podspec --platforms=${{ matrix.target }} ${{ matrix.build-env.tests }} -# -# catalyst: -# # 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: catalyst${{ matrix.os }} -# - uses: ruby/setup-ruby@354a1ad156761f5ee2b7b13fa8e09943a5e8d252 # v1 -# - name: Setup Bundler -# run: scripts/setup_bundler.sh -# - name: Xcode -# run: sudo xcode-select -s /Applications/Xcode_16.2.app/Contents/Developer -# - uses: nick-fields/retry@ce71cc2ab81d554ebbe88c79ab5975992d79ba08 # v3 -# with: -# timeout_minutes: 120 -# max_attempts: 3 -# retry_on: error -# retry_wait_seconds: 120 -# command: scripts/test_catalyst.sh FirebaseSessions test FirebaseSessions-Unit-unit + + pod-lib-lint: + # 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: + target: [ios, tvos, macos, watchos] + build-env: + - os: macos-14 + xcode: Xcode_16.2 + tests: + # Flaky tests on CI + - os: macos-15 + xcode: Xcode_16.2 + tests: --skip-tests + runs-on: ${{ matrix.build-env.os }} + steps: + - uses: actions/checkout@v4 + - uses: ruby/setup-ruby@354a1ad156761f5ee2b7b13fa8e09943a5e8d252 # v1 + - name: Setup Bundler + run: scripts/setup_bundler.sh + - name: Xcode + run: sudo xcode-select -s /Applications/${{ matrix.build-env.xcode }}.app/Contents/Developer + - uses: nick-fields/retry@ce71cc2ab81d554ebbe88c79ab5975992d79ba08 # v3 + with: + timeout_minutes: 120 + max_attempts: 3 + retry_on: error + retry_wait_seconds: 120 + command: scripts/third_party/travis/retry.sh scripts/pod_lib_lint.rb FirebaseSessions.podspec --platforms=${{ matrix.target }} ${{ matrix.build-env.tests }} + + catalyst: + # 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: catalyst${{ matrix.os }} + - uses: ruby/setup-ruby@354a1ad156761f5ee2b7b13fa8e09943a5e8d252 # v1 + - name: Setup Bundler + run: scripts/setup_bundler.sh + - name: Xcode + run: sudo xcode-select -s /Applications/Xcode_16.2.app/Contents/Developer + - uses: nick-fields/retry@ce71cc2ab81d554ebbe88c79ab5975992d79ba08 # v3 + with: + timeout_minutes: 120 + max_attempts: 3 + retry_on: error + retry_wait_seconds: 120 + command: scripts/test_catalyst.sh FirebaseSessions test FirebaseSessions-Unit-unit diff --git a/.github/workflows/shared-swift.yml b/.github/workflows/shared-swift.yml index ed19242e07c..fe1b1e20303 100644 --- a/.github/workflows/shared-swift.yml +++ b/.github/workflows/shared-swift.yml @@ -22,32 +22,32 @@ jobs: with: target: FirebaseSharedSwiftTests -# pod-lib-lint: -# # 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: -# target: [ios, tvos, macos, watchos] -# build-env: -# - os: macos-14 -# xcode: Xcode_16.2 -# swift_version: 5.9 -# - os: macos-15 -# xcode: Xcode_16.2 -# swift_version: 5.9 -# - os: macos-15 -# xcode: Xcode_16.2 -# swift_version: 6.0 -# runs-on: ${{ matrix.build-env.os }} -# steps: -# - uses: actions/checkout@v4 -# - uses: ruby/setup-ruby@354a1ad156761f5ee2b7b13fa8e09943a5e8d252 # v1 -# - name: Setup Bundler -# run: scripts/setup_bundler.sh -# - name: Xcode -# run: sudo xcode-select -s /Applications/${{ matrix.build-env.xcode }}.app/Contents/Developer -# - name: Set Swift swift_version -# run: sed -i "" "s/s.swift_version[[:space:]]*=[[:space:]]*'5.9'/s.swift_version = '${{ matrix.build-env.swift_version }}'/" FirebaseSharedSwift.podspec -# - name: Build and test -# run: scripts/third_party/travis/retry.sh scripts/pod_lib_lint.rb FirebaseSharedSwift.podspec --platforms=${{ matrix.target }} + pod-lib-lint: + # 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: + target: [ios, tvos, macos, watchos] + build-env: + - os: macos-14 + xcode: Xcode_16.2 + swift_version: 5.9 + - os: macos-15 + xcode: Xcode_16.2 + swift_version: 5.9 + - os: macos-15 + xcode: Xcode_16.2 + swift_version: 6.0 + runs-on: ${{ matrix.build-env.os }} + steps: + - uses: actions/checkout@v4 + - uses: ruby/setup-ruby@354a1ad156761f5ee2b7b13fa8e09943a5e8d252 # v1 + - name: Setup Bundler + run: scripts/setup_bundler.sh + - name: Xcode + run: sudo xcode-select -s /Applications/${{ matrix.build-env.xcode }}.app/Contents/Developer + - name: Set Swift swift_version + run: sed -i "" "s/s.swift_version[[:space:]]*=[[:space:]]*'5.9'/s.swift_version = '${{ matrix.build-env.swift_version }}'/" FirebaseSharedSwift.podspec + - name: Build and test + run: scripts/third_party/travis/retry.sh scripts/pod_lib_lint.rb FirebaseSharedSwift.podspec --platforms=${{ matrix.target }} diff --git a/.github/workflows/storage.yml b/.github/workflows/storage.yml index 015bbd3369b..1b11f50f516 100644 --- a/.github/workflows/storage.yml +++ b/.github/workflows/storage.yml @@ -23,177 +23,177 @@ jobs: with: target: FirebaseStorageUnit -# 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.2 -# 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: 120 -# max_attempts: 3 -# retry_on: error -# 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.2 + 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: 120 + max_attempts: 3 + retry_on: error + retry_wait_seconds: 120 + command: ([ -z $plist_secret ] || scripts/build.sh Storage${{ matrix.language }} all) -# catalyst: -# # 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: catalyst${{ matrix.os }} -# - uses: ruby/setup-ruby@354a1ad156761f5ee2b7b13fa8e09943a5e8d252 # v1 -# - name: Setup Bundler -# run: scripts/setup_bundler.sh -# - name: Xcode -# run: sudo xcode-select -s /Applications/Xcode_16.2.app/Contents/Developer -# - uses: nick-fields/retry@ce71cc2ab81d554ebbe88c79ab5975992d79ba08 # v3 -# with: -# timeout_minutes: 120 -# max_attempts: 3 -# retry_on: error -# retry_wait_seconds: 120 -# command: scripts/test_catalyst.sh FirebaseStorage test FirebaseStorage-Unit-unit -# -# 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' -# # TODO: See #12399 and restore Objective-C testing for Xcode 15 if GHA is fixed. -# strategy: -# matrix: -# include: -# #- os: macos-13 -# # xcode: Xcode_14.2 # TODO: the legacy ObjC quickstart doesn't build with Xcode 15. -# - swift: swift -# os: macos-15 -# xcode: Xcode_16.2 -# env: -# plist_secret: ${{ secrets.GHASecretsGPGPassphrase1 }} -# signin_secret: ${{ secrets.GHASecretsGPGPassphrase1 }} -# LEGACY: true -# runs-on: ${{ matrix.os }} -# steps: -# - uses: actions/checkout@v4 -# - uses: ruby/setup-ruby@354a1ad156761f5ee2b7b13fa8e09943a5e8d252 # v1 -# - 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: Xcode -# run: sudo xcode-select -s /Applications/${{ matrix.xcode }}.app/Contents/Developer -# - name: Test quickstart -# run: ([ -z $plist_secret ] || scripts/third_party/travis/retry.sh scripts/test_quickstart.sh Storage false ${{ matrix.swift }}) -# -# 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 }} -# signin_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: -# # 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: -# target: [ios, tvos, macos, watchos] -# build-env: -# - os: macos-15 -# xcode: Xcode_16.2 -# tests: --skip-tests -# - os: macos-15 -# xcode: Xcode_16.2 -# tests: --test-specs=unit -# runs-on: ${{ matrix.build-env.os }} -# steps: -# - uses: actions/checkout@v4 -# - uses: ruby/setup-ruby@354a1ad156761f5ee2b7b13fa8e09943a5e8d252 # v1 -# - name: Setup Bundler -# run: scripts/setup_bundler.sh -# - name: Xcodes -# run: ls -l /Applications/Xcode* -# - name: Xcode -# run: sudo xcode-select -s /Applications/${{ matrix.build-env.xcode }}.app/Contents/Developer -# - name: Build and test -# run: | -# scripts/third_party/travis/retry.sh scripts/pod_lib_lint.rb FirebaseStorage.podspec ${{ matrix.build-env.tests }} \ -# --platforms=${{ matrix.target }} -# -# storage-cron-only: -# # Don't run on private repo. -# if: github.event_name == 'schedule' && github.repository == 'Firebase/firebase-ios-sdk' -# strategy: -# matrix: -# target: [ios, tvos, macos, watchos] -# build-env: -# - os: macos-14 -# xcode: Xcode_16.2 -# - os: macos-15 -# xcode: Xcode_16.2 -# runs-on: ${{ matrix.build-env.os }} -# needs: pod-lib-lint -# steps: -# - uses: actions/checkout@v4 -# - uses: ruby/setup-ruby@354a1ad156761f5ee2b7b13fa8e09943a5e8d252 # v1 -# - name: Setup Bundler -# run: scripts/setup_bundler.sh -# - name: Xcode -# run: sudo xcode-select -s /Applications/${{ matrix.build-env.xcode }}.app/Contents/Developer -# - name: PodLibLint Storage Cron -# run: scripts/third_party/travis/retry.sh scripts/pod_lib_lint.rb FirebaseStorage.podspec --platforms=${{ matrix.target }} --use-static-frameworks --skip-tests + catalyst: + # 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: catalyst${{ matrix.os }} + - uses: ruby/setup-ruby@354a1ad156761f5ee2b7b13fa8e09943a5e8d252 # v1 + - name: Setup Bundler + run: scripts/setup_bundler.sh + - name: Xcode + run: sudo xcode-select -s /Applications/Xcode_16.2.app/Contents/Developer + - uses: nick-fields/retry@ce71cc2ab81d554ebbe88c79ab5975992d79ba08 # v3 + with: + timeout_minutes: 120 + max_attempts: 3 + retry_on: error + retry_wait_seconds: 120 + command: scripts/test_catalyst.sh FirebaseStorage test FirebaseStorage-Unit-unit + + 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' + # TODO: See #12399 and restore Objective-C testing for Xcode 15 if GHA is fixed. + strategy: + matrix: + include: + #- os: macos-13 + # xcode: Xcode_14.2 # TODO: the legacy ObjC quickstart doesn't build with Xcode 15. + - swift: swift + os: macos-15 + xcode: Xcode_16.2 + env: + plist_secret: ${{ secrets.GHASecretsGPGPassphrase1 }} + signin_secret: ${{ secrets.GHASecretsGPGPassphrase1 }} + LEGACY: true + runs-on: ${{ matrix.os }} + steps: + - uses: actions/checkout@v4 + - uses: ruby/setup-ruby@354a1ad156761f5ee2b7b13fa8e09943a5e8d252 # v1 + - 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: Xcode + run: sudo xcode-select -s /Applications/${{ matrix.xcode }}.app/Contents/Developer + - name: Test quickstart + run: ([ -z $plist_secret ] || scripts/third_party/travis/retry.sh scripts/test_quickstart.sh Storage false ${{ matrix.swift }}) + + 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 }} + signin_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: + # 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: + target: [ios, tvos, macos, watchos] + build-env: + - os: macos-15 + xcode: Xcode_16.2 + tests: --skip-tests + - os: macos-15 + xcode: Xcode_16.2 + tests: --test-specs=unit + runs-on: ${{ matrix.build-env.os }} + steps: + - uses: actions/checkout@v4 + - uses: ruby/setup-ruby@354a1ad156761f5ee2b7b13fa8e09943a5e8d252 # v1 + - name: Setup Bundler + run: scripts/setup_bundler.sh + - name: Xcodes + run: ls -l /Applications/Xcode* + - name: Xcode + run: sudo xcode-select -s /Applications/${{ matrix.build-env.xcode }}.app/Contents/Developer + - name: Build and test + run: | + scripts/third_party/travis/retry.sh scripts/pod_lib_lint.rb FirebaseStorage.podspec ${{ matrix.build-env.tests }} \ + --platforms=${{ matrix.target }} + + storage-cron-only: + # Don't run on private repo. + if: github.event_name == 'schedule' && github.repository == 'Firebase/firebase-ios-sdk' + strategy: + matrix: + target: [ios, tvos, macos, watchos] + build-env: + - os: macos-14 + xcode: Xcode_16.2 + - os: macos-15 + xcode: Xcode_16.2 + runs-on: ${{ matrix.build-env.os }} + needs: pod-lib-lint + steps: + - uses: actions/checkout@v4 + - uses: ruby/setup-ruby@354a1ad156761f5ee2b7b13fa8e09943a5e8d252 # v1 + - name: Setup Bundler + run: scripts/setup_bundler.sh + - name: Xcode + run: sudo xcode-select -s /Applications/${{ matrix.build-env.xcode }}.app/Contents/Developer + - name: PodLibLint Storage Cron + run: scripts/third_party/travis/retry.sh scripts/pod_lib_lint.rb FirebaseStorage.podspec --platforms=${{ matrix.target }} --use-static-frameworks --skip-tests From d488308d0760a4adc708c346623c8a2debe21966 Mon Sep 17 00:00:00 2001 From: Nick Cooke Date: Mon, 21 Apr 2025 12:40:39 -0400 Subject: [PATCH 12/24] Add support for buildonly platforms --- .github/workflows/common.yml | 12 ++++++++++-- 1 file changed, 10 insertions(+), 2 deletions(-) diff --git a/.github/workflows/common.yml b/.github/workflows/common.yml index 80b0b83d70e..2c75a00a640 100644 --- a/.github/workflows/common.yml +++ b/.github/workflows/common.yml @@ -3,9 +3,17 @@ name: common on: workflow_call: inputs: + # The target scheme to be tested. target: - required: true type: string + required: true + # By default, all platforms will be tested (see matrix in `spm` job). + # To build instead of test, pass a comma/space separated string of + # platforms (e.g. "macos tvos"). + buildonly_platforms: + type: string + required: false + default: "" jobs: spm-package-resolved: @@ -66,4 +74,4 @@ jobs: max_attempts: 3 retry_on: error retry_wait_seconds: 120 - command: ./scripts/build.sh ${{ inputs.target }} ${{ matrix.platform }} spm + command: ./scripts/build.sh ${{ inputs.target }} ${{ matrix.platform }} ${{ contains(inputs.buildonly_platforms, matrix.platform) && 'spmbuildonly' || 'spm' }} From 270264c5b8246cef12325040ba1c0f22cf391a40 Mon Sep 17 00:00:00 2001 From: Nick Cooke Date: Mon, 21 Apr 2025 13:01:52 -0400 Subject: [PATCH 13/24] try auth now with buildonly platform --- .github/workflows/auth.yml | 78 +++----------------------------------- 1 file changed, 5 insertions(+), 73 deletions(-) diff --git a/.github/workflows/auth.yml b/.github/workflows/auth.yml index 7dff79459b6..2aeac66483c 100644 --- a/.github/workflows/auth.yml +++ b/.github/workflows/auth.yml @@ -21,6 +21,11 @@ concurrency: cancel-in-progress: true jobs: + spm: + uses: ./.github/workflows/common.yml + with: + target: AuthUnit + buildonly_platforms: macOS pod-lib-lint: # Don't run on private repo unless it is a PR. @@ -50,79 +55,6 @@ jobs: retry_wait_seconds: 120 command: scripts/pod_lib_lint.rb ${{ matrix.podspec }} --platforms=${{ matrix.target }} ${{ matrix.tests }} - spm-package-resolved: - env: - FIREBASECI_USE_LATEST_GOOGLEAPPMEASUREMENT: 1 - runs-on: macos-15 - outputs: - cache_key: ${{ steps.generate_cache_key.outputs.cache_key }} - steps: - - uses: actions/checkout@v4 - - name: Generate Swift Package.resolved - id: swift_package_resolve - run: | - swift package resolve - - name: Generate cache key - id: generate_cache_key - run: | - cache_key="${{ runner.os }}-spm-${{ hashFiles('**/Package.resolved') }}" - echo "cache_key=${cache_key}" >> "$GITHUB_OUTPUT" - - uses: actions/cache/save@v4 - id: cache - with: - path: .build - key: ${{ steps.generate_cache_key.outputs.cache_key }} - - spm: - # 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-package-resolved] - strategy: - matrix: - include: - - os: macos-14 - xcode: Xcode_16.2 - target: iOS spm - - os: macos-15 - xcode: Xcode_16.3 - target: iOS spm - - os: macos-15 - xcode: Xcode_16.3 - target: tvOS spm - - os: macos-15 - xcode: Xcode_16.3 - target: macOS spmbuildonly - - os: macos-15 - xcode: Xcode_16.3 - target: watchOS spm - - os: macos-15 - xcode: Xcode_16.3 - target: catalyst spm - - os: macos-15 - xcode: Xcode_16.3 - target: visionOS spm - runs-on: ${{ matrix.os }} - steps: - - uses: actions/checkout@v4 - - uses: actions/cache/restore@v4 - with: - path: .build - key: ${{needs.spm-package-resolved.outputs.cache_key}} - - name: Xcode - run: sudo xcode-select -s /Applications/${{ matrix.xcode }}.app/Contents/Developer - - name: Install visionOS, if needed. - if: matrix.target == 'visionOS spm' - run: xcodebuild -downloadPlatform visionOS - - name: Initialize xcodebuild - run: scripts/setup_spm_tests.sh - - uses: nick-fields/retry@ce71cc2ab81d554ebbe88c79ab5975992d79ba08 # v3 - with: - timeout_minutes: 120 - max_attempts: 3 - retry_on: error - retry_wait_seconds: 120 - command: scripts/third_party/travis/retry.sh ./scripts/build.sh AuthUnit ${{ matrix.target }} - 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' From f6034d2d9a0042f4ffe92c1873fc520677032eef Mon Sep 17 00:00:00 2001 From: Nick Cooke Date: Mon, 21 Apr 2025 13:23:03 -0400 Subject: [PATCH 14/24] fix auth: --- .github/workflows/auth.yml | 25 +++++++++++++++++++++++++ 1 file changed, 25 insertions(+) diff --git a/.github/workflows/auth.yml b/.github/workflows/auth.yml index 2aeac66483c..28ec657bcbe 100644 --- a/.github/workflows/auth.yml +++ b/.github/workflows/auth.yml @@ -54,6 +54,31 @@ jobs: retry_on: error retry_wait_seconds: 120 command: scripts/pod_lib_lint.rb ${{ matrix.podspec }} --platforms=${{ matrix.target }} ${{ matrix.tests }} + + spm-package-resolved: + env: + FIREBASECI_USE_LATEST_GOOGLEAPPMEASUREMENT: 1 + runs-on: macos-15 + outputs: + cache_key: ${{ steps.generate_cache_key.outputs.cache_key }} + steps: + - uses: actions/checkout@v4 + - name: Xcode + run: sudo xcode-select -s /Applications/Xcode_16.2.app/Contents/Developer + - name: Generate Swift Package.resolved + id: swift_package_resolve + run: | + swift package resolve + - name: Generate cache key + id: generate_cache_key + run: | + cache_key="${{ runner.os }}-spm-${{ hashFiles('**/Package.resolved') }}" + echo "cache_key=${cache_key}" >> "$GITHUB_OUTPUT" + - uses: actions/cache/save@v4 + id: cache + with: + path: .build + key: ${{ steps.generate_cache_key.outputs.cache_key }} integration-tests: # Don't run on private repo unless it is a PR. From 4287947d6e90aa777bbd5faa5034eccc68fc3315 Mon Sep 17 00:00:00 2001 From: Nick Cooke Date: Mon, 21 Apr 2025 14:28:59 -0400 Subject: [PATCH 15/24] all option to buildonly all platforms --- .github/workflows/common.yml | 17 +++++-- .github/workflows/installations.yml | 72 +++-------------------------- 2 files changed, 20 insertions(+), 69 deletions(-) diff --git a/.github/workflows/common.yml b/.github/workflows/common.yml index 2c75a00a640..e965cfd5c90 100644 --- a/.github/workflows/common.yml +++ b/.github/workflows/common.yml @@ -8,8 +8,15 @@ on: type: string required: true # By default, all platforms will be tested (see matrix in `spm` job). - # To build instead of test, pass a comma/space separated string of - # platforms (e.g. "macos tvos"). + # To build instead of test, pass a comma or space separated string of + # platforms. + # + # Platform options: [iOS, tvOS, macOS, watchOS, catalyst, visionOS] + # + # Examples: + # - build only for macOS: `macOS` + # - build only for macOS and tvOS: `macOS, tvOS` + # - build only for all platforms: `all` buildonly_platforms: type: string required: false @@ -74,4 +81,8 @@ jobs: max_attempts: 3 retry_on: error retry_wait_seconds: 120 - command: ./scripts/build.sh ${{ inputs.target }} ${{ matrix.platform }} ${{ contains(inputs.buildonly_platforms, matrix.platform) && 'spmbuildonly' || 'spm' }} + command: | + ./scripts/build.sh \ + ${{ inputs.target }} \ + ${{ matrix.platform }} \ + ${{ (contains(inputs.buildonly_platforms, matrix.platform) || contains(inputs.buildonly_platforms, 'all')) && 'spmbuildonly' || 'spm' }} diff --git a/.github/workflows/installations.yml b/.github/workflows/installations.yml index 0d3153e5dd2..0f15589ab74 100644 --- a/.github/workflows/installations.yml +++ b/.github/workflows/installations.yml @@ -16,6 +16,12 @@ concurrency: cancel-in-progress: true jobs: + spm: + uses: ./.github/workflows/common.yml + with: + target: FirebaseInstallations + buildonly_platforms: all + pod-lib-lint: # 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' @@ -57,72 +63,6 @@ jobs: scripts/third_party/travis/retry.sh scripts/pod_lib_lint.rb FirebaseInstallations.podspec \ --platforms=${{ matrix.target }} --test-specs=${{ matrix.build-env.test-specs }} - spm-package-resolved: - env: - FIREBASECI_USE_LATEST_GOOGLEAPPMEASUREMENT: 1 - runs-on: macos-14 - outputs: - cache_key: ${{ steps.generate_cache_key.outputs.cache_key }} - steps: - - uses: actions/checkout@v4 - - name: Xcode - run: sudo xcode-select -s /Applications/Xcode_16.2.app/Contents/Developer - - name: Generate Swift Package.resolved - id: swift_package_resolve - run: | - swift package resolve - - name: Generate cache key - id: generate_cache_key - run: | - cache_key="${{ runner.os }}-spm-${{ hashFiles('**/Package.resolved') }}" - echo "cache_key=${cache_key}" >> "$GITHUB_OUTPUT" - - uses: actions/cache/save@v4 - id: cache - with: - path: .build - key: ${{ steps.generate_cache_key.outputs.cache_key }} - spm: - # 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-package-resolved] - strategy: - matrix: - include: - - os: macos-14 - xcode: Xcode_16.2 - target: iOS - - os: macos-15 - xcode: Xcode_16.2 - target: iOS - - os: macos-15 - xcode: Xcode_16.2 - target: tvOS - - os: macos-15 - xcode: Xcode_16.2 - target: macOS - - os: macos-15 - xcode: Xcode_16.2 - target: watchOS - - os: macos-15 - xcode: Xcode_16.2 - target: catalyst - - os: macos-15 - xcode: Xcode_16.2 - target: visionOS - runs-on: ${{ matrix.os }} - steps: - - uses: actions/checkout@v4 - - uses: actions/cache/restore@v4 - with: - path: .build - key: ${{needs.spm-package-resolved.outputs.cache_key}} - - name: Xcode - run: sudo xcode-select -s /Applications/${{ matrix.xcode }}.app/Contents/Developer - - name: Initialize xcodebuild - run: scripts/setup_spm_tests.sh - - name: Unit Tests - run: scripts/third_party/travis/retry.sh ./scripts/build.sh FirebaseInstallations ${{ matrix.target }} spmbuildonly - catalyst: if: (github.repository == 'Firebase/firebase-ios-sdk' && github.event_name == 'schedule') || github.event_name == 'pull_request' runs-on: macos-15 From 23ed9be6fd9cbe062877ff83871127de880c6e99 Mon Sep 17 00:00:00 2001 From: Nick Cooke Date: Mon, 21 Apr 2025 14:33:21 -0400 Subject: [PATCH 16/24] app check --- .github/workflows/firebase_app_check.yml | 80 +++--------------------- 1 file changed, 8 insertions(+), 72 deletions(-) diff --git a/.github/workflows/firebase_app_check.yml b/.github/workflows/firebase_app_check.yml index 814a142b33b..791921e6c8b 100644 --- a/.github/workflows/firebase_app_check.yml +++ b/.github/workflows/firebase_app_check.yml @@ -16,6 +16,14 @@ concurrency: cancel-in-progress: true jobs: + spm: + strategy: + matrix: + target: [FirebaseAppCheckUnit, FirebaseAppCheckUnitSwift] + uses: ./.github/workflows/common.yml + with: + target: ${{ matrix.target }} + pod_lib_lint: # 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' @@ -100,75 +108,3 @@ jobs: - name: PodLibLint FirebaseAppCheck Cron # TODO: Remove --allow-warnings when stabilized. run: scripts/third_party/travis/retry.sh scripts/pod_lib_lint.rb FirebaseAppCheck.podspec --platforms=ios ${{ matrix.flags }} - - spm-package-resolved: - env: - FIREBASECI_USE_LATEST_GOOGLEAPPMEASUREMENT: 1 - runs-on: macos-14 - outputs: - cache_key: ${{ steps.generate_cache_key.outputs.cache_key }} - steps: - - uses: actions/checkout@v4 - - name: Xcode - run: sudo xcode-select -s /Applications/Xcode_16.2.app/Contents/Developer - - name: Generate Swift Package.resolved - id: swift_package_resolve - run: | - swift package resolve - - name: Generate cache key - id: generate_cache_key - run: | - cache_key="${{ runner.os }}-spm-${{ hashFiles('**/Package.resolved') }}" - echo "cache_key=${cache_key}" >> "$GITHUB_OUTPUT" - - uses: actions/cache/save@v4 - id: cache - with: - path: .build - key: ${{ steps.generate_cache_key.outputs.cache_key }} - - spm: - # 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-package-resolved] - strategy: - matrix: - include: - - os: macos-14 - xcode: Xcode_16.2 - target: iOS - - os: macos-15 - xcode: Xcode_16.2 - target: iOS - - os: macos-15 - xcode: Xcode_16.2 - target: tvOS - - os: macos-15 - xcode: Xcode_16.2 - target: macOS - - os: macos-15 - xcode: Xcode_16.2 - target: watchOS - - os: macos-15 - xcode: Xcode_16.2 - target: catalyst - - os: macos-15 - xcode: Xcode_16.2 - target: visionOS - runs-on: ${{ matrix.os }} - steps: - - uses: actions/checkout@v4 - - uses: actions/cache/restore@v4 - with: - path: .build - key: ${{needs.spm-package-resolved.outputs.cache_key}} - - name: Xcode - run: sudo xcode-select -s /Applications/${{ matrix.xcode }}.app/Contents/Developer - - name: Install visionOS, if needed. - if: matrix.target == 'visionOS spm' - run: xcodebuild -downloadPlatform visionOS - - name: Initialize xcodebuild - run: scripts/setup_spm_tests.sh - - name: Unit Tests - run: scripts/third_party/travis/retry.sh ./scripts/build.sh FirebaseAppCheckUnit ${{ matrix.target }} spm - - name: Swift Unit Tests - run: scripts/third_party/travis/retry.sh ./scripts/build.sh FirebaseAppCheckUnitSwift ${{ matrix.target }} spm From b36986945d881c152df7a01ded73404f0ab6a65b Mon Sep 17 00:00:00 2001 From: Nick Cooke Date: Mon, 21 Apr 2025 16:47:20 -0400 Subject: [PATCH 17/24] add platforms (maybe wont work) --- .github/workflows/common.yml | 9 ++++++++- 1 file changed, 8 insertions(+), 1 deletion(-) diff --git a/.github/workflows/common.yml b/.github/workflows/common.yml index e965cfd5c90..f05ed463942 100644 --- a/.github/workflows/common.yml +++ b/.github/workflows/common.yml @@ -7,6 +7,13 @@ on: target: type: string required: true + + # The platforms to build on. Defaults to all. + platforms: + type: string + required: false + default: all + # By default, all platforms will be tested (see matrix in `spm` job). # To build instead of test, pass a comma or space separated string of # platforms. @@ -56,7 +63,7 @@ jobs: matrix: os: [macos-15] xcode: [Xcode_16.2] - platform: [iOS, tvOS, macOS, watchOS, catalyst, visionOS] + platform: ${{ inputs.platforms == 'all' && ['iOS', 'tvOS', 'macOS', 'watchOS', 'catalyst', 'visionOS'] || join(inputs.platforms) }} include: - os: macos-14 xcode: Xcode_16.2 From f7fefd6957192e15faee0e09ddd8da404bd622ab Mon Sep 17 00:00:00 2001 From: Nick Cooke Date: Mon, 21 Apr 2025 16:53:27 -0400 Subject: [PATCH 18/24] follow-up --- .github/workflows/common.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/common.yml b/.github/workflows/common.yml index f05ed463942..e2f20dfedcd 100644 --- a/.github/workflows/common.yml +++ b/.github/workflows/common.yml @@ -63,7 +63,7 @@ jobs: matrix: os: [macos-15] xcode: [Xcode_16.2] - platform: ${{ inputs.platforms == 'all' && ['iOS', 'tvOS', 'macOS', 'watchOS', 'catalyst', 'visionOS'] || join(inputs.platforms) }} + platform: ${{ inputs.platforms == 'all' && [iOS, tvOS, macOS, watchOS, catalyst, visionOS] || join(inputs.platforms) }} include: - os: macos-14 xcode: Xcode_16.2 From 0f5badbf205f5e5ffcbd639bb74e50bcae62143e Mon Sep 17 00:00:00 2001 From: Nick Cooke Date: Mon, 21 Apr 2025 17:01:13 -0400 Subject: [PATCH 19/24] Add check for platform --- .github/workflows/common.yml | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/.github/workflows/common.yml b/.github/workflows/common.yml index e2f20dfedcd..51f7727ae01 100644 --- a/.github/workflows/common.yml +++ b/.github/workflows/common.yml @@ -12,7 +12,7 @@ on: platforms: type: string required: false - default: all + default: "" # By default, all platforms will be tested (see matrix in `spm` job). # To build instead of test, pass a comma or space separated string of @@ -63,7 +63,7 @@ jobs: matrix: os: [macos-15] xcode: [Xcode_16.2] - platform: ${{ inputs.platforms == 'all' && [iOS, tvOS, macOS, watchOS, catalyst, visionOS] || join(inputs.platforms) }} + platform: [iOS, tvOS, macOS, watchOS, catalyst, visionOS] include: - os: macos-14 xcode: Xcode_16.2 @@ -83,6 +83,7 @@ jobs: - name: Initialize xcodebuild run: scripts/setup_spm_tests.sh - uses: nick-fields/retry@ce71cc2ab81d554ebbe88c79ab5975992d79ba08 # v3 + if: contains(inputs.platforms, matrix.platform) with: timeout_minutes: 120 max_attempts: 3 From 8551faea26d445837e59325790de45b9ca2f811f Mon Sep 17 00:00:00 2001 From: Nick Cooke Date: Mon, 21 Apr 2025 17:08:10 -0400 Subject: [PATCH 20/24] update to specify specific platforms --- .github/workflows/appdistribution.yml | 56 ++++--------------------- .github/workflows/common.yml | 4 +- .github/workflows/performance.yml | 59 +++------------------------ 3 files changed, 14 insertions(+), 105 deletions(-) diff --git a/.github/workflows/appdistribution.yml b/.github/workflows/appdistribution.yml index ad7f3c227c3..069300a0298 100644 --- a/.github/workflows/appdistribution.yml +++ b/.github/workflows/appdistribution.yml @@ -15,7 +15,13 @@ concurrency: group: ${{ github.workflow }}-${{ github.head_ref || github.ref }} cancel-in-progress: true -jobs: +jobs: + spm: + uses: ./.github/workflows/common.yml + with: + target: AppDistributionUnit + platforms: iOS + pod-lib-lint: # 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' @@ -40,54 +46,6 @@ jobs: scripts/third_party/travis/retry.sh scripts/pod_lib_lint.rb FirebaseAppDistribution.podspec \ --platforms=ios - spm-package-resolved: - env: - FIREBASECI_USE_LATEST_GOOGLEAPPMEASUREMENT: 1 - runs-on: macos-14 - outputs: - cache_key: ${{ steps.generate_cache_key.outputs.cache_key }} - steps: - - uses: actions/checkout@v4 - - name: Generate Swift Package.resolved - id: swift_package_resolve - run: | - swift package resolve - - name: Generate cache key - id: generate_cache_key - run: | - cache_key="${{ runner.os }}-spm-${{ hashFiles('**/Package.resolved') }}" - echo "cache_key=${cache_key}" >> "$GITHUB_OUTPUT" - - uses: actions/cache/save@v4 - id: cache - with: - path: .build - key: ${{ steps.generate_cache_key.outputs.cache_key }} - - spm: - # 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-package-resolved] - strategy: - matrix: - include: - - os: macos-14 - xcode: Xcode_16.2 - - os: macos-15 - xcode: Xcode_16.3 - runs-on: ${{ matrix.os }} - steps: - - uses: actions/checkout@v4 - - uses: actions/cache/restore@v4 - with: - path: .build - key: ${{needs.spm-package-resolved.outputs.cache_key}} - - name: Xcode - run: sudo xcode-select -s /Applications/${{ matrix.xcode }}.app/Contents/Developer - - name: Initialize xcodebuild - run: scripts/setup_spm_tests.sh - - name: iOS Unit Tests - run: scripts/third_party/travis/retry.sh ./scripts/build.sh AppDistributionUnit iOS spm - catalyst: # 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' diff --git a/.github/workflows/common.yml b/.github/workflows/common.yml index 51f7727ae01..582fce1e016 100644 --- a/.github/workflows/common.yml +++ b/.github/workflows/common.yml @@ -12,7 +12,7 @@ on: platforms: type: string required: false - default: "" + default: [iOS, tvOS, macOS, watchOS, catalyst, visionOS] # By default, all platforms will be tested (see matrix in `spm` job). # To build instead of test, pass a comma or space separated string of @@ -83,7 +83,7 @@ jobs: - name: Initialize xcodebuild run: scripts/setup_spm_tests.sh - uses: nick-fields/retry@ce71cc2ab81d554ebbe88c79ab5975992d79ba08 # v3 - if: contains(inputs.platforms, matrix.platform) + if: contains(inputs.platforms, matrix.platform) || matrix.os == 'macos-14' with: timeout_minutes: 120 max_attempts: 3 diff --git a/.github/workflows/performance.yml b/.github/workflows/performance.yml index f455d00a366..64fc1ae1482 100644 --- a/.github/workflows/performance.yml +++ b/.github/workflows/performance.yml @@ -24,6 +24,11 @@ concurrency: cancel-in-progress: true jobs: + spm: + uses: ./.github/workflows/common.yml + with: + target: PerformanceUnit + platforms: [iOS, tvOS] # Build and run the unit tests for Firebase performance SDK. performance: @@ -128,60 +133,6 @@ jobs: testapp_dir: quickstart-ios/build-for-testing test_type: "xctest" - spm-package-resolved: - env: - FIREBASECI_USE_LATEST_GOOGLEAPPMEASUREMENT: 1 - runs-on: macos-14 - outputs: - cache_key: ${{ steps.generate_cache_key.outputs.cache_key }} - steps: - - uses: actions/checkout@v4 - - name: Xcode - run: sudo xcode-select -s /Applications/Xcode_16.2.app/Contents/Developer - - name: Generate Swift Package.resolved - id: swift_package_resolve - run: | - swift package resolve - - name: Generate cache key - id: generate_cache_key - run: | - cache_key="${{ runner.os }}-spm-${{ hashFiles('**/Package.resolved') }}" - echo "cache_key=${cache_key}" >> "$GITHUB_OUTPUT" - - uses: actions/cache/save@v4 - id: cache - with: - path: .build - key: ${{ steps.generate_cache_key.outputs.cache_key }} - spm: - # 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-package-resolved] - strategy: - matrix: - include: - - os: macos-14 - xcode: Xcode_16.2 - target: iOS - - os: macos-15 - xcode: Xcode_16.2 - target: iOS - - os: macos-15 - xcode: Xcode_16.2 - target: tvOS - runs-on: ${{ matrix.os }} - steps: - - uses: actions/checkout@v4 - - uses: actions/cache/restore@v4 - with: - path: .build - key: ${{needs.spm-package-resolved.outputs.cache_key}} - - name: Xcode - run: sudo xcode-select -s /Applications/${{ matrix.xcode }}.app/Contents/Developer - - name: Initialize xcodebuild - run: scripts/setup_spm_tests.sh - - name: Unit Tests - run: scripts/third_party/travis/retry.sh ./scripts/build.sh PerformanceUnit ${{ matrix.target }} spm - catalyst: if: (github.repository == 'Firebase/firebase-ios-sdk' && github.event_name == 'schedule') || github.event_name == 'pull_request' runs-on: macos-15 From b84735d7cbebec74e843d92b102a733f2f4b603f Mon Sep 17 00:00:00 2001 From: Nick Cooke Date: Mon, 21 Apr 2025 17:10:35 -0400 Subject: [PATCH 21/24] fix? --- .github/workflows/common.yml | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/.github/workflows/common.yml b/.github/workflows/common.yml index 582fce1e016..7709db0e71a 100644 --- a/.github/workflows/common.yml +++ b/.github/workflows/common.yml @@ -12,7 +12,7 @@ on: platforms: type: string required: false - default: [iOS, tvOS, macOS, watchOS, catalyst, visionOS] + default: "iOS, tvOS, macOS, watchOS, catalyst, visionOS" # By default, all platforms will be tested (see matrix in `spm` job). # To build instead of test, pass a comma or space separated string of @@ -83,7 +83,7 @@ jobs: - name: Initialize xcodebuild run: scripts/setup_spm_tests.sh - uses: nick-fields/retry@ce71cc2ab81d554ebbe88c79ab5975992d79ba08 # v3 - if: contains(inputs.platforms, matrix.platform) || matrix.os == 'macos-14' + if: contains(join(inputs.platforms), matrix.platform) || matrix.os == 'macos-14' with: timeout_minutes: 120 max_attempts: 3 From c5c4250118c53338258224fe94ad27180d68fa7e Mon Sep 17 00:00:00 2001 From: Nick Cooke Date: Mon, 21 Apr 2025 17:11:46 -0400 Subject: [PATCH 22/24] perf fix --- .github/workflows/performance.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/performance.yml b/.github/workflows/performance.yml index 64fc1ae1482..a3f61b9c349 100644 --- a/.github/workflows/performance.yml +++ b/.github/workflows/performance.yml @@ -28,7 +28,7 @@ jobs: uses: ./.github/workflows/common.yml with: target: PerformanceUnit - platforms: [iOS, tvOS] + platforms: iOS, tvOS # Build and run the unit tests for Firebase performance SDK. performance: From 049873d6bd6a3816775bb757e6bcbff761db3b69 Mon Sep 17 00:00:00 2001 From: Nick Cooke Date: Mon, 21 Apr 2025 17:27:27 -0400 Subject: [PATCH 23/24] more workflows --- .github/workflows/dynamiclinks.yml | 60 ++++--------------- .github/workflows/inappmessaging.yml | 56 ++--------------- .github/workflows/messaging.yml | 72 ++-------------------- .github/workflows/remoteconfig.yml | 89 ++++------------------------ 4 files changed, 31 insertions(+), 246 deletions(-) diff --git a/.github/workflows/dynamiclinks.yml b/.github/workflows/dynamiclinks.yml index 10cd6d8a232..f13dacfd968 100644 --- a/.github/workflows/dynamiclinks.yml +++ b/.github/workflows/dynamiclinks.yml @@ -17,6 +17,16 @@ concurrency: cancel-in-progress: true jobs: + spm: + strategy: + matrix: + target: [FirebaseAppCheckUnit, FirebaseAppCheckUnitSwift] + uses: ./.github/workflows/common.yml + with: + target: FirebaseDynamicLinks + buildonly_platforms: iOS + platforms: iOS + pod_lib_lint: # 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' @@ -39,56 +49,6 @@ jobs: - name: FirebaseDynamicLinks run: scripts/third_party/travis/retry.sh scripts/pod_lib_lint.rb FirebaseDynamicLinks.podspec --allow-warnings - spm-package-resolved: - env: - FIREBASECI_USE_LATEST_GOOGLEAPPMEASUREMENT: 1 - runs-on: macos-14 - outputs: - cache_key: ${{ steps.generate_cache_key.outputs.cache_key }} - steps: - - uses: actions/checkout@v4 - - name: Xcode - run: sudo xcode-select -s /Applications/Xcode_16.2.app/Contents/Developer - - name: Generate Swift Package.resolved - id: swift_package_resolve - run: | - swift package resolve - - name: Generate cache key - id: generate_cache_key - run: | - cache_key="${{ runner.os }}-spm-${{ hashFiles('**/Package.resolved') }}" - echo "cache_key=${cache_key}" >> "$GITHUB_OUTPUT" - - uses: actions/cache/save@v4 - id: cache - with: - path: .build - key: ${{ steps.generate_cache_key.outputs.cache_key }} - - spm: - # 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-package-resolved] - strategy: - matrix: - include: - - os: macos-14 - xcode: Xcode_16.2 - - os: macos-15 - xcode: Xcode_16.2 - runs-on: ${{ matrix.os }} - steps: - - uses: actions/checkout@v4 - - uses: actions/cache/restore@v4 - with: - path: .build - key: ${{needs.spm-package-resolved.outputs.cache_key}} - - name: Xcode - run: sudo xcode-select -s /Applications/${{ matrix.xcode }}.app/Contents/Developer - - name: Initialize xcodebuild - run: scripts/setup_spm_tests.sh - - name: iOS Unit Tests - run: scripts/third_party/travis/retry.sh ./scripts/build.sh FirebaseDynamicLinks iOS spmbuildonly - dynamiclinks-cron-only: # Don't run on private repo. if: github.event_name == 'schedule' && github.repository == 'Firebase/firebase-ios-sdk' diff --git a/.github/workflows/inappmessaging.yml b/.github/workflows/inappmessaging.yml index d4786922a2f..363b0f16ba6 100644 --- a/.github/workflows/inappmessaging.yml +++ b/.github/workflows/inappmessaging.yml @@ -17,6 +17,12 @@ concurrency: cancel-in-progress: true jobs: + spm: + uses: ./.github/workflows/common.yml + with: + target: FirebaseInAppMessaging-Beta + platforms: iOS + buildonly_platforms: iOS pod_lib_lint: # Don't run on private repo unless it is a PR. @@ -68,56 +74,6 @@ jobs: - name: Build and test run: scripts/third_party/travis/retry.sh scripts/build.sh InAppMessaging ${{ matrix.platform }} xcodebuild - spm-package-resolved: - env: - FIREBASECI_USE_LATEST_GOOGLEAPPMEASUREMENT: 1 - runs-on: macos-14 - outputs: - cache_key: ${{ steps.generate_cache_key.outputs.cache_key }} - steps: - - uses: actions/checkout@v4 - - name: Xcode - run: sudo xcode-select -s /Applications/Xcode_16.2.app/Contents/Developer - - name: Generate Swift Package.resolved - id: swift_package_resolve - run: | - swift package resolve - - name: Generate cache key - id: generate_cache_key - run: | - cache_key="${{ runner.os }}-spm-${{ hashFiles('**/Package.resolved') }}" - echo "cache_key=${cache_key}" >> "$GITHUB_OUTPUT" - - uses: actions/cache/save@v4 - id: cache - with: - path: .build - key: ${{ steps.generate_cache_key.outputs.cache_key }} - - spm: - # 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-package-resolved] - strategy: - matrix: - include: - - os: macos-14 - xcode: Xcode_16.2 - - os: macos-15 - xcode: Xcode_16.2 - runs-on: ${{ matrix.os }} - steps: - - uses: actions/checkout@v4 - - uses: actions/cache/restore@v4 - with: - path: .build - key: ${{needs.spm-package-resolved.outputs.cache_key}} - - name: Xcode - run: sudo xcode-select -s /Applications/${{ matrix.xcode }}.app/Contents/Developer - - name: Initialize xcodebuild - run: scripts/setup_spm_tests.sh - - name: iOS Unit Tests - run: scripts/third_party/travis/retry.sh ./scripts/build.sh FirebaseInAppMessaging-Beta iOS spmbuildonly - fiam-cron-only: # Don't run on private repo. if: github.event_name == 'schedule' && github.repository == 'Firebase/firebase-ios-sdk' diff --git a/.github/workflows/messaging.yml b/.github/workflows/messaging.yml index 3fc6e92fc7b..7af613cb311 100644 --- a/.github/workflows/messaging.yml +++ b/.github/workflows/messaging.yml @@ -23,6 +23,11 @@ concurrency: cancel-in-progress: true jobs: + spm: + uses: ./.github/workflows/common.yml + with: + target: MessagingUnit + buildonly_platforms: tvOS, macOS, watchOS, catalyst, visionOS # TODO(#12205) Update the build.sh script for this job from "test" instead of "build" messaging-integration-tests: @@ -78,73 +83,6 @@ jobs: - name: Build and test run: scripts/third_party/travis/retry.sh scripts/pod_lib_lint.rb ${{ matrix.podspec }} ${{ matrix.build-env.tests }} --platforms=${{ matrix.target }} - spm-package-resolved: - env: - FIREBASECI_USE_LATEST_GOOGLEAPPMEASUREMENT: 1 - runs-on: macos-14 - outputs: - cache_key: ${{ steps.generate_cache_key.outputs.cache_key }} - steps: - - uses: actions/checkout@v4 - - name: Xcode - run: sudo xcode-select -s /Applications/Xcode_16.2.app/Contents/Developer - - name: Generate Swift Package.resolved - id: swift_package_resolve - run: | - swift package resolve - - name: Generate cache key - id: generate_cache_key - run: | - cache_key="${{ runner.os }}-spm-${{ hashFiles('**/Package.resolved') }}" - echo "cache_key=${cache_key}" >> "$GITHUB_OUTPUT" - - uses: actions/cache/save@v4 - id: cache - with: - path: .build - key: ${{ steps.generate_cache_key.outputs.cache_key }} - - spm: - # 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-package-resolved] - strategy: - matrix: - include: - - os: macos-14 - xcode: Xcode_16.2 - target: iOS spmbuildonly - - os: macos-15 - xcode: Xcode_16.2 - target: iOS spm - - os: macos-15 - xcode: Xcode_16.2 - target: tvOS spmbuildonly - - os: macos-15 - xcode: Xcode_16.2 - target: macOS spmbuildonly - - os: macos-15 - xcode: Xcode_16.2 - target: watchOS spmbuildonly - - os: macos-15 - xcode: Xcode_16.2 - target: catalyst spmbuildonly - - os: macos-15 - xcode: Xcode_16.2 - target: visionOS spmbuildonly - runs-on: ${{ matrix.os }} - steps: - - uses: actions/checkout@v4 - - uses: actions/cache/restore@v4 - with: - path: .build - key: ${{needs.spm-package-resolved.outputs.cache_key}} - - name: Initialize xcodebuild - run: scripts/setup_spm_tests.sh - - name: Xcode - run: sudo xcode-select -s /Applications/${{ matrix.xcode }}.app/Contents/Developer - - name: Unit Tests - run: scripts/third_party/travis/retry.sh ./scripts/build.sh MessagingUnit ${{ matrix.target }} - catalyst: # 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' diff --git a/.github/workflows/remoteconfig.yml b/.github/workflows/remoteconfig.yml index c6ca84bbd1b..51ab6b72bfb 100644 --- a/.github/workflows/remoteconfig.yml +++ b/.github/workflows/remoteconfig.yml @@ -19,6 +19,16 @@ concurrency: cancel-in-progress: true jobs: + spm_1: + uses: ./.github/workflows/common.yml + with: + target: RemoteConfigUnit + + spm_2: + uses: ./.github/workflows/common.yml + with: + target: RemoteConfigFakeConsole + buildonly_platforms: watchOS remoteconfig: # Don't run on private repo unless it is a PR. @@ -87,85 +97,6 @@ jobs: scripts/third_party/travis/retry.sh scripts/pod_lib_lint.rb ${{ matrix.podspec }} --platforms=${{ matrix.target }} \ ${{ matrix.build-env.tests }} - spm-package-resolved: - env: - FIREBASECI_USE_LATEST_GOOGLEAPPMEASUREMENT: 1 - runs-on: macos-14 - outputs: - cache_key: ${{ steps.generate_cache_key.outputs.cache_key }} - steps: - - uses: actions/checkout@v4 - - name: Xcode - run: sudo xcode-select -s /Applications/Xcode_16.2.app/Contents/Developer - - name: Generate Swift Package.resolved - id: swift_package_resolve - run: | - swift package resolve - - name: Generate cache key - id: generate_cache_key - run: | - cache_key="${{ runner.os }}-spm-${{ hashFiles('**/Package.resolved') }}" - echo "cache_key=${cache_key}" >> "$GITHUB_OUTPUT" - - uses: actions/cache/save@v4 - id: cache - with: - path: .build - key: ${{ steps.generate_cache_key.outputs.cache_key }} - - spm: - # 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-package-resolved] - strategy: - matrix: - include: - - os: macos-14 - xcode: Xcode_16.2 - target: iOS - test: spm - - os: macos-15 - xcode: Xcode_16.2 - target: iOS - test: spm - - os: macos-15 - xcode: Xcode_16.2 - target: tvOS - test: spm - - os: macos-15 - xcode: Xcode_16.2 - target: macOS - test: spm - - os: macos-15 - xcode: Xcode_16.2 - target: watchOS - test: spmbuildonly - - os: macos-15 - xcode: Xcode_16.2 - target: catalyst - test: spm - - os: macos-15 - xcode: Xcode_16.2 - target: visionOS - test: spm - runs-on: ${{ matrix.os }} - steps: - - uses: actions/checkout@v4 - - uses: actions/cache/restore@v4 - with: - path: .build - key: ${{needs.spm-package-resolved.outputs.cache_key}} - - name: Xcode - run: sudo xcode-select -s /Applications/${{ matrix.xcode }}.app/Contents/Developer - - name: Install visionOS, if needed. - if: matrix.target == 'visionOS' - run: xcodebuild -downloadPlatform visionOS - - name: Initialize xcodebuild - run: scripts/setup_spm_tests.sh - - name: Unit Tests - run: scripts/third_party/travis/retry.sh ./scripts/build.sh RemoteConfigUnit ${{ matrix.target }} spm - - name: Fake Console tests - run: scripts/third_party/travis/retry.sh ./scripts/build.sh RemoteConfigFakeConsole ${{ matrix.target }} ${{ matrix.test }} - catalyst: # 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' From 5512c8e46b1f100dd986f5d041e1ec3d7276410a Mon Sep 17 00:00:00 2001 From: Nick Cooke Date: Mon, 21 Apr 2025 17:50:58 -0400 Subject: [PATCH 24/24] style --- .github/workflows/appdistribution.yml | 2 +- .github/workflows/auth.yml | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/.github/workflows/appdistribution.yml b/.github/workflows/appdistribution.yml index 069300a0298..a79d3a53f90 100644 --- a/.github/workflows/appdistribution.yml +++ b/.github/workflows/appdistribution.yml @@ -15,7 +15,7 @@ concurrency: group: ${{ github.workflow }}-${{ github.head_ref || github.ref }} cancel-in-progress: true -jobs: +jobs: spm: uses: ./.github/workflows/common.yml with: diff --git a/.github/workflows/auth.yml b/.github/workflows/auth.yml index 28ec657bcbe..68bf07f695e 100644 --- a/.github/workflows/auth.yml +++ b/.github/workflows/auth.yml @@ -54,7 +54,7 @@ jobs: retry_on: error retry_wait_seconds: 120 command: scripts/pod_lib_lint.rb ${{ matrix.podspec }} --platforms=${{ matrix.target }} ${{ matrix.tests }} - + spm-package-resolved: env: FIREBASECI_USE_LATEST_GOOGLEAPPMEASUREMENT: 1