mlmodeldownloader.yml 5.4 KB

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