diff --git a/.github/workflows/abtesting.yml b/.github/workflows/abtesting.yml index 6edd5ef83b0..78327c72ca9 100644 --- a/.github/workflows/abtesting.yml +++ b/.github/workflows/abtesting.yml @@ -14,6 +14,7 @@ on: - '.github/workflows/common_cocoapods.yml' - '.github/workflows/common_catalyst.yml' - '.github/workflows/common_quickstart.yml' + - '.github/workflows/common_cocoapods_cron.yml' - 'Gemfile*' schedule: # Run every day at 2am (PDT) / 5am (EDT) - cron uses UTC times @@ -85,25 +86,9 @@ jobs: 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.4.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 }} + uses: ./.github/workflows/common_cocoapods_cron.yml + with: + product: FirebaseABTesting + platforms: '[ "ios", "tvos", "macos" ]' + flags: '[ "--use-static-frameworks" ]' diff --git a/.github/workflows/appdistribution.yml b/.github/workflows/appdistribution.yml index 808e7ffe697..d3a9d874d44 100644 --- a/.github/workflows/appdistribution.yml +++ b/.github/workflows/appdistribution.yml @@ -12,6 +12,7 @@ on: - '.github/workflows/common.yml' - '.github/workflows/common_cocoapods.yml' - '.github/workflows/common_catalyst.yml' + - '.github/workflows/common_cocoapods_cron.yml' - 'Gemfile*' schedule: # Run every day at 2am (PDT) / 5am (EDT) - cron uses UTC times @@ -41,24 +42,9 @@ jobs: platforms: iOS # App Distro only supports iOS. appdistribution-cron-only: - if: github.event_name == 'schedule' && github.repository == 'Firebase/firebase-ios-sdk' - - runs-on: macos-15 - strategy: - matrix: - target: [ios] - flags: [ - '--use-static-frameworks' - ] needs: pod_lib_lint - steps: - - uses: actions/checkout@v4 - - uses: ruby/setup-ruby@354a1ad156761f5ee2b7b13fa8e09943a5e8d252 # v1 - - name: Setup Xcode - run: sudo xcode-select -s /Applications/Xcode_16.4.app/Contents/Developer - - name: Setup Bundler - run: scripts/setup_bundler.sh - - name: PodLibLint App Distribution Cron - run: | - scripts/third_party/travis/retry.sh scripts/pod_lib_lint.rb FirebaseAppDistribution.podspec \ - --platforms=${{ matrix.target }} ${{ matrix.flags }} + uses: ./.github/workflows/common_cocoapods_cron.yml + with: + product: FirebaseAppDistribution + platforms: '[ "ios" ]' + flags: '[ "--use-static-frameworks" ]' diff --git a/.github/workflows/auth.yml b/.github/workflows/auth.yml index 3f1d3142fe0..0211c7b0589 100644 --- a/.github/workflows/auth.yml +++ b/.github/workflows/auth.yml @@ -14,6 +14,7 @@ on: - '.github/workflows/common_cocoapods.yml' - '.github/workflows/common_catalyst.yml' - '.github/workflows/common_quickstart.yml' + - '.github/workflows/common_cocoapods_cron.yml' - 'scripts/gha-encrypted/AuthSample/SwiftApplication.plist.gpg' - 'Gemfile*' schedule: @@ -134,32 +135,12 @@ jobs: # test_type: "xctest" auth-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: - # The macos and tvos tests can hang, and watchOS doesn't have tests. - target: [ios, tvos --skip-tests, macos --skip-tests, watchos --skip-tests] - flags: [ - '--use-static-frameworks' - ] - needs: pod_lib_lint - env: - plist_secret: ${{ secrets.GHASecretsGPGPassphrase1 }} - steps: - - uses: actions/checkout@v4 - - uses: ruby/setup-ruby@354a1ad156761f5ee2b7b13fa8e09943a5e8d252 # v1 - - name: Setup Xcode - run: sudo xcode-select -s /Applications/Xcode_16.4.app/Contents/Developer - - name: Setup Bundler - run: scripts/setup_bundler.sh - - name: Configure test keychain - run: scripts/configure_test_keychain.sh - - uses: nick-fields/retry@ce71cc2ab81d554ebbe88c79ab5975992d79ba08 # v3 - with: - timeout_minutes: 15 - max_attempts: 3 - retry_wait_seconds: 120 - command: scripts/third_party/travis/retry.sh scripts/pod_lib_lint.rb FirebaseAuth.podspec --platforms=${{ matrix.target }} ${{ matrix.flags }} + needs: pod_lib_lint + uses: ./.github/workflows/common_cocoapods_cron.yml + with: + product: FirebaseAuth + platforms: '[ "ios", "tvos --skip-tests", "macos --skip-tests", "watchos --skip-tests" ]' + flags: '[ "--use-static-frameworks" ]' + setup_command: scripts/configure_test_keychain.sh + secrets: + plist_secret: ${{ secrets.GHASecretsGPGPassphrase1 }} diff --git a/.github/workflows/common_cocoapods_cron.yml b/.github/workflows/common_cocoapods_cron.yml new file mode 100644 index 00000000000..afeeec07efe --- /dev/null +++ b/.github/workflows/common_cocoapods_cron.yml @@ -0,0 +1,82 @@ +name: common_cocoapods_cron + +permissions: + contents: read + +on: + workflow_call: + secrets: + plist_secret: + required: false + inputs: + # The product to test be tested (e.g. `FirebaseABTesting`). + product: + type: string + required: true + + # JSON array of platforms to test against (e.g. `[ "ios", "tvos" ]`). + platforms: + type: string + required: true + + # JSON array of flags to pass to pod lib lint. Each string in the array + # will create a separate matrix entry. + # e.g. `[ "--use-static-frameworks" ]`. + # To run with no flags, pass `[ "" ]`. + flags: + type: string + required: false + default: '[""]' + + # A command to execute before testing. + setup_command: + type: string + required: false + default: "" + + # The version of Xcode to use. + xcode: + type: string + required: false + default: "Xcode_16.4" + + # The runner to use. + runs_on: + type: string + required: false + default: "macos-15" + +jobs: + cron-job: + # This job is intended to be run on a schedule, on the main repo. + if: github.event_name == 'schedule' && github.repository == 'Firebase/firebase-ios-sdk' + + runs-on: ${{ inputs.runs_on }} + strategy: + matrix: + platform: ${{ fromJson(inputs.platforms) }} + flags: ${{ fromJson(inputs.flags) }} + + 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/${{ inputs.xcode }}.app/Contents/Developer + - name: Run setup command, if needed. + if: inputs.setup_command != '' + env: + plist_secret: ${{ secrets.plist_secret }} + run: ${{ inputs.setup_command }} + - name: PodLibLint Cron + uses: nick-fields/retry@ce71cc2ab81d554ebbe88c79ab5975992d79ba08 # v3 + with: + timeout_minutes: 15 + max_attempts: 3 + retry_wait_seconds: 120 + command: | + scripts/pod_lib_lint.rb \ + ${{ inputs.product }}.podspec \ + --platforms=${{ matrix.platform }} \ + ${{ matrix.flags }} diff --git a/.github/workflows/core.yml b/.github/workflows/core.yml index 0c30320895a..8107ba9f21f 100644 --- a/.github/workflows/core.yml +++ b/.github/workflows/core.yml @@ -12,6 +12,7 @@ on: - '.github/workflows/common.yml' - '.github/workflows/common_cocoapods.yml' - '.github/workflows/common_catalyst.yml' + - '.github/workflows/common_cocoapods_cron.yml' - 'Gemfile*' schedule: # Run every day at 3am (PDT) / 6am (EDT) - cron uses UTC times @@ -39,23 +40,11 @@ jobs: product: FirebaseCore 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 }} + uses: ./.github/workflows/common_cocoapods_cron.yml + with: + product: FirebaseCore + platforms: '[ "ios", "tvos", "macos" ]' + flags: '[ "--use-static-frameworks" ]' + runs_on: macos-14 + xcode: Xcode_16.2 diff --git a/.github/workflows/core_extension.yml b/.github/workflows/core_extension.yml index b36caf5c85c..e1dd78fcc21 100644 --- a/.github/workflows/core_extension.yml +++ b/.github/workflows/core_extension.yml @@ -12,6 +12,7 @@ on: - '.github/workflows/core_extension.yml' - '.github/workflows/common.yml' - '.github/workflows/common_cocoapods.yml' + - '.github/workflows/common_cocoapods_cron.yml' - 'Gemfile*' schedule: # Run every day at 3am (PDT) / 6am (EDT) - cron uses UTC times @@ -24,23 +25,10 @@ jobs: with: product: FirebaseCoreExtension - 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' - ] + core-extension-cron-only: 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.4.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 FirebaseCoreExtension.podspec --platforms=${{ matrix.target }} ${{ matrix.flags }} + uses: ./.github/workflows/common_cocoapods_cron.yml + with: + product: FirebaseCoreExtension + platforms: '[ "ios", "tvos", "macos" ]' + flags: '[ "--use-static-frameworks" ]' diff --git a/.github/workflows/core_internal.yml b/.github/workflows/core_internal.yml index f536f6c4656..5e186069e85 100644 --- a/.github/workflows/core_internal.yml +++ b/.github/workflows/core_internal.yml @@ -13,6 +13,7 @@ on: - '.github/workflows/common.yml' - '.github/workflows/common_cocoapods.yml' - '.github/workflows/common_catalyst.yml' + - '.github/workflows/common_cocoapods_cron.yml' - 'Gemfile*' schedule: # Run every day at 3am (PDT) / 6am (EDT) - cron uses UTC times @@ -40,22 +41,9 @@ jobs: supports_swift6: true 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.4.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 }} + uses: ./.github/workflows/common_cocoapods_cron.yml + with: + product: FirebaseCoreInternal + platforms: '[ "ios", "tvos", "macos" ]' + flags: '[ "--use-static-frameworks" ]' diff --git a/.github/workflows/crashlytics.yml b/.github/workflows/crashlytics.yml index e88f692ebc3..dad83ff1202 100644 --- a/.github/workflows/crashlytics.yml +++ b/.github/workflows/crashlytics.yml @@ -14,6 +14,7 @@ on: - '.github/workflows/common_cocoapods.yml' - '.github/workflows/common_catalyst.yml' - '.github/workflows/common_quickstart.yml' + - '.github/workflows/common_cocoapods_cron.yml' - 'Interop/Analytics/Public/*.h' - 'Gemfile*' schedule: @@ -98,29 +99,9 @@ jobs: 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', - '--use-modular-headers --skip-tests' - ] 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.4.app/Contents/Developer - - uses: nick-fields/retry@ce71cc2ab81d554ebbe88c79ab5975992d79ba08 # v3 - with: - timeout_minutes: 15 - max_attempts: 3 - 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_cocoapods_cron.yml + with: + product: FirebaseCrashlytics + platforms: '[ "ios", "tvos", "macos", "watchos --skip-tests" ]' + flags: '[ "--use-static-frameworks", "--use-modular-headers --skip-tests" ]' diff --git a/.github/workflows/database.yml b/.github/workflows/database.yml index a5a297b445f..04396da47ab 100644 --- a/.github/workflows/database.yml +++ b/.github/workflows/database.yml @@ -17,6 +17,7 @@ on: - '.github/workflows/common_cocoapods.yml' - '.github/workflows/common_catalyst.yml' - '.github/workflows/common_quickstart.yml' + - '.github/workflows/common_cocoapods_cron.yml' - 'Gemfile*' - 'scripts/run_database_emulator.sh' schedule: @@ -86,23 +87,9 @@ jobs: plist_secret: ${{ secrets.GHASecretsGPGPassphrase1 }} 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.4.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 }} + uses: ./.github/workflows/common_cocoapods_cron.yml + with: + product: FirebaseDatabase + platforms: '[ "ios", "tvos", "macos" ]' + flags: '[ "--skip-tests --use-static-frameworks" ]' diff --git a/.github/workflows/firebase_app_check.yml b/.github/workflows/firebase_app_check.yml index fcec95dad4e..6ecb238e4f0 100644 --- a/.github/workflows/firebase_app_check.yml +++ b/.github/workflows/firebase_app_check.yml @@ -12,6 +12,7 @@ on: - '.github/workflows/common.yml' - '.github/workflows/common_cocoapods.yml' - '.github/workflows/common_catalyst.yml' + - '.github/workflows/common_cocoapods_cron.yml' - 'Gemfile*' schedule: # Run every day at 12am (PDT) / 3am (EDT) - cron uses UTC times @@ -71,22 +72,9 @@ jobs: path: xcodebuild.log app_check-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: - flags: [ - '--skip-tests --use-modular-headers' - ] 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.4.app/Contents/Developer - - name: Setup Bundler - run: scripts/setup_bundler.sh - - 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 }} + uses: ./.github/workflows/common_cocoapods_cron.yml + with: + product: FirebaseAppCheck + platforms: '[ "ios" ]' + flags: '[ "--skip-tests --use-modular-headers" ]' diff --git a/.github/workflows/functions.yml b/.github/workflows/functions.yml index 0563dea4059..42d7b0c1395 100644 --- a/.github/workflows/functions.yml +++ b/.github/workflows/functions.yml @@ -12,6 +12,7 @@ on: - '.github/workflows/functions.yml' - '.github/workflows/common.yml' - '.github/workflows/common_cocoapods.yml' + - '.github/workflows/common_cocoapods_cron.yml' - 'FirebaseAuth/Interop/*.h' - 'FirebaseMessaging/Interop/*.h' - 'FirebaseTestingSupport/Functions/**' @@ -104,27 +105,12 @@ jobs: # test_type: "xctest" functions-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: Integration Test Server - run: FirebaseFunctions/Backend/start.sh synchronous - - name: PodLibLint Functions Cron - run: | - scripts/third_party/travis/retry.sh scripts/pod_lib_lint.rb \ - FirebaseFunctions.podspec --platforms=${{ matrix.target }} --use-static-frameworks + uses: ./.github/workflows/common_cocoapods_cron.yml + with: + product: FirebaseFunctions + platforms: '[ "ios", "tvos", "macos" ]' + flags: '[ "--use-static-frameworks" ]' + setup_command: FirebaseFunctions/Backend/start.sh synchronous + runs_on: macos-14 + xcode: Xcode_16.2 diff --git a/.github/workflows/inappmessaging.yml b/.github/workflows/inappmessaging.yml index 61118a10d1f..d0633743721 100644 --- a/.github/workflows/inappmessaging.yml +++ b/.github/workflows/inappmessaging.yml @@ -13,6 +13,7 @@ on: - '.github/workflows/common.yml' - '.github/workflows/common_cocoapods.yml' - '.github/workflows/common_quickstart.yml' + - '.github/workflows/common_cocoapods_cron.yml' - 'Gemfile*' schedule: # Run every day at 11pm (PDT) / 2am (EDT) - cron uses UTC times @@ -64,26 +65,12 @@ jobs: run: scripts/third_party/travis/retry.sh scripts/build.sh InAppMessaging ${{ matrix.platform }} xcodebuild fiam-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: - flags: [ - '--use-static-frameworks' - ] - platform: [ios, tvos] 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.4.app/Contents/Developer - - name: Setup Bundler - run: scripts/setup_bundler.sh - - name: PodLibLint InAppMessaging Cron - run: scripts/third_party/travis/retry.sh scripts/pod_lib_lint.rb FirebaseInAppMessaging.podspec --platforms=${{ matrix.platform }} ${{ matrix.flags }} + uses: ./.github/workflows/common_cocoapods_cron.yml + with: + product: FirebaseInAppMessaging + platforms: '[ "ios", "tvos" ]' + flags: '[ "--use-static-frameworks" ]' quickstart: uses: ./.github/workflows/common_quickstart.yml diff --git a/.github/workflows/installations.yml b/.github/workflows/installations.yml index 54f95f0b67d..ff7fde15883 100644 --- a/.github/workflows/installations.yml +++ b/.github/workflows/installations.yml @@ -13,6 +13,7 @@ on: - '.github/workflows/common_cocoapods.yml' - '.github/workflows/common_catalyst.yml' - '.github/workflows/common_quickstart.yml' + - '.github/workflows/common_cocoapods_cron.yml' - 'Gemfile*' schedule: # Run every day at 11pm (PDT) / 2am (EDT) - cron uses UTC times @@ -44,7 +45,7 @@ jobs: mkdir -p FirebaseInstallations/Source/Tests/Resources scripts/decrypt_gha_secret.sh scripts/gha-encrypted/Installations/GoogleService-Info.plist.gpg \ FirebaseInstallations/Source/Tests/Resources/GoogleService-Info.plist "$plist_secret" - export FIS_INTEGRATION_TESTS_REQUIRED=1 + echo "FIS_INTEGRATION_TESTS_REQUIRED=1" >> $GITHUB_ENV secrets: plist_secret: ${{ secrets.GHASecretsGPGPassphrase1 }} @@ -92,38 +93,17 @@ jobs: test_type: "xctest" installations-cron-only: - if: github.event_name == 'schedule' && github.repository == 'Firebase/firebase-ios-sdk' - - runs-on: macos-15 - env: - plist_secret: ${{ secrets.GHASecretsGPGPassphrase1 }} - FIR_IID_INTEGRATION_TESTS_REQUIRED: ${{ secrets.GHASecretsGPGPassphrase1 }} - 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.4.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: | + uses: ./.github/workflows/common_cocoapods_cron.yml + with: + product: FirebaseInstallations + platforms: '[ "ios", "tvos", "macos" ]' + flags: '[ "--use-static-frameworks" ]' + setup_command: | + scripts/configure_test_keychain.sh mkdir -p FirebaseInstallations/Source/Tests/Resources scripts/decrypt_gha_secret.sh scripts/gha-encrypted/Installations/GoogleService-Info.plist.gpg \ FirebaseInstallations/Source/Tests/Resources/GoogleService-Info.plist "$plist_secret" - - name: Get boolean for secrets available - id: secrets - run: echo "::set-output name=val::$([[ -z $plist_secret ]] && echo "0" || echo "1")" - - name: PodLibLint Installations Cron - run: | - export FIS_INTEGRATION_TESTS_REQUIRED=${{ steps.secrets.outputs.val }} - scripts/third_party/travis/retry.sh scripts/pod_lib_lint.rb FirebaseInstallations.podspec \ - --platforms=${{ matrix.target }} ${{ matrix.flags }} \ + echo "FIS_INTEGRATION_TESTS_REQUIRED=1" >> $GITHUB_ENV + secrets: + plist_secret: ${{ secrets.GHASecretsGPGPassphrase1 }} diff --git a/.github/workflows/messaging.yml b/.github/workflows/messaging.yml index b1227c3e9eb..993cfb543dd 100644 --- a/.github/workflows/messaging.yml +++ b/.github/workflows/messaging.yml @@ -20,6 +20,7 @@ on: - '.github/workflows/common_cocoapods.yml' - '.github/workflows/common_catalyst.yml' - '.github/workflows/common_quickstart.yml' + - '.github/workflows/common_cocoapods_cron.yml' # Rebuild on Ruby infrastructure changes - 'Gemfile*' schedule: @@ -129,29 +130,11 @@ jobs: test_type: "xctest" messaging-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 --skip-tests, watchos --skip-tests] - os: [macos-14, macos-15] - include: - - os: macos-15 - xcode: Xcode_16.4 - tests: --test-specs=unit - - os: macos-14 - xcode: Xcode_16.2 - tests: --skip-tests - 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 - - name: PodLibLint Messaging Cron - run: scripts/third_party/travis/retry.sh scripts/pod_lib_lint.rb FirebaseMessaging.podspec ${{ matrix.tests }} --platforms=${{ matrix.target }} --use-static-frameworks + uses: ./.github/workflows/common_cocoapods_cron.yml + with: + product: FirebaseMessaging + platforms: '[ "ios", "tvos", "macos --skip-tests", "watchos --skip-tests" ]' + flags: '[ "--use-static-frameworks" ]' messaging-sample-build-test: # Don't run on private repo unless it is a PR. diff --git a/.github/workflows/mlmodeldownloader.yml b/.github/workflows/mlmodeldownloader.yml index d4bb6f1a5c7..5859a02c47e 100644 --- a/.github/workflows/mlmodeldownloader.yml +++ b/.github/workflows/mlmodeldownloader.yml @@ -12,6 +12,7 @@ on: - '.github/workflows/common.yml' - '.github/workflows/common_cocoapods.yml' - '.github/workflows/common_catalyst.yml' + - '.github/workflows/common_cocoapods_cron.yml' - 'Gemfile*' schedule: # Run every day at 12am (PDT) / 3am (EDT) - cron uses UTC times @@ -45,30 +46,19 @@ jobs: plist_secret: ${{ secrets.GHASecretsGPGPassphrase1 }} 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.4.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: | + uses: ./.github/workflows/common_cocoapods_cron.yml + with: + product: FirebaseMLModelDownloader + platforms: '[ "ios", "tvos", "macos" ]' + flags: '[ "--use-static-frameworks" ]' + setup_command: | + scripts/configure_test_keychain.sh 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 + secrets: + plist_secret: ${{ secrets.GHASecretsGPGPassphrase1 }} mlmodeldownloader-sample-build-test: # Don't run on private repo unless it is a PR. diff --git a/.github/workflows/performance.yml b/.github/workflows/performance.yml index b0d01161259..9d1f35594e6 100644 --- a/.github/workflows/performance.yml +++ b/.github/workflows/performance.yml @@ -20,6 +20,7 @@ on: - '.github/workflows/common_cocoapods.yml' - '.github/workflows/common_catalyst.yml' - '.github/workflows/common_quickstart.yml' + - '.github/workflows/common_cocoapods_cron.yml' # Rebuild on Ruby infrastructure changes - 'Gemfile*' schedule: @@ -121,23 +122,9 @@ jobs: test_type: "xctest" performance-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] - 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.4.app/Contents/Developer - - name: Setup Bundler - run: scripts/setup_bundler.sh - - name: PodLibLint Performance Cron - run: | - scripts/third_party/travis/retry.sh scripts/pod_lib_lint.rb FirebasePerformance.podspec --platforms=${{ matrix.target }} ${{ matrix.flags }} + uses: ./.github/workflows/common_cocoapods_cron.yml + with: + product: FirebasePerformance + platforms: '[ "ios", "tvos" ]' + flags: '[ "--skip-tests --use-static-frameworks" ]' diff --git a/.github/workflows/remoteconfig.yml b/.github/workflows/remoteconfig.yml index 5dc0984c517..9d6fe55f330 100644 --- a/.github/workflows/remoteconfig.yml +++ b/.github/workflows/remoteconfig.yml @@ -14,6 +14,7 @@ on: - '.github/workflows/common_cocoapods.yml' - '.github/workflows/common_catalyst.yml' - '.github/workflows/common_quickstart.yml' + - '.github/workflows/common_cocoapods_cron.yml' - 'Gemfile*' - 'scripts/generate_access_token.sh' - 'scripts/gha-encrypted/RemoteConfigSwiftAPI/**' @@ -147,21 +148,9 @@ jobs: run: scripts/build.sh RemoteConfigSample iOS remoteconfig-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: ['--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.4.app/Contents/Developer - - name: Setup Bundler - run: scripts/setup_bundler.sh - - name: PodLibLint RemoteConfig Cron - run: | - scripts/third_party/travis/retry.sh scripts/pod_lib_lint.rb FirebaseRemoteConfig.podspec --platforms=${{ matrix.target }} ${{ matrix.flags }} + uses: ./.github/workflows/common_cocoapods_cron.yml + with: + product: FirebaseRemoteConfig + platforms: '[ "ios", "tvos", "macos" ]' + flags: '[ "--skip-tests --use-static-frameworks" ]' diff --git a/.github/workflows/storage.yml b/.github/workflows/storage.yml index 29449d9fe85..12bbb9bf86d 100644 --- a/.github/workflows/storage.yml +++ b/.github/workflows/storage.yml @@ -14,6 +14,7 @@ on: - '.github/workflows/common_cocoapods.yml' - '.github/workflows/common_catalyst.yml' - '.github/workflows/common_quickstart.yml' + - '.github/workflows/common_cocoapods_cron.yml' # Rebuild on Ruby infrastructure changes. - 'Gemfile*' schedule: @@ -127,24 +128,9 @@ jobs: test_specs: unit 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.4 - 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 + uses: ./.github/workflows/common_cocoapods_cron.yml + with: + product: FirebaseStorage + platforms: '[ "ios", "tvos", "macos", "watchos" ]' + flags: '[ "--use-static-frameworks --skip-tests" ]'