messaging.yml 8.8 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236
  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. concurrency:
  19. group: ${{ github.workflow }}-${{ github.head_ref || github.ref }}
  20. cancel-in-progress: true
  21. jobs:
  22. messaging:
  23. # Don't run on private repo unless it is a PR.
  24. if: (github.repository == 'Firebase/firebase-ios-sdk' && github.event_name == 'schedule') || github.event_name == 'pull_request'
  25. env:
  26. plist_secret: ${{ secrets.GHASecretsGPGPassphrase1 }}
  27. runs-on: macos-12
  28. steps:
  29. - uses: actions/checkout@v2
  30. - uses: mikehardy/buildcache-action@50738c6c77de7f34e66b870e4f8ede333b69d077
  31. with:
  32. cache_key: ${{ matrix.os }}
  33. - name: Configure test keychain
  34. run: scripts/configure_test_keychain.sh
  35. - uses: ruby/setup-ruby@v1
  36. - name: Setup Bundler
  37. run: scripts/setup_bundler.sh
  38. - name: Install xcpretty
  39. run: gem install xcpretty
  40. - name: Install Secret GoogleService-Info.plist
  41. run: |
  42. mkdir FirebaseMessaging/Tests/IntegrationTests/Resources
  43. scripts/decrypt_gha_secret.sh scripts/gha-encrypted/messaging-sample-plist.gpg \
  44. FirebaseMessaging/Tests/IntegrationTests/Resources/GoogleService-Info.plist "$plist_secret"
  45. - name: BuildAndTest # can be replaced with pod lib lint with CocoaPods 1.10
  46. run: ([ -z $plist_secret ] || scripts/third_party/travis/retry.sh scripts/build.sh Messaging all)
  47. pod-lib-lint:
  48. # Don't run on private repo unless it is a PR.
  49. if: (github.repository == 'Firebase/firebase-ios-sdk' && github.event_name == 'schedule') || github.event_name == 'pull_request'
  50. runs-on: macos-12
  51. strategy:
  52. matrix:
  53. target: [ios, tvos, macos --skip-tests] # skipping tests on mac because of keychain access
  54. steps:
  55. - uses: actions/checkout@v2
  56. - uses: ruby/setup-ruby@v1
  57. - name: Setup Bundler
  58. run: scripts/setup_bundler.sh
  59. - name: Build and test
  60. run: scripts/third_party/travis/retry.sh scripts/pod_lib_lint.rb FirebaseMessaging.podspec --platforms=${{ matrix.target }}
  61. spm:
  62. # Don't run on private repo unless it is a PR.
  63. if: (github.repository == 'Firebase/firebase-ios-sdk' && github.event_name == 'schedule') || github.event_name == 'pull_request'
  64. runs-on: macos-12
  65. strategy:
  66. matrix:
  67. target: [iOS, watchOS]
  68. steps:
  69. - uses: actions/checkout@v2
  70. - uses: mikehardy/buildcache-action@50738c6c77de7f34e66b870e4f8ede333b69d077
  71. with:
  72. cache_key: ${{ matrix.os }}
  73. - name: Initialize xcodebuild
  74. run: scripts/setup_spm_tests.sh
  75. - name: Unit Tests
  76. run: scripts/third_party/travis/retry.sh ./scripts/build.sh MessagingUnit ${{ matrix.target }} spm
  77. spm-cron:
  78. # Don't run on private repo.
  79. if: github.event_name == 'schedule' && github.repository == 'Firebase/firebase-ios-sdk'
  80. runs-on: macos-12
  81. strategy:
  82. matrix:
  83. target: [tvOS, macOS, catalyst]
  84. steps:
  85. - uses: actions/checkout@v2
  86. - uses: mikehardy/buildcache-action@50738c6c77de7f34e66b870e4f8ede333b69d077
  87. with:
  88. cache_key: ${{ matrix.os }}
  89. - name: Initialize xcodebuild
  90. run: scripts/setup_spm_tests.sh
  91. - name: Unit Tests
  92. run: scripts/third_party/travis/retry.sh ./scripts/build.sh MessagingUnit ${{ matrix.target }} spm
  93. catalyst:
  94. # Don't run on private repo unless it is a PR.
  95. if: (github.repository == 'Firebase/firebase-ios-sdk' && github.event_name == 'schedule') || github.event_name == 'pull_request'
  96. runs-on: macos-12
  97. steps:
  98. - uses: actions/checkout@v2
  99. - uses: mikehardy/buildcache-action@50738c6c77de7f34e66b870e4f8ede333b69d077
  100. with:
  101. cache_key: ${{ matrix.os }}
  102. - uses: ruby/setup-ruby@v1
  103. - name: Setup Bundler
  104. run: scripts/setup_bundler.sh
  105. - name: Setup project and Build Catalyst
  106. run: scripts/test_catalyst.sh FirebaseMessaging test FirebaseMessaging-Unit-unit
  107. quickstart:
  108. # Don't run on private repo unless it is a PR.
  109. if: (github.repository == 'Firebase/firebase-ios-sdk' && github.event_name == 'schedule') || github.event_name == 'pull_request'
  110. env:
  111. plist_secret: ${{ secrets.GHASecretsGPGPassphrase1 }}
  112. signin_secret: ${{ secrets.GHASecretsGPGPassphrase1 }}
  113. runs-on: macos-12
  114. steps:
  115. - uses: actions/checkout@v2
  116. - uses: actions/checkout@v2
  117. - uses: ruby/setup-ruby@v1
  118. - name: Setup quickstart
  119. run: scripts/setup_quickstart.sh messaging
  120. - name: Install Secret GoogleService-Info.plist
  121. run: scripts/decrypt_gha_secret.sh scripts/gha-encrypted/qs-messaging.plist.gpg \
  122. quickstart-ios/messaging/GoogleService-Info.plist "$plist_secret"
  123. - name: Test objc quickstart
  124. run: ([ -z $plist_secret ] ||
  125. scripts/third_party/travis/retry.sh scripts/test_quickstart.sh Messaging false)
  126. - name: Test swift quickstart
  127. run: ([ -z $plist_secret ] ||
  128. scripts/third_party/travis/retry.sh scripts/test_quickstart.sh Messaging false swift)
  129. pod-lib-lint-watchos:
  130. # Don't run on private repo unless it is a PR.
  131. if: (github.repository == 'Firebase/firebase-ios-sdk' && github.event_name == 'schedule') || github.event_name == 'pull_request'
  132. runs-on: macos-12
  133. steps:
  134. - uses: actions/checkout@v2
  135. - uses: ruby/setup-ruby@v1
  136. - name: Setup Bundler
  137. run: scripts/setup_bundler.sh
  138. - name: Build and test
  139. run: scripts/third_party/travis/retry.sh scripts/pod_lib_lint.rb FirebaseMessaging.podspec --skip-tests --platforms=watchos
  140. messaging-cron-only:
  141. # Don't run on private repo.
  142. if: github.event_name == 'schedule' && github.repository == 'Firebase/firebase-ios-sdk'
  143. runs-on: macos-12
  144. strategy:
  145. matrix:
  146. target: [ios, tvos, macos --skip-tests]
  147. flags: [
  148. '--use-modular-headers'
  149. ]
  150. needs: pod-lib-lint
  151. steps:
  152. - uses: actions/checkout@v2
  153. - uses: ruby/setup-ruby@v1
  154. - name: Setup Bundler
  155. run: scripts/setup_bundler.sh
  156. - name: PodLibLint Messaging Cron
  157. run: scripts/third_party/travis/retry.sh scripts/pod_lib_lint.rb FirebaseMessaging.podspec --platforms=${{ matrix.target }}
  158. messaging-watchos-cron-only:
  159. # Don't run on private repo.
  160. if: github.event_name == 'schedule' && github.repository == 'Firebase/firebase-ios-sdk'
  161. runs-on: macos-12
  162. strategy:
  163. matrix:
  164. flags: [
  165. '--use-static-frameworks'
  166. ]
  167. needs: pod-lib-lint-watchos
  168. steps:
  169. - uses: actions/checkout@v2
  170. - uses: ruby/setup-ruby@v1
  171. - name: Setup Bundler
  172. run: scripts/setup_bundler.sh
  173. - name: PodLibLint Messaging Cron
  174. run: scripts/third_party/travis/retry.sh scripts/pod_lib_lint.rb FirebaseMessaging.podspec --platforms=watchos
  175. messaging-sample-build-test:
  176. # Don't run on private repo unless it is a PR.
  177. if: (github.repository == 'Firebase/firebase-ios-sdk' && github.event_name == 'schedule') || github.event_name == 'pull_request'
  178. env:
  179. plist_secret: ${{ secrets.GHASecretsGPGPassphrase1 }}
  180. runs-on: macos-12
  181. steps:
  182. - uses: actions/checkout@v2
  183. - uses: mikehardy/buildcache-action@50738c6c77de7f34e66b870e4f8ede333b69d077
  184. with:
  185. cache_key: ${{ matrix.os }}
  186. - uses: ruby/setup-ruby@v1
  187. - name: Setup Bundler
  188. run: scripts/setup_bundler.sh
  189. - name: Install Secret GoogleService-Info.plist
  190. run: |
  191. scripts/decrypt_gha_secret.sh scripts/gha-encrypted/messaging-sample-plist.gpg \
  192. FirebaseMessaging/Apps/Shared/GoogleService-Info.plist "$plist_secret"
  193. - name: Prereqs
  194. run: scripts/install_prereqs.sh MessagingSample iOS
  195. - name: Build
  196. run: ([ -z $plist_secret ] || scripts/build.sh MessagingSample iOS)
  197. messaging-swiftui-sample-build-test:
  198. # Don't run on private repo unless it is a PR.
  199. if: (github.repository == 'Firebase/firebase-ios-sdk' && github.event_name == 'schedule') || github.event_name == 'pull_request'
  200. env:
  201. plist_secret: ${{ secrets.GHASecretsGPGPassphrase1 }}
  202. runs-on: macos-12
  203. steps:
  204. - uses: actions/checkout@v2
  205. - uses: mikehardy/buildcache-action@50738c6c77de7f34e66b870e4f8ede333b69d077
  206. with:
  207. cache_key: ${{ matrix.os }}
  208. - uses: ruby/setup-ruby@v1
  209. - name: Setup Bundler
  210. run: scripts/setup_bundler.sh
  211. - name: Install Secret GoogleService-Info.plist
  212. run: |
  213. scripts/decrypt_gha_secret.sh scripts/gha-encrypted/messaging-sample-plist.gpg \
  214. FirebaseMessaging/Apps/Shared/GoogleService-Info.plist "$plist_secret"
  215. - name: Prereqs
  216. run: scripts/install_prereqs.sh SwiftUISample iOS
  217. - name: Build
  218. run: ([ -z $plist_secret ] || scripts/build.sh SwiftUISample iOS)