mlmodeldownloader.yml 5.2 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123
  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-11
  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: Configure test keychain
  25. run: scripts/configure_test_keychain.sh
  26. - name: Install GoogleService-Info.plist
  27. run: |
  28. mkdir FirebaseMLModelDownloader/Tests/Integration/Resources
  29. scripts/decrypt_gha_secret.sh scripts/gha-encrypted/MLModelDownloader/GoogleService-Info.plist.gpg \
  30. FirebaseMLModelDownloader/Tests/Integration/Resources/GoogleService-Info.plist "$plist_secret"
  31. - name: Build and test
  32. # TODO: Disable verbose logging after flaky test investigation.
  33. run: ([ -z $plist_secret ] || scripts/third_party/travis/retry.sh scripts/pod_lib_lint.rb FirebaseMLModelDownloader.podspec --verbose --platforms=${{ matrix.target }})
  34. mlmodeldownloader-cron-only:
  35. if: github.event_name == 'schedule' && github.repository == 'Firebase/firebase-ios-sdk'
  36. runs-on: macos-11
  37. env:
  38. plist_secret: ${{ secrets.GHASecretsGPGPassphrase1 }}
  39. strategy:
  40. matrix:
  41. target: [ios, tvos, macos]
  42. needs: pod-lib-lint
  43. steps:
  44. - uses: actions/checkout@v2
  45. - name: Setup Bundler
  46. run: scripts/setup_bundler.sh
  47. - name: Configure test keychain
  48. run: scripts/configure_test_keychain.sh
  49. - name: Install GoogleService-Info.plist
  50. run: |
  51. mkdir FirebaseMLModelDownloader/Tests/Integration/Resources
  52. scripts/decrypt_gha_secret.sh scripts/gha-encrypted/MLModelDownloader/GoogleService-Info.plist.gpg \
  53. FirebaseMLModelDownloader/Tests/Integration/Resources/GoogleService-Info.plist "$plist_secret"
  54. - name: PodLibLint MLModelDownloader Cron
  55. run: scripts/third_party/travis/retry.sh scripts/pod_lib_lint.rb FirebaseMLModelDownloader.podspec --platforms=${{ matrix.target }} --use-static-frameworks
  56. spm:
  57. if: (github.repository == 'Firebase/firebase-ios-sdk' && github.event_name == 'schedule') || github.event_name == 'pull_request'
  58. runs-on: macos-11
  59. steps:
  60. - uses: actions/checkout@v2
  61. - name: Initialize xcodebuild
  62. run: scripts/setup_spm_tests.sh
  63. - name: iOS Unit Tests
  64. run: scripts/third_party/travis/retry.sh ./scripts/build.sh FirebaseMLModelDownloaderUnit iOS spm
  65. spm-cron:
  66. # Don't run on private repo.
  67. if: github.event_name == 'schedule' && github.repository == 'Firebase/firebase-ios-sdk'
  68. runs-on: macos-11
  69. strategy:
  70. matrix:
  71. target: [tvOS, macOS, catalyst]
  72. steps:
  73. - uses: actions/checkout@v2
  74. - name: Initialize xcodebuild
  75. run: scripts/setup_spm_tests.sh
  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-11
  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-11
  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)
  106. podspec-presubmit:
  107. # Don't run on private repo unless it is a PR.
  108. if: github.repository == 'Firebase/firebase-ios-sdk' && github.event.pull_request.merged != true && github.event.action != 'closed'
  109. runs-on: macos-11
  110. steps:
  111. - uses: actions/checkout@v2
  112. - name: Setup Bundler
  113. run: scripts/setup_bundler.sh
  114. - name: Build and test
  115. 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/'