messaging.yml 8.5 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226
  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. '--skip-tests --use-libraries'
  142. ]
  143. needs: pod-lib-lint
  144. steps:
  145. - uses: actions/checkout@v2
  146. - name: Setup Bundler
  147. run: scripts/setup_bundler.sh
  148. - name: PodLibLint Messaging Cron
  149. run: scripts/third_party/travis/retry.sh scripts/pod_lib_lint.rb FirebaseMessaging.podspec --platforms=${{ matrix.target }}
  150. messaging-watchos-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-11
  154. strategy:
  155. matrix:
  156. flags: [
  157. '--use-static-frameworks',
  158. '--skip-tests --use-libraries'
  159. ]
  160. needs: pod-lib-lint-watchos
  161. steps:
  162. - uses: actions/checkout@v2
  163. - name: Setup Bundler
  164. run: scripts/setup_bundler.sh
  165. - name: PodLibLint Messaging Cron
  166. run: scripts/third_party/travis/retry.sh scripts/pod_lib_lint.rb FirebaseMessaging.podspec --platforms=watchos
  167. messaging-sample-build-test:
  168. # Don't run on private repo unless it is a PR.
  169. if: (github.repository == 'Firebase/firebase-ios-sdk' && github.event_name == 'schedule') || github.event_name == 'pull_request'
  170. env:
  171. plist_secret: ${{ secrets.GHASecretsGPGPassphrase1 }}
  172. runs-on: macos-11
  173. steps:
  174. - uses: actions/checkout@v2
  175. - uses: mikehardy/buildcache-action@50738c6c77de7f34e66b870e4f8ede333b69d077
  176. with:
  177. cache_key: ${{ matrix.os }}
  178. - name: Setup Bundler
  179. run: scripts/setup_bundler.sh
  180. - name: Install Secret GoogleService-Info.plist
  181. run: |
  182. scripts/decrypt_gha_secret.sh scripts/gha-encrypted/messaging-sample-plist.gpg \
  183. FirebaseMessaging/Apps/Shared/GoogleService-Info.plist "$plist_secret"
  184. - name: Prereqs
  185. run: scripts/install_prereqs.sh MessagingSample iOS
  186. - name: Build
  187. run: ([ -z $plist_secret ] || scripts/build.sh MessagingSample iOS)
  188. messaging-swiftui-sample-build-test:
  189. # Don't run on private repo unless it is a PR.
  190. if: (github.repository == 'Firebase/firebase-ios-sdk' && github.event_name == 'schedule') || github.event_name == 'pull_request'
  191. env:
  192. plist_secret: ${{ secrets.GHASecretsGPGPassphrase1 }}
  193. runs-on: macos-11
  194. steps:
  195. - uses: actions/checkout@v2
  196. - uses: mikehardy/buildcache-action@50738c6c77de7f34e66b870e4f8ede333b69d077
  197. with:
  198. cache_key: ${{ matrix.os }}
  199. - name: Setup Bundler
  200. run: scripts/setup_bundler.sh
  201. - name: Install Secret GoogleService-Info.plist
  202. run: |
  203. scripts/decrypt_gha_secret.sh scripts/gha-encrypted/messaging-sample-plist.gpg \
  204. FirebaseMessaging/Apps/Shared/GoogleService-Info.plist "$plist_secret"
  205. - name: Prereqs
  206. run: scripts/install_prereqs.sh SwiftUISample iOS
  207. - name: Build
  208. run: ([ -z $plist_secret ] || scripts/build.sh SwiftUISample iOS)