Skip to content

[Infra] Make mlmodeldownloader.yml use reusable CocoaPods workflow #14904

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 18 commits into from
May 29, 2025
Merged
Show file tree
Hide file tree
Changes from 5 commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 2 additions & 2 deletions .github/workflows/abtesting.yml
Original file line number Diff line number Diff line change
Expand Up @@ -9,9 +9,9 @@ on:
paths:
- 'FirebaseABTesting**'
- 'Interop/Analytics/Public/*.h'
- '.github/workflows/abtesting.yml'
# - '.github/workflows/abtesting.yml'
- '.github/workflows/common.yml'
- '.github/workflows/common_cocoapods.yml'
# - '.github/workflows/common_cocoapods.yml'
- 'Gemfile*'
schedule:
# Run every day at 1am(PST) - cron uses UTC times
Expand Down
4 changes: 2 additions & 2 deletions .github/workflows/appdistribution.yml
Original file line number Diff line number Diff line change
Expand Up @@ -8,9 +8,9 @@ on:
pull_request:
paths:
- 'FirebaseAppDistribution**'
- '.github/workflows/appdistribution.yml'
# - '.github/workflows/appdistribution.yml'
- '.github/workflows/common.yml'
- '.github/workflows/common_cocoapods.yml'
# - '.github/workflows/common_cocoapods.yml'
- 'Gemfile*'
schedule:
# Run every day at 1am (PST) - cron uses UTC times
Expand Down
4 changes: 2 additions & 2 deletions .github/workflows/auth.yml
Original file line number Diff line number Diff line change
Expand Up @@ -9,9 +9,9 @@ on:
paths:
- 'FirebaseAuth**'
- 'FirebaseAuth/Interop/*.h'
- '.github/workflows/auth.yml'
# - '.github/workflows/auth.yml'
- '.github/workflows/common.yml'
- '.github/workflows/common_cocoapods.yml'
# - '.github/workflows/common_cocoapods.yml'
- 'scripts/gha-encrypted/AuthSample/SwiftApplication.plist.gpg'
- 'Gemfile*'
schedule:
Expand Down
5 changes: 5 additions & 0 deletions .github/workflows/common_cocoapods.yml
Original file line number Diff line number Diff line change
Expand Up @@ -66,6 +66,9 @@ on:
# This is useful for additional set up, like starting an emulator or
# downloading test data.
#
# Note, this step has env var set to decrypt plists. Use "$plist_secret"
# in the given command.
#
# Example: `FirebaseFunctions/Backend/start.sh synchronous`
setup_command:
type: string
Expand Down Expand Up @@ -101,6 +104,8 @@ jobs:
run: sed -i "" "s/s.swift_version[[:space:]]*=[[:space:]]*'5.9'/s.swift_version = '6.0'/" ${{ inputs.product }}.podspec
- name: Run setup command, if needed.
if: inputs.setup_command != ''
env:
plist_secret: ${{ secrets.GHASecretsGPGPassphrase1 }}
run: ${{ inputs.setup_command }}
- uses: nick-fields/retry@ce71cc2ab81d554ebbe88c79ab5975992d79ba08 # v3
if: contains(join(inputs.platforms), matrix.platform) || matrix.os == 'macos-14'
Expand Down
4 changes: 2 additions & 2 deletions .github/workflows/core.yml
Original file line number Diff line number Diff line change
Expand Up @@ -8,9 +8,9 @@ on:
pull_request:
paths:
- 'FirebaseCore**'
- '.github/workflows/core.yml'
# - '.github/workflows/core.yml'
- '.github/workflows/common.yml'
- '.github/workflows/common_cocoapods.yml'
# - '.github/workflows/common_cocoapods.yml'
- 'Gemfile*'
schedule:
# Run every day at 2am (PST) - cron uses UTC times
Expand Down
4 changes: 2 additions & 2 deletions .github/workflows/core_extension.yml
Original file line number Diff line number Diff line change
Expand Up @@ -9,9 +9,9 @@ on:
paths:
- 'FirebaseCoreExtension.podspec'
- 'FirebaseCore/Extension/**'
- '.github/workflows/core_extension.yml'
# - '.github/workflows/core_extension.yml'
- '.github/workflows/common.yml'
- '.github/workflows/common_cocoapods.yml'
# - '.github/workflows/common_cocoapods.yml'
- 'Gemfile*'
schedule:
# Run every day at 2am (PST) - cron uses UTC times
Expand Down
4 changes: 2 additions & 2 deletions .github/workflows/core_internal.yml
Original file line number Diff line number Diff line change
Expand Up @@ -9,9 +9,9 @@ on:
paths:
- 'FirebaseCoreInternal.podspec'
- 'FirebaseCore/Internal/**'
- '.github/workflows/core_internal.yml'
# - '.github/workflows/core_internal.yml'
- '.github/workflows/common.yml'
- '.github/workflows/common_cocoapods.yml'
# - '.github/workflows/common_cocoapods.yml'
- 'Gemfile*'
schedule:
# Run every day at 2am (PST) - cron uses UTC times
Expand Down
4 changes: 2 additions & 2 deletions .github/workflows/crashlytics.yml
Original file line number Diff line number Diff line change
Expand Up @@ -9,9 +9,9 @@ on:
paths:
- 'Crashlytics**'
- 'FirebaseCrashlytics.podspec'
- '.github/workflows/crashlytics.yml'
# - '.github/workflows/crashlytics.yml'
- '.github/workflows/common.yml'
- '.github/workflows/common_cocoapods.yml'
# - '.github/workflows/common_cocoapods.yml'
- 'Interop/Analytics/Public/*.h'
- 'Gemfile*'
schedule:
Expand Down
4 changes: 2 additions & 2 deletions .github/workflows/database.yml
Original file line number Diff line number Diff line change
Expand Up @@ -12,9 +12,9 @@ on:
- 'FirebaseSharedSwift**'
- 'Example/Database/**'
- 'FirebaseAuth/Interop/*.h'
- '.github/workflows/database.yml'
# - '.github/workflows/database.yml'
- '.github/workflows/common.yml'
- '.github/workflows/common_cocoapods.yml'
# - '.github/workflows/common_cocoapods.yml'
- 'Gemfile*'
- 'scripts/run_database_emulator.sh'
schedule:
Expand Down
4 changes: 2 additions & 2 deletions .github/workflows/dynamiclinks.yml
Original file line number Diff line number Diff line change
Expand Up @@ -8,10 +8,10 @@ on:
pull_request:
paths:
- 'FirebaseDynamicLinks**'
- '.github/workflows/dynamiclinks.yml'
# - '.github/workflows/dynamiclinks.yml'
- 'Interop/Analytics/Public/*.h'
- '.github/workflows/common.yml'
- '.github/workflows/common_cocoapods.yml'
# - '.github/workflows/common_cocoapods.yml'
- 'Gemfile*'
schedule:
# Run every day at 1am (PST) - cron uses UTC times
Expand Down
4 changes: 2 additions & 2 deletions .github/workflows/firebase_app_check.yml
Original file line number Diff line number Diff line change
Expand Up @@ -8,9 +8,9 @@ on:
pull_request:
paths:
- 'FirebaseAppCheck**'
- '.github/workflows/firebase_app_check.yml'
# - '.github/workflows/firebase_app_check.yml'
- '.github/workflows/common.yml'
- '.github/workflows/common_cocoapods.yml'
# - '.github/workflows/common_cocoapods.yml'
- 'Gemfile*'
schedule:
# Run every day at 11pm (PST) - cron uses UTC times
Expand Down
4 changes: 2 additions & 2 deletions .github/workflows/firebaseai.yml
Original file line number Diff line number Diff line change
Expand Up @@ -4,9 +4,9 @@ on:
pull_request:
paths:
- 'FirebaseAI**'
- '.github/workflows/firebaseai.yml'
# - '.github/workflows/firebaseai.yml'
- '.github/workflows/common.yml'
- '.github/workflows/common_cocoapods.yml'
# - '.github/workflows/common_cocoapods.yml'
- 'scripts/quickstart_build_spm.sh'
- 'scripts/quickstart_spm_xcodeproj.sh'
- 'Gemfile*'
Expand Down
4 changes: 2 additions & 2 deletions .github/workflows/functions.yml
Original file line number Diff line number Diff line change
Expand Up @@ -9,9 +9,9 @@ on:
paths:
- 'FirebaseFunctions**'
- 'FirebaseSharedSwift**'
- '.github/workflows/functions.yml'
# - '.github/workflows/functions.yml'
- '.github/workflows/common.yml'
- '.github/workflows/common_cocoapods.yml'
# - '.github/workflows/common_cocoapods.yml'
- 'FirebaseAuth/Interop/*.h'
- 'FirebaseMessaging/Interop/*.h'
- 'FirebaseTestingSupport/Functions/**'
Expand Down
4 changes: 2 additions & 2 deletions .github/workflows/inappmessaging.yml
Original file line number Diff line number Diff line change
Expand Up @@ -9,9 +9,9 @@ on:
paths:
- 'FirebaseInAppMessaging**'
- 'Interop/Analytics/Public/*.h'
- '.github/workflows/inappmessaging.yml'
# - '.github/workflows/inappmessaging.yml'
- '.github/workflows/common.yml'
- '.github/workflows/common_cocoapods.yml'
# - '.github/workflows/common_cocoapods.yml'
- 'Gemfile*'
schedule:
# Run every day at 10pm (PST) - cron uses UTC times
Expand Down
4 changes: 2 additions & 2 deletions .github/workflows/messaging.yml
Original file line number Diff line number Diff line change
Expand Up @@ -14,10 +14,10 @@ on:
# Podspec
- 'FirebaseMessaging.podspec'
# This file
- '.github/workflows/messaging.yml'
# - '.github/workflows/messaging.yml'
# Re-usable workflows being used by this file.
- '.github/workflows/common.yml'
- '.github/workflows/common_cocoapods.yml'
# - '.github/workflows/common_cocoapods.yml'
# Rebuild on Ruby infrastructure changes
- 'Gemfile*'
schedule:
Expand Down
155 changes: 71 additions & 84 deletions .github/workflows/mlmodeldownloader.yml
Original file line number Diff line number Diff line change
Expand Up @@ -6,6 +6,8 @@
paths:
- 'FirebaseMLModelDownloader**'
- '.github/workflows/mlmodeldownloader.yml'
- '.github/workflows/common.yml'
- '.github/workflows/common_cocoapods.yml'
- 'Gemfile*'
schedule:
# Run every day at 11pm (PST) - cron uses UTC times
Expand All @@ -16,95 +18,80 @@
cancel-in-progress: true

jobs:
spm:
uses: ./.github/workflows/common.yml
with:
target: FirebaseMLModelDownloaderUnit
# spm:
# uses: ./.github/workflows/common.yml
# with:
# target: FirebaseMLModelDownloaderUnit

# catalyst:
# uses: ./.github/workflows/common_catalyst.yml
# with:
# product: FirebaseMLModelDownloader
# target: FirebaseMLModelDownloader-Unit-unit

catalyst:
uses: ./.github/workflows/common_catalyst.yml
pod_lib_lint:
uses: ./.github/workflows/common_cocoapods.yml
with:
product: FirebaseMLModelDownloader
target: FirebaseMLModelDownloader-Unit-unit

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: |
platforms: iOS
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: 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 }})
ls
ls FirebaseMLModelDownloader/Tests/Integration/Resources
pwd

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
# 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

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)
# 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)
4 changes: 2 additions & 2 deletions .github/workflows/performance.yml
Original file line number Diff line number Diff line change
Expand Up @@ -14,10 +14,10 @@ on:
# Podspec
- 'FirebasePerformance.podspec'
# YML configuration file
- '.github/workflows/performance.yml'
# - '.github/workflows/performance.yml'
# Re-usable workflows depended on by this file.
- '.github/workflows/common.yml'
- '.github/workflows/common_cocoapods.yml'
# - '.github/workflows/common_cocoapods.yml'
# Rebuild on Ruby infrastructure changes
- 'Gemfile*'
schedule:
Expand Down
4 changes: 2 additions & 2 deletions .github/workflows/remoteconfig.yml
Original file line number Diff line number Diff line change
Expand Up @@ -9,9 +9,9 @@ on:
paths:
- 'FirebaseRemoteConfig**'
- 'Interop/Analytics/Public/*.h'
- '.github/workflows/remoteconfig.yml'
# - '.github/workflows/remoteconfig.yml'
- '.github/workflows/common.yml'
- '.github/workflows/common_cocoapods.yml'
# - '.github/workflows/common_cocoapods.yml'
- 'Gemfile*'
- 'scripts/generate_access_token.sh'
- 'scripts/gha-encrypted/RemoteConfigSwiftAPI/**'
Expand Down
4 changes: 2 additions & 2 deletions .github/workflows/sessions.yml
Original file line number Diff line number Diff line change
Expand Up @@ -9,9 +9,9 @@ on:
paths:
- 'FirebaseSessions**'
- 'FirebaseSessions.podspec'
- '.github/workflows/sessions.yml'
# - '.github/workflows/sessions.yml'
- '.github/workflows/common.yml'
- '.github/workflows/common_cocoapods.yml'
# - '.github/workflows/common_cocoapods.yml'
- 'Gemfile*'
schedule:
# Run every day at 9am (PST) - cron uses UTC times
Expand Down
Loading
Loading