messaging.yml 7.7 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204
  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@v3
  30. - uses: mikehardy/buildcache-action@c87cea0ccd718971d6cc39e672c4f26815b6c126
  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@v3
  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@v3
  70. - uses: mikehardy/buildcache-action@c87cea0ccd718971d6cc39e672c4f26815b6c126
  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@v3
  86. - uses: mikehardy/buildcache-action@c87cea0ccd718971d6cc39e672c4f26815b6c126
  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@v3
  99. - uses: mikehardy/buildcache-action@c87cea0ccd718971d6cc39e672c4f26815b6c126
  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@v3
  116. - uses: actions/checkout@v3
  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. 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-12
  133. strategy:
  134. matrix:
  135. target: [ios, tvos, macos --skip-tests]
  136. flags: [
  137. '--use-modular-headers'
  138. ]
  139. needs: pod-lib-lint
  140. steps:
  141. - uses: actions/checkout@v3
  142. - uses: ruby/setup-ruby@v1
  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-sample-build-test:
  148. # Don't run on private repo unless it is a PR.
  149. if: (github.repository == 'Firebase/firebase-ios-sdk' && github.event_name == 'schedule') || github.event_name == 'pull_request'
  150. env:
  151. plist_secret: ${{ secrets.GHASecretsGPGPassphrase1 }}
  152. runs-on: macos-12
  153. steps:
  154. - uses: actions/checkout@v3
  155. - uses: mikehardy/buildcache-action@c87cea0ccd718971d6cc39e672c4f26815b6c126
  156. with:
  157. cache_key: ${{ matrix.os }}
  158. - uses: ruby/setup-ruby@v1
  159. - name: Setup Bundler
  160. run: scripts/setup_bundler.sh
  161. - name: Install Secret GoogleService-Info.plist
  162. run: |
  163. scripts/decrypt_gha_secret.sh scripts/gha-encrypted/messaging-sample-plist.gpg \
  164. FirebaseMessaging/Apps/Shared/GoogleService-Info.plist "$plist_secret"
  165. - name: Prereqs
  166. run: scripts/install_prereqs.sh MessagingSample iOS
  167. - name: Build
  168. run: ([ -z $plist_secret ] || scripts/build.sh MessagingSample iOS)
  169. messaging-swiftui-sample-build-test:
  170. # Don't run on private repo unless it is a PR.
  171. if: (github.repository == 'Firebase/firebase-ios-sdk' && github.event_name == 'schedule') || github.event_name == 'pull_request'
  172. env:
  173. plist_secret: ${{ secrets.GHASecretsGPGPassphrase1 }}
  174. runs-on: macos-12
  175. steps:
  176. - uses: actions/checkout@v3
  177. - uses: mikehardy/buildcache-action@c87cea0ccd718971d6cc39e672c4f26815b6c126
  178. with:
  179. cache_key: ${{ matrix.os }}
  180. - uses: ruby/setup-ruby@v1
  181. - name: Setup Bundler
  182. run: scripts/setup_bundler.sh
  183. - name: Install Secret GoogleService-Info.plist
  184. run: |
  185. scripts/decrypt_gha_secret.sh scripts/gha-encrypted/messaging-sample-plist.gpg \
  186. FirebaseMessaging/Apps/Shared/GoogleService-Info.plist "$plist_secret"
  187. - name: Prereqs
  188. run: scripts/install_prereqs.sh SwiftUISample iOS
  189. - name: Build
  190. run: ([ -z $plist_secret ] || scripts/build.sh SwiftUISample iOS)