mlmodeldownloader.yml 4.2 KB

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