messaging.yml 8.5 KB

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