mlmodeldownloader.yml 4.4 KB

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