messaging.yml 9.5 KB

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