mlmodeldownloader.yml 4.6 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114
  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. concurrency:
  12. group: ${{ github.workflow }}-${{ github.head_ref || github.ref }}
  13. cancel-in-progress: true
  14. jobs:
  15. pod-lib-lint:
  16. if: (github.repository == 'Firebase/firebase-ios-sdk' && github.event_name == 'schedule') || github.event_name == 'pull_request'
  17. runs-on: macos-11
  18. env:
  19. plist_secret: ${{ secrets.GHASecretsGPGPassphrase1 }}
  20. strategy:
  21. matrix:
  22. target: [ios, tvos, macos]
  23. steps:
  24. - uses: actions/checkout@v2
  25. - name: Setup Bundler
  26. run: scripts/setup_bundler.sh
  27. - name: Configure test keychain
  28. run: scripts/configure_test_keychain.sh
  29. - name: Install GoogleService-Info.plist
  30. run: |
  31. mkdir FirebaseMLModelDownloader/Tests/Integration/Resources
  32. scripts/decrypt_gha_secret.sh scripts/gha-encrypted/MLModelDownloader/GoogleService-Info.plist.gpg \
  33. FirebaseMLModelDownloader/Tests/Integration/Resources/GoogleService-Info.plist "$plist_secret"
  34. - name: Build and test
  35. # TODO: Disable verbose logging after flaky test investigation.
  36. run: ([ -z $plist_secret ] || scripts/third_party/travis/retry.sh scripts/pod_lib_lint.rb FirebaseMLModelDownloader.podspec --verbose --platforms=${{ matrix.target }})
  37. mlmodeldownloader-cron-only:
  38. if: github.event_name == 'schedule' && github.repository == 'Firebase/firebase-ios-sdk'
  39. runs-on: macos-11
  40. env:
  41. plist_secret: ${{ secrets.GHASecretsGPGPassphrase1 }}
  42. strategy:
  43. matrix:
  44. target: [ios, tvos, macos]
  45. needs: pod-lib-lint
  46. steps:
  47. - uses: actions/checkout@v2
  48. - name: Setup Bundler
  49. run: scripts/setup_bundler.sh
  50. - name: Configure test keychain
  51. run: scripts/configure_test_keychain.sh
  52. - name: Install GoogleService-Info.plist
  53. run: |
  54. mkdir FirebaseMLModelDownloader/Tests/Integration/Resources
  55. scripts/decrypt_gha_secret.sh scripts/gha-encrypted/MLModelDownloader/GoogleService-Info.plist.gpg \
  56. FirebaseMLModelDownloader/Tests/Integration/Resources/GoogleService-Info.plist "$plist_secret"
  57. - name: PodLibLint MLModelDownloader Cron
  58. run: scripts/third_party/travis/retry.sh scripts/pod_lib_lint.rb FirebaseMLModelDownloader.podspec --platforms=${{ matrix.target }} --use-static-frameworks
  59. spm:
  60. if: (github.repository == 'Firebase/firebase-ios-sdk' && github.event_name == 'schedule') || github.event_name == 'pull_request'
  61. runs-on: macos-11
  62. strategy:
  63. matrix:
  64. target: [iOS, tvOS, macOS, catalyst, watchOS]
  65. steps:
  66. - uses: actions/checkout@v2
  67. - uses: mikehardy/buildcache-action@50738c6c77de7f34e66b870e4f8ede333b69d077
  68. with:
  69. cache_key: ${{ matrix.os }}
  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-11
  77. steps:
  78. - uses: actions/checkout@v2
  79. - uses: mikehardy/buildcache-action@50738c6c77de7f34e66b870e4f8ede333b69d077
  80. with:
  81. cache_key: ${{ matrix.os }}
  82. - name: Setup Bundler
  83. run: scripts/setup_bundler.sh
  84. - name: Setup project and Build Catalyst
  85. run: scripts/test_catalyst.sh FirebaseMLModelDownloader test FirebaseMLModelDownloader-Unit-unit
  86. mlmodeldownloader-sample-build-test:
  87. # Don't run on private repo unless it is a PR.
  88. if: github.repository == 'Firebase/firebase-ios-sdk' && (github.event_name == 'schedule' || github.event_name == 'pull_request')
  89. env:
  90. plist_secret: ${{ secrets.GHASecretsGPGPassphrase1 }}
  91. runs-on: macos-11
  92. steps:
  93. - uses: actions/checkout@v2
  94. - uses: mikehardy/buildcache-action@50738c6c77de7f34e66b870e4f8ede333b69d077
  95. with:
  96. cache_key: ${{ matrix.os }}
  97. - name: Setup Bundler
  98. run: scripts/setup_bundler.sh
  99. - name: Install GoogleService-Info.plist
  100. run: |
  101. mkdir FirebaseMLModelDownloader/Apps/Sample/Resources
  102. scripts/decrypt_gha_secret.sh scripts/gha-encrypted/MLModelDownloader/GoogleService-Info.plist.gpg \
  103. FirebaseMLModelDownloader/Apps/Sample/Resources/GoogleService-Info.plist "$plist_secret"
  104. - name: Prereqs
  105. run: scripts/install_prereqs.sh MLModelDownloaderSample iOS
  106. - name: Build
  107. run: ([ -z $plist_secret ] || scripts/build.sh MLModelDownloaderSample iOS)