mlmodeldownloader.yml 3.2 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687
  1. name: mlmodeldownloader
  2. permissions:
  3. contents: read
  4. on:
  5. workflow_dispatch:
  6. pull_request:
  7. paths:
  8. - 'FirebaseMLModelDownloader**'
  9. - '.github/workflows/mlmodeldownloader.yml'
  10. - '.github/workflows/common.yml'
  11. - '.github/workflows/common_cocoapods.yml'
  12. - '.github/workflows/common_catalyst.yml'
  13. - '.github/workflows/common_cocoapods_cron.yml'
  14. - 'Gemfile*'
  15. schedule:
  16. # Run every day at 12am (PDT) / 3am (EDT) - cron uses UTC times
  17. - cron: '0 7 * * *'
  18. concurrency:
  19. group: ${{ github.workflow }}-${{ github.head_ref || github.ref }}
  20. cancel-in-progress: true
  21. jobs:
  22. spm:
  23. uses: ./.github/workflows/common.yml
  24. with:
  25. target: FirebaseMLModelDownloaderUnit
  26. catalyst:
  27. uses: ./.github/workflows/common_catalyst.yml
  28. with:
  29. product: FirebaseMLModelDownloader
  30. target: FirebaseMLModelDownloader-Unit-unit
  31. pod_lib_lint:
  32. uses: ./.github/workflows/common_cocoapods.yml
  33. with:
  34. product: FirebaseMLModelDownloader
  35. setup_command: |
  36. mkdir FirebaseMLModelDownloader/Tests/Integration/Resources
  37. scripts/decrypt_gha_secret.sh scripts/gha-encrypted/MLModelDownloader/GoogleService-Info.plist.gpg \
  38. FirebaseMLModelDownloader/Tests/Integration/Resources/GoogleService-Info.plist "$plist_secret"
  39. secrets:
  40. plist_secret: ${{ secrets.GHASecretsGPGPassphrase1 }}
  41. mlmodeldownloader-cron-only:
  42. needs: pod_lib_lint
  43. uses: ./.github/workflows/common_cocoapods_cron.yml
  44. with:
  45. product: FirebaseMLModelDownloader
  46. platforms: '[ "ios", "tvos", "macos" ]'
  47. flags: '[ "--use-static-frameworks" ]'
  48. setup_command: |
  49. scripts/configure_test_keychain.sh
  50. mkdir FirebaseMLModelDownloader/Tests/Integration/Resources
  51. scripts/decrypt_gha_secret.sh scripts/gha-encrypted/MLModelDownloader/GoogleService-Info.plist.gpg \
  52. FirebaseMLModelDownloader/Tests/Integration/Resources/GoogleService-Info.plist "$plist_secret"
  53. secrets:
  54. plist_secret: ${{ secrets.GHASecretsGPGPassphrase1 }}
  55. mlmodeldownloader-sample-build-test:
  56. # Don't run on private repo unless it is a PR.
  57. if: github.repository == 'Firebase/firebase-ios-sdk' && (github.event_name == 'schedule' || github.event_name == 'pull_request')
  58. env:
  59. plist_secret: ${{ secrets.GHASecretsGPGPassphrase1 }}
  60. runs-on: macos-15
  61. steps:
  62. - uses: actions/checkout@v4
  63. - uses: mikehardy/buildcache-action@c87cea0ccd718971d6cc39e672c4f26815b6c126
  64. with:
  65. cache_key: build-test${{ matrix.os }}
  66. - uses: ruby/setup-ruby@354a1ad156761f5ee2b7b13fa8e09943a5e8d252 # v1
  67. - name: Xcode
  68. run: sudo xcode-select -s /Applications/Xcode_16.4.app/Contents/Developer
  69. - name: Setup Bundler
  70. run: scripts/setup_bundler.sh
  71. - name: Install GoogleService-Info.plist
  72. run: |
  73. mkdir FirebaseMLModelDownloader/Apps/Sample/Resources
  74. scripts/decrypt_gha_secret.sh scripts/gha-encrypted/MLModelDownloader/GoogleService-Info.plist.gpg \
  75. FirebaseMLModelDownloader/Apps/Sample/Resources/GoogleService-Info.plist "$plist_secret"
  76. - name: Prereqs
  77. run: scripts/install_prereqs.sh MLModelDownloaderSample iOS
  78. - name: Build
  79. run: ([ -z $plist_secret ] || scripts/build.sh MLModelDownloaderSample iOS)