mlmodeldownloader.yml 4.6 KB

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