mlmodeldownloader.yml 5.7 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135
  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. - uses: mikehardy/buildcache-action@50738c6c77de7f34e66b870e4f8ede333b69d077
  62. with:
  63. cache_key: ${{ matrix.os }}
  64. - name: Initialize xcodebuild
  65. run: scripts/setup_spm_tests.sh
  66. - name: iOS Unit Tests
  67. run: scripts/third_party/travis/retry.sh ./scripts/build.sh FirebaseMLModelDownloaderUnit iOS spm
  68. spm-cron:
  69. # Don't run on private repo.
  70. if: github.event_name == 'schedule' && github.repository == 'Firebase/firebase-ios-sdk'
  71. runs-on: macos-11
  72. strategy:
  73. matrix:
  74. target: [tvOS, macOS, catalyst]
  75. steps:
  76. - uses: actions/checkout@v2
  77. - uses: mikehardy/buildcache-action@50738c6c77de7f34e66b870e4f8ede333b69d077
  78. with:
  79. cache_key: ${{ matrix.os }}
  80. - name: Initialize xcodebuild
  81. run: scripts/setup_spm_tests.sh
  82. - name: Unit Tests
  83. run: scripts/third_party/travis/retry.sh ./scripts/build.sh FirebaseMLModelDownloaderUnit ${{ matrix.target }} spm
  84. catalyst:
  85. if: (github.repository == 'Firebase/firebase-ios-sdk' && github.event_name == 'schedule') || github.event_name == 'pull_request'
  86. runs-on: macos-11
  87. steps:
  88. - uses: actions/checkout@v2
  89. - uses: mikehardy/buildcache-action@50738c6c77de7f34e66b870e4f8ede333b69d077
  90. with:
  91. cache_key: ${{ matrix.os }}
  92. - name: Setup Bundler
  93. run: scripts/setup_bundler.sh
  94. - name: Setup project and Build Catalyst
  95. run: scripts/test_catalyst.sh FirebaseMLModelDownloader test FirebaseMLModelDownloader-Unit-unit
  96. mlmodeldownloader-sample-build-test:
  97. # Don't run on private repo unless it is a PR.
  98. if: github.repository == 'Firebase/firebase-ios-sdk' && (github.event_name == 'schedule' || github.event_name == 'pull_request')
  99. env:
  100. plist_secret: ${{ secrets.GHASecretsGPGPassphrase1 }}
  101. runs-on: macos-11
  102. steps:
  103. - uses: actions/checkout@v2
  104. - uses: mikehardy/buildcache-action@50738c6c77de7f34e66b870e4f8ede333b69d077
  105. with:
  106. cache_key: ${{ matrix.os }}
  107. - name: Setup Bundler
  108. run: scripts/setup_bundler.sh
  109. - name: Install GoogleService-Info.plist
  110. run: |
  111. mkdir FirebaseMLModelDownloader/Apps/Sample/Resources
  112. scripts/decrypt_gha_secret.sh scripts/gha-encrypted/MLModelDownloader/GoogleService-Info.plist.gpg \
  113. FirebaseMLModelDownloader/Apps/Sample/Resources/GoogleService-Info.plist "$plist_secret"
  114. - name: Prereqs
  115. run: scripts/install_prereqs.sh MLModelDownloaderSample iOS
  116. - name: Build
  117. run: ([ -z $plist_secret ] || scripts/build.sh MLModelDownloaderSample iOS)
  118. podspec-presubmit:
  119. # Don't run on private repo unless it is a PR.
  120. if: github.repository == 'Firebase/firebase-ios-sdk' && github.event.pull_request.merged != true && github.event.action != 'closed'
  121. runs-on: macos-11
  122. steps:
  123. - uses: actions/checkout@v2
  124. - name: Setup Bundler
  125. run: scripts/setup_bundler.sh
  126. - name: Build and test
  127. 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/'