mlmodeldownloader.yml 4.5 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111
  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. jobs:
  12. pod-lib-lint:
  13. if: (github.repository == 'Firebase/firebase-ios-sdk' && github.event_name == 'schedule') || github.event_name == 'pull_request'
  14. runs-on: macOS-latest
  15. env:
  16. plist_secret: ${{ secrets.GHASecretsGPGPassphrase1 }}
  17. strategy:
  18. matrix:
  19. target: [ios, tvos, macos]
  20. steps:
  21. - uses: actions/checkout@v2
  22. - name: Setup Bundler
  23. run: scripts/setup_bundler.sh
  24. - name: Install GoogleService-Info.plist
  25. run: |
  26. mkdir FirebaseMLModelDownloader/Tests/Integration/Resources
  27. scripts/decrypt_gha_secret.sh scripts/gha-encrypted/MLModelDownloader/GoogleService-Info.plist.gpg \
  28. FirebaseMLModelDownloader/Tests/Integration/Resources/GoogleService-Info.plist "$plist_secret"
  29. - name: Build and test
  30. run: ([ -z $plist_secret ] || scripts/third_party/travis/retry.sh scripts/pod_lib_lint.rb FirebaseMLModelDownloader.podspec --platforms=${{ matrix.target }})
  31. mlmodeldownloader-cron-only:
  32. if: github.event_name == 'schedule' && github.repository == 'Firebase/firebase-ios-sdk'
  33. runs-on: macos-latest
  34. env:
  35. plist_secret: ${{ secrets.GHASecretsGPGPassphrase1 }}
  36. strategy:
  37. matrix:
  38. target: [ios, tvos, macos]
  39. needs: pod-lib-lint
  40. steps:
  41. - uses: actions/checkout@v2
  42. - name: Setup Bundler
  43. run: scripts/setup_bundler.sh
  44. - name: Install GoogleService-Info.plist
  45. run: |
  46. mkdir FirebaseMLModelDownloader/Tests/Integration/Resources
  47. scripts/decrypt_gha_secret.sh scripts/gha-encrypted/MLModelDownloader/GoogleService-Info.plist.gpg \
  48. FirebaseMLModelDownloader/Tests/Integration/Resources/GoogleService-Info.plist "$plist_secret"
  49. - name: PodLibLint MLModelDownloader Cron
  50. run: scripts/third_party/travis/retry.sh scripts/pod_lib_lint.rb FirebaseMLModelDownloader.podspec --platforms=${{ matrix.target }} --use-static-frameworks
  51. spm:
  52. if: (github.repository == 'Firebase/firebase-ios-sdk' && github.event_name == 'schedule') || github.event_name == 'pull_request'
  53. runs-on: macOS-latest
  54. steps:
  55. - uses: actions/checkout@v2
  56. - name: Xcode 12
  57. run: sudo xcode-select -s /Applications/Xcode_12.app/Contents/Developer
  58. - name: Initialize xcodebuild
  59. run: xcodebuild -list
  60. - name: iOS Unit Tests
  61. run: scripts/third_party/travis/retry.sh ./scripts/build.sh FirebaseMLModelDownloaderUnit iOS spm
  62. spm-cron:
  63. # Don't run on private repo.
  64. if: github.event_name == 'schedule' && github.repository == 'Firebase/firebase-ios-sdk'
  65. runs-on: macOS-latest
  66. strategy:
  67. matrix:
  68. target: [tvOS, macOS, catalyst]
  69. steps:
  70. - uses: actions/checkout@v2
  71. - name: Xcode 12
  72. run: sudo xcode-select -s /Applications/Xcode_12.app/Contents/Developer
  73. - name: Initialize xcodebuild
  74. run: xcodebuild -list
  75. - name: Unit Tests
  76. run: scripts/third_party/travis/retry.sh ./scripts/build.sh FirebaseMLModelDownloaderUnit ${{ matrix.target }} spm
  77. catalyst:
  78. if: (github.repository == 'Firebase/firebase-ios-sdk' && github.event_name == 'schedule') || github.event_name == 'pull_request'
  79. runs-on: macOS-latest
  80. steps:
  81. - uses: actions/checkout@v2
  82. - name: Setup Bundler
  83. run: scripts/setup_bundler.sh
  84. - name: Setup project and Build Catalyst
  85. run: scripts/test_catalyst.sh FirebaseMLModelDownloader test FirebaseMLModelDownloader-Unit-unit
  86. mlmodeldownloader-sample-build-test:
  87. # Don't run on private repo unless it is a PR.
  88. if: github.repository == 'Firebase/firebase-ios-sdk' && (github.event_name == 'schedule' || github.event_name == 'pull_request')
  89. env:
  90. plist_secret: ${{ secrets.GHASecretsGPGPassphrase1 }}
  91. runs-on: macos-latest
  92. steps:
  93. - uses: actions/checkout@v2
  94. - name: Setup Bundler
  95. run: scripts/setup_bundler.sh
  96. - name: Install GoogleService-Info.plist
  97. run: |
  98. mkdir FirebaseMLModelDownloader/Apps/Sample/Resources
  99. scripts/decrypt_gha_secret.sh scripts/gha-encrypted/MLModelDownloader/GoogleService-Info.plist.gpg \
  100. FirebaseMLModelDownloader/Apps/Sample/Resources/GoogleService-Info.plist "$plist_secret"
  101. - name: Prereqs
  102. run: scripts/install_prereqs.sh MLModelDownloaderSample iOS
  103. - name: Build
  104. run: ([ -z $plist_secret ] || scripts/build.sh MLModelDownloaderSample iOS)