mlmodeldownloader.yml 5.4 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138
  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-12, macos-13]
  23. include:
  24. - os: macos-12
  25. xcode: Xcode_14.2
  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-12
  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-12, macos-13, macos-14]
  74. include:
  75. - os: macos-12
  76. xcode: Xcode_14.2
  77. - os: macos-13
  78. xcode: Xcode_15.2
  79. - os: macos-14
  80. xcode: Xcode_15.2
  81. - os: macos-14
  82. xcode: Xcode_15.2
  83. target: visionOS
  84. runs-on: ${{ matrix.os }}
  85. steps:
  86. - uses: actions/checkout@v4
  87. - uses: mikehardy/buildcache-action@c87cea0ccd718971d6cc39e672c4f26815b6c126
  88. with:
  89. cache_key: spm${{ matrix.os }}-${{ matrix.xcode }}-${{ matrix.target }}
  90. - name: Xcode
  91. run: sudo xcode-select -s /Applications/${{ matrix.xcode }}.app/Contents/Developer
  92. - name: Initialize xcodebuild
  93. run: scripts/setup_spm_tests.sh
  94. - name: Unit Tests
  95. run: scripts/third_party/travis/retry.sh ./scripts/build.sh FirebaseMLModelDownloaderUnit ${{ matrix.target }} spm
  96. catalyst:
  97. if: (github.repository == 'Firebase/firebase-ios-sdk' && github.event_name == 'schedule') || github.event_name == 'pull_request'
  98. runs-on: macos-12
  99. steps:
  100. - uses: actions/checkout@v4
  101. - uses: mikehardy/buildcache-action@c87cea0ccd718971d6cc39e672c4f26815b6c126
  102. with:
  103. cache_key: catalyst${{ matrix.os }}
  104. - uses: ruby/setup-ruby@v1
  105. - name: Setup Bundler
  106. run: scripts/setup_bundler.sh
  107. - name: Setup project and Build Catalyst
  108. run: scripts/test_catalyst.sh FirebaseMLModelDownloader test FirebaseMLModelDownloader-Unit-unit
  109. mlmodeldownloader-sample-build-test:
  110. # Don't run on private repo unless it is a PR.
  111. if: github.repository == 'Firebase/firebase-ios-sdk' && (github.event_name == 'schedule' || github.event_name == 'pull_request')
  112. env:
  113. plist_secret: ${{ secrets.GHASecretsGPGPassphrase1 }}
  114. runs-on: macos-12
  115. steps:
  116. - uses: actions/checkout@v4
  117. - uses: mikehardy/buildcache-action@c87cea0ccd718971d6cc39e672c4f26815b6c126
  118. with:
  119. cache_key: build-test${{ matrix.os }}
  120. - uses: ruby/setup-ruby@v1
  121. - name: Setup Bundler
  122. run: scripts/setup_bundler.sh
  123. - name: Install GoogleService-Info.plist
  124. run: |
  125. mkdir FirebaseMLModelDownloader/Apps/Sample/Resources
  126. scripts/decrypt_gha_secret.sh scripts/gha-encrypted/MLModelDownloader/GoogleService-Info.plist.gpg \
  127. FirebaseMLModelDownloader/Apps/Sample/Resources/GoogleService-Info.plist "$plist_secret"
  128. - name: Prereqs
  129. run: scripts/install_prereqs.sh MLModelDownloaderSample iOS
  130. - name: Build
  131. run: ([ -z $plist_secret ] || scripts/build.sh MLModelDownloaderSample iOS)