mlmodeldownloader.yml 3.7 KB

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