mlmodeldownloader.yml 4.5 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. 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. strategy:
  60. matrix:
  61. target: [iOS, tvOS, macOS, catalyst, watchOS]
  62. steps:
  63. - uses: actions/checkout@v2
  64. - uses: mikehardy/buildcache-action@50738c6c77de7f34e66b870e4f8ede333b69d077
  65. with:
  66. cache_key: ${{ matrix.os }}
  67. - name: Initialize xcodebuild
  68. run: scripts/setup_spm_tests.sh
  69. - name: Unit Tests
  70. run: scripts/third_party/travis/retry.sh ./scripts/build.sh FirebaseMLModelDownloaderUnit ${{ matrix.target }} spm
  71. catalyst:
  72. if: (github.repository == 'Firebase/firebase-ios-sdk' && github.event_name == 'schedule') || github.event_name == 'pull_request'
  73. runs-on: macos-11
  74. steps:
  75. - uses: actions/checkout@v2
  76. - uses: mikehardy/buildcache-action@50738c6c77de7f34e66b870e4f8ede333b69d077
  77. with:
  78. cache_key: ${{ matrix.os }}
  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-11
  89. steps:
  90. - uses: actions/checkout@v2
  91. - uses: mikehardy/buildcache-action@50738c6c77de7f34e66b870e4f8ede333b69d077
  92. with:
  93. cache_key: ${{ matrix.os }}
  94. - name: Setup Bundler
  95. run: scripts/setup_bundler.sh
  96. - name: Install GoogleService-Info.plist
  97. run: |
  98. mkdir FirebaseMLModelDownloader/Apps/Sample/Resources
  99. scripts/decrypt_gha_secret.sh scripts/gha-encrypted/MLModelDownloader/GoogleService-Info.plist.gpg \
  100. FirebaseMLModelDownloader/Apps/Sample/Resources/GoogleService-Info.plist "$plist_secret"
  101. - name: Prereqs
  102. run: scripts/install_prereqs.sh MLModelDownloaderSample iOS
  103. - name: Build
  104. run: ([ -z $plist_secret ] || scripts/build.sh MLModelDownloaderSample iOS)