mlmodeldownloader.yml 5.0 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119
  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: Initialize xcodebuild
  58. run: scripts/setup_spm_tests.sh
  59. - name: iOS Unit Tests
  60. run: scripts/third_party/travis/retry.sh ./scripts/build.sh FirebaseMLModelDownloaderUnit iOS spm
  61. spm-cron:
  62. # Don't run on private repo.
  63. if: github.event_name == 'schedule' && github.repository == 'Firebase/firebase-ios-sdk'
  64. runs-on: macOS-latest
  65. strategy:
  66. matrix:
  67. target: [tvOS, macOS, catalyst]
  68. steps:
  69. - uses: actions/checkout@v2
  70. - name: Initialize xcodebuild
  71. run: scripts/setup_spm_tests.sh
  72. - name: Unit Tests
  73. run: scripts/third_party/travis/retry.sh ./scripts/build.sh FirebaseMLModelDownloaderUnit ${{ matrix.target }} spm
  74. catalyst:
  75. if: (github.repository == 'Firebase/firebase-ios-sdk' && github.event_name == 'schedule') || github.event_name == 'pull_request'
  76. runs-on: macOS-latest
  77. steps:
  78. - uses: actions/checkout@v2
  79. - name: Setup Bundler
  80. run: scripts/setup_bundler.sh
  81. - name: Setup project and Build Catalyst
  82. run: scripts/test_catalyst.sh FirebaseMLModelDownloader test FirebaseMLModelDownloader-Unit-unit
  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)
  102. podspec-presubmit:
  103. # Don't run on private repo unless it is a PR.
  104. if: github.repository == 'Firebase/firebase-ios-sdk' && github.event.pull_request.merged != true && github.event.action != 'closed'
  105. runs-on: macOS-latest
  106. steps:
  107. - uses: actions/checkout@v2
  108. - name: Setup Bundler
  109. run: scripts/setup_bundler.sh
  110. - name: Build and test
  111. run: scripts/third_party/travis/retry.sh pod spec lint FirebaseMLModelDownloader.podspec --skip-tests --sources='https://github.com/firebase/SpecsTesting','https://github.com/firebase/SpecsDev.git','https://github.com/firebase/SpecsStaging.git','https://cdn.cocoapods.org/'