messaging.yml 7.7 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199
  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. jobs:
  19. messaging:
  20. # Don't run on private repo unless it is a PR.
  21. if: (github.repository == 'Firebase/firebase-ios-sdk' && github.event_name == 'schedule') || github.event_name == 'pull_request'
  22. env:
  23. plist_secret: ${{ secrets.GHASecretsGPGPassphrase1 }}
  24. runs-on: macos-latest
  25. steps:
  26. - uses: actions/checkout@v2
  27. - name: Configure test keychain
  28. run: scripts/configure_test_keychain.sh
  29. - name: Setup Bundler
  30. run: scripts/setup_bundler.sh
  31. - name: Install Secret GoogleService-Info.plist
  32. run: |
  33. mkdir FirebaseMessaging/Tests/IntegrationTests/Resources
  34. scripts/decrypt_gha_secret.sh scripts/gha-encrypted/messaging-sample-plist.gpg \
  35. FirebaseMessaging/Tests/IntegrationTests/Resources/GoogleService-Info.plist "$plist_secret"
  36. - name: BuildAndTest # can be replaced with pod lib lint with CocoaPods 1.10
  37. run: ([ -z $plist_secret ] || scripts/third_party/travis/retry.sh scripts/build.sh Messaging all)
  38. pod-lib-lint:
  39. # Don't run on private repo unless it is a PR.
  40. if: (github.repository == 'Firebase/firebase-ios-sdk' && github.event_name == 'schedule') || github.event_name == 'pull_request'
  41. runs-on: macOS-latest
  42. strategy:
  43. matrix:
  44. target: [ios, tvos, macos --skip-tests] # skipping tests on mac because of keychain access
  45. steps:
  46. - uses: actions/checkout@v2
  47. - name: Setup Bundler
  48. run: scripts/setup_bundler.sh
  49. - name: Build and test
  50. run: scripts/third_party/travis/retry.sh scripts/pod_lib_lint.rb FirebaseMessaging.podspec --platforms=${{ matrix.target }}
  51. spm:
  52. # Don't run on private repo unless it is a PR.
  53. if: (github.repository == 'Firebase/firebase-ios-sdk' && github.event_name == 'schedule') || github.event_name == 'pull_request'
  54. runs-on: macOS-latest
  55. strategy:
  56. matrix:
  57. target: [iOS, watchOS]
  58. steps:
  59. - uses: actions/checkout@v2
  60. - name: Initialize xcodebuild
  61. run: scripts/setup_spm_tests.sh
  62. - name: Unit Tests
  63. run: scripts/third_party/travis/retry.sh ./scripts/build.sh MessagingUnit ${{ matrix.target }} spm
  64. spm-cron:
  65. # Don't run on private repo.
  66. if: github.event_name == 'schedule' && github.repository == 'Firebase/firebase-ios-sdk'
  67. runs-on: macOS-latest
  68. strategy:
  69. matrix:
  70. target: [tvOS, macOS, catalyst]
  71. steps:
  72. - uses: actions/checkout@v2
  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. catalyst:
  78. # Don't run on private repo unless it is a PR.
  79. if: (github.repository == 'Firebase/firebase-ios-sdk' && github.event_name == 'schedule') || github.event_name == 'pull_request'
  80. runs-on: macOS-latest
  81. steps:
  82. - uses: actions/checkout@v2
  83. - name: Setup Bundler
  84. run: scripts/setup_bundler.sh
  85. - name: Setup project and Build Catalyst
  86. run: scripts/test_catalyst.sh FirebaseMessaging test FirebaseMessaging-Unit-unit
  87. quickstart:
  88. # Don't run on private repo unless it is a PR.
  89. if: (github.repository == 'Firebase/firebase-ios-sdk' && github.event_name == 'schedule') || github.event_name == 'pull_request'
  90. env:
  91. plist_secret: ${{ secrets.GHASecretsGPGPassphrase1 }}
  92. signin_secret: ${{ secrets.GHASecretsGPGPassphrase1 }}
  93. runs-on: macOS-latest
  94. steps:
  95. - uses: actions/checkout@v2
  96. - name: Setup quickstart
  97. run: scripts/setup_quickstart.sh messaging
  98. - name: Install Secret GoogleService-Info.plist
  99. run: scripts/decrypt_gha_secret.sh scripts/gha-encrypted/qs-messaging.plist.gpg \
  100. quickstart-ios/messaging/GoogleService-Info.plist "$plist_secret"
  101. - name: Install Secret FIREGSignInInfo.h
  102. run: scripts/decrypt_gha_secret.sh scripts/gha-encrypted/FIREGSignInInfo.h.gpg \
  103. quickstart-ios/TestUtils/FIREGSignInInfo.h "$signin_secret"
  104. - name: Test objc quickstart
  105. run: ([ -z $plist_secret ] ||
  106. scripts/third_party/travis/retry.sh scripts/test_quickstart.sh Messaging)
  107. - name: Test swift quickstart
  108. run: ([ -z $plist_secret ] ||
  109. scripts/third_party/travis/retry.sh scripts/test_quickstart.sh Messaging swift)
  110. pod-lib-lint-watchos:
  111. # Don't run on private repo unless it is a PR.
  112. if: (github.repository == 'Firebase/firebase-ios-sdk' && github.event_name == 'schedule') || github.event_name == 'pull_request'
  113. runs-on: macOS-latest
  114. steps:
  115. - uses: actions/checkout@v2
  116. - name: Setup Bundler
  117. run: scripts/setup_bundler.sh
  118. - name: Build and test
  119. run: scripts/third_party/travis/retry.sh scripts/pod_lib_lint.rb FirebaseMessaging.podspec --skip-tests --platforms=watchos
  120. messaging-cron-only:
  121. # Don't run on private repo.
  122. if: github.event_name == 'schedule' && github.repository == 'Firebase/firebase-ios-sdk'
  123. runs-on: macos-latest
  124. strategy:
  125. matrix:
  126. target: [ios, tvos, macos --skip-tests]
  127. flags: [
  128. '--use-modular-headers',
  129. '--skip-tests --use-libraries'
  130. ]
  131. needs: pod-lib-lint
  132. steps:
  133. - uses: actions/checkout@v2
  134. - name: Setup Bundler
  135. run: scripts/setup_bundler.sh
  136. - name: PodLibLint Messaging Cron
  137. run: scripts/third_party/travis/retry.sh scripts/pod_lib_lint.rb FirebaseMessaging.podspec --platforms=${{ matrix.target }}
  138. messaging-watchos-cron-only:
  139. # Don't run on private repo.
  140. if: github.event_name == 'schedule' && github.repository == 'Firebase/firebase-ios-sdk'
  141. runs-on: macos-latest
  142. strategy:
  143. matrix:
  144. flags: [
  145. '--use-static-frameworks',
  146. '--skip-tests --use-libraries'
  147. ]
  148. needs: pod-lib-lint-watchos
  149. steps:
  150. - uses: actions/checkout@v2
  151. - name: Setup Bundler
  152. run: scripts/setup_bundler.sh
  153. - name: PodLibLint Messaging Cron
  154. run: scripts/third_party/travis/retry.sh scripts/pod_lib_lint.rb FirebaseMessaging.podspec --platforms=watchos
  155. messaging-sample-build-test:
  156. # Don't run on private repo unless it is a PR.
  157. if: (github.repository == 'Firebase/firebase-ios-sdk' && github.event_name == 'schedule') || github.event_name == 'pull_request'
  158. env:
  159. plist_secret: ${{ secrets.GHASecretsGPGPassphrase1 }}
  160. runs-on: macos-latest
  161. steps:
  162. - uses: actions/checkout@v2
  163. - name: Setup Bundler
  164. run: scripts/setup_bundler.sh
  165. - name: Install Secret GoogleService-Info.plist
  166. run: |
  167. scripts/decrypt_gha_secret.sh scripts/gha-encrypted/messaging-sample-plist.gpg \
  168. FirebaseMessaging/Apps/Shared/GoogleService-Info.plist "$plist_secret"
  169. - name: Prereqs
  170. run: scripts/install_prereqs.sh MessagingSample iOS
  171. - name: Build
  172. run: ([ -z $plist_secret ] || scripts/build.sh MessagingSample iOS)
  173. podspec-presubmit:
  174. # Don't run on private repo unless it is a PR.
  175. if: github.repository == 'Firebase/firebase-ios-sdk' && github.event.pull_request.merged != true && github.event.action != 'closed'
  176. runs-on: macOS-latest
  177. steps:
  178. - uses: actions/checkout@v2
  179. - name: Setup Bundler
  180. run: scripts/setup_bundler.sh
  181. - name: Build and test
  182. run: scripts/third_party/travis/retry.sh pod spec lint FirebaseMessaging.podspec --skip-tests --sources='https://github.com/firebase/SpecsTesting','https://github.com/firebase/SpecsDev.git','https://github.com/firebase/SpecsStaging.git','https://cdn.cocoapods.org/'