messaging.yml 8.1 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211
  1. name: messaging
  2. on:
  3. pull_request:
  4. paths:
  5. # Messaging sources
  6. - 'FirebaseMessaging/**'
  7. # Interop headers
  8. - 'Interop/Analytics/Public/*.h'
  9. # Podspec
  10. - 'FirebaseMessaging.podspec'
  11. # This file
  12. - '.github/workflows/messaging.yml'
  13. # Rebuild on Ruby infrastructure changes
  14. - 'Gemfile*'
  15. schedule:
  16. # Run every day at 10pm (PST) - cron uses UTC times
  17. - cron: '0 6 * * *'
  18. jobs:
  19. messaging:
  20. # Don't run on private repo unless it is a PR.
  21. if: (github.repository == 'Firebase/firebase-ios-sdk' && github.event_name == 'schedule') || github.event_name == 'pull_request'
  22. env:
  23. plist_secret: ${{ secrets.GHASecretsGPGPassphrase1 }}
  24. runs-on: macos-11
  25. steps:
  26. - uses: actions/checkout@v2
  27. - uses: mikehardy/buildcache-action@50738c6c77de7f34e66b870e4f8ede333b69d077
  28. with:
  29. cache_key: ${{ matrix.os }}
  30. - name: Configure test keychain
  31. run: scripts/configure_test_keychain.sh
  32. - name: Setup Bundler
  33. run: scripts/setup_bundler.sh
  34. - name: Install Secret GoogleService-Info.plist
  35. run: |
  36. mkdir FirebaseMessaging/Tests/IntegrationTests/Resources
  37. scripts/decrypt_gha_secret.sh scripts/gha-encrypted/messaging-sample-plist.gpg \
  38. FirebaseMessaging/Tests/IntegrationTests/Resources/GoogleService-Info.plist "$plist_secret"
  39. - name: BuildAndTest # can be replaced with pod lib lint with CocoaPods 1.10
  40. run: ([ -z $plist_secret ] || scripts/third_party/travis/retry.sh scripts/build.sh Messaging all)
  41. pod-lib-lint:
  42. # Don't run on private repo unless it is a PR.
  43. if: (github.repository == 'Firebase/firebase-ios-sdk' && github.event_name == 'schedule') || github.event_name == 'pull_request'
  44. runs-on: macos-11
  45. strategy:
  46. matrix:
  47. target: [ios, tvos, macos --skip-tests] # skipping tests on mac because of keychain access
  48. steps:
  49. - uses: actions/checkout@v2
  50. - name: Setup Bundler
  51. run: scripts/setup_bundler.sh
  52. - name: Build and test
  53. run: scripts/third_party/travis/retry.sh scripts/pod_lib_lint.rb FirebaseMessaging.podspec --platforms=${{ matrix.target }}
  54. spm:
  55. # Don't run on private repo unless it is a PR.
  56. if: (github.repository == 'Firebase/firebase-ios-sdk' && github.event_name == 'schedule') || github.event_name == 'pull_request'
  57. runs-on: macos-11
  58. strategy:
  59. matrix:
  60. target: [iOS, watchOS]
  61. steps:
  62. - uses: actions/checkout@v2
  63. - uses: mikehardy/buildcache-action@50738c6c77de7f34e66b870e4f8ede333b69d077
  64. with:
  65. cache_key: ${{ matrix.os }}
  66. - name: Initialize xcodebuild
  67. run: scripts/setup_spm_tests.sh
  68. - name: Unit Tests
  69. run: scripts/third_party/travis/retry.sh ./scripts/build.sh MessagingUnit ${{ matrix.target }} spm
  70. spm-cron:
  71. # Don't run on private repo.
  72. if: github.event_name == 'schedule' && github.repository == 'Firebase/firebase-ios-sdk'
  73. runs-on: macos-11
  74. strategy:
  75. matrix:
  76. target: [tvOS, macOS, catalyst]
  77. steps:
  78. - uses: actions/checkout@v2
  79. - uses: mikehardy/buildcache-action@50738c6c77de7f34e66b870e4f8ede333b69d077
  80. with:
  81. cache_key: ${{ matrix.os }}
  82. - name: Initialize xcodebuild
  83. run: scripts/setup_spm_tests.sh
  84. - name: Unit Tests
  85. run: scripts/third_party/travis/retry.sh ./scripts/build.sh MessagingUnit ${{ matrix.target }} spm
  86. catalyst:
  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. runs-on: macos-11
  90. steps:
  91. - uses: actions/checkout@v2
  92. - uses: mikehardy/buildcache-action@50738c6c77de7f34e66b870e4f8ede333b69d077
  93. with:
  94. cache_key: ${{ matrix.os }}
  95. - name: Setup Bundler
  96. run: scripts/setup_bundler.sh
  97. - name: Setup project and Build Catalyst
  98. run: scripts/test_catalyst.sh FirebaseMessaging test FirebaseMessaging-Unit-unit
  99. quickstart:
  100. # Don't run on private repo unless it is a PR.
  101. if: (github.repository == 'Firebase/firebase-ios-sdk' && github.event_name == 'schedule') || github.event_name == 'pull_request'
  102. env:
  103. plist_secret: ${{ secrets.GHASecretsGPGPassphrase1 }}
  104. signin_secret: ${{ secrets.GHASecretsGPGPassphrase1 }}
  105. runs-on: macos-11
  106. steps:
  107. - uses: actions/checkout@v2
  108. - name: Setup quickstart
  109. run: scripts/setup_quickstart.sh messaging
  110. - name: Install Secret GoogleService-Info.plist
  111. run: scripts/decrypt_gha_secret.sh scripts/gha-encrypted/qs-messaging.plist.gpg \
  112. quickstart-ios/messaging/GoogleService-Info.plist "$plist_secret"
  113. - name: Test objc quickstart
  114. run: ([ -z $plist_secret ] ||
  115. scripts/third_party/travis/retry.sh scripts/test_quickstart.sh Messaging false)
  116. - name: Test swift quickstart
  117. run: ([ -z $plist_secret ] ||
  118. scripts/third_party/travis/retry.sh scripts/test_quickstart.sh Messaging false swift)
  119. pod-lib-lint-watchos:
  120. # Don't run on private repo unless it is a PR.
  121. if: (github.repository == 'Firebase/firebase-ios-sdk' && github.event_name == 'schedule') || github.event_name == 'pull_request'
  122. runs-on: macos-11
  123. steps:
  124. - uses: actions/checkout@v2
  125. - name: Setup Bundler
  126. run: scripts/setup_bundler.sh
  127. - name: Build and test
  128. run: scripts/third_party/travis/retry.sh scripts/pod_lib_lint.rb FirebaseMessaging.podspec --skip-tests --platforms=watchos
  129. messaging-cron-only:
  130. # Don't run on private repo.
  131. if: github.event_name == 'schedule' && github.repository == 'Firebase/firebase-ios-sdk'
  132. runs-on: macos-11
  133. strategy:
  134. matrix:
  135. target: [ios, tvos, macos --skip-tests]
  136. flags: [
  137. '--use-modular-headers',
  138. '--skip-tests --use-libraries'
  139. ]
  140. needs: pod-lib-lint
  141. steps:
  142. - uses: actions/checkout@v2
  143. - name: Setup Bundler
  144. run: scripts/setup_bundler.sh
  145. - name: PodLibLint Messaging Cron
  146. run: scripts/third_party/travis/retry.sh scripts/pod_lib_lint.rb FirebaseMessaging.podspec --platforms=${{ matrix.target }}
  147. messaging-watchos-cron-only:
  148. # Don't run on private repo.
  149. if: github.event_name == 'schedule' && github.repository == 'Firebase/firebase-ios-sdk'
  150. runs-on: macos-11
  151. strategy:
  152. matrix:
  153. flags: [
  154. '--use-static-frameworks',
  155. '--skip-tests --use-libraries'
  156. ]
  157. needs: pod-lib-lint-watchos
  158. steps:
  159. - uses: actions/checkout@v2
  160. - name: Setup Bundler
  161. run: scripts/setup_bundler.sh
  162. - name: PodLibLint Messaging Cron
  163. run: scripts/third_party/travis/retry.sh scripts/pod_lib_lint.rb FirebaseMessaging.podspec --platforms=watchos
  164. messaging-sample-build-test:
  165. # Don't run on private repo unless it is a PR.
  166. if: (github.repository == 'Firebase/firebase-ios-sdk' && github.event_name == 'schedule') || github.event_name == 'pull_request'
  167. env:
  168. plist_secret: ${{ secrets.GHASecretsGPGPassphrase1 }}
  169. runs-on: macos-11
  170. steps:
  171. - uses: actions/checkout@v2
  172. - uses: mikehardy/buildcache-action@50738c6c77de7f34e66b870e4f8ede333b69d077
  173. with:
  174. cache_key: ${{ matrix.os }}
  175. - name: Setup Bundler
  176. run: scripts/setup_bundler.sh
  177. - name: Install Secret GoogleService-Info.plist
  178. run: |
  179. scripts/decrypt_gha_secret.sh scripts/gha-encrypted/messaging-sample-plist.gpg \
  180. FirebaseMessaging/Apps/Shared/GoogleService-Info.plist "$plist_secret"
  181. - name: Prereqs
  182. run: scripts/install_prereqs.sh MessagingSample iOS
  183. - name: Build
  184. run: ([ -z $plist_secret ] || scripts/build.sh MessagingSample iOS)
  185. podspec-presubmit:
  186. # Don't run on private repo unless it is a PR.
  187. if: github.repository == 'Firebase/firebase-ios-sdk' && github.event.pull_request.merged != true && github.event.action != 'closed'
  188. runs-on: macos-11
  189. steps:
  190. - uses: actions/checkout@v2
  191. - name: Setup Bundler
  192. run: scripts/setup_bundler.sh
  193. - name: Build and test
  194. run: scripts/third_party/travis/retry.sh pod spec lint FirebaseMessaging.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/'