messaging.yml 7.5 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196
  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-11
  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-11
  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-11
  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-11
  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-11
  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-11
  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: Test objc quickstart
  102. run: ([ -z $plist_secret ] ||
  103. scripts/third_party/travis/retry.sh scripts/test_quickstart.sh Messaging false)
  104. - name: Test swift quickstart
  105. run: ([ -z $plist_secret ] ||
  106. scripts/third_party/travis/retry.sh scripts/test_quickstart.sh Messaging false swift)
  107. pod-lib-lint-watchos:
  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. runs-on: macos-11
  111. steps:
  112. - uses: actions/checkout@v2
  113. - name: Setup Bundler
  114. run: scripts/setup_bundler.sh
  115. - name: Build and test
  116. run: scripts/third_party/travis/retry.sh scripts/pod_lib_lint.rb FirebaseMessaging.podspec --skip-tests --platforms=watchos
  117. messaging-cron-only:
  118. # Don't run on private repo.
  119. if: github.event_name == 'schedule' && github.repository == 'Firebase/firebase-ios-sdk'
  120. runs-on: macos-11
  121. strategy:
  122. matrix:
  123. target: [ios, tvos, macos --skip-tests]
  124. flags: [
  125. '--use-modular-headers',
  126. '--skip-tests --use-libraries'
  127. ]
  128. needs: pod-lib-lint
  129. steps:
  130. - uses: actions/checkout@v2
  131. - name: Setup Bundler
  132. run: scripts/setup_bundler.sh
  133. - name: PodLibLint Messaging Cron
  134. run: scripts/third_party/travis/retry.sh scripts/pod_lib_lint.rb FirebaseMessaging.podspec --platforms=${{ matrix.target }}
  135. messaging-watchos-cron-only:
  136. # Don't run on private repo.
  137. if: github.event_name == 'schedule' && github.repository == 'Firebase/firebase-ios-sdk'
  138. runs-on: macos-11
  139. strategy:
  140. matrix:
  141. flags: [
  142. '--use-static-frameworks',
  143. '--skip-tests --use-libraries'
  144. ]
  145. needs: pod-lib-lint-watchos
  146. steps:
  147. - uses: actions/checkout@v2
  148. - name: Setup Bundler
  149. run: scripts/setup_bundler.sh
  150. - name: PodLibLint Messaging Cron
  151. run: scripts/third_party/travis/retry.sh scripts/pod_lib_lint.rb FirebaseMessaging.podspec --platforms=watchos
  152. messaging-sample-build-test:
  153. # Don't run on private repo unless it is a PR.
  154. if: (github.repository == 'Firebase/firebase-ios-sdk' && github.event_name == 'schedule') || github.event_name == 'pull_request'
  155. env:
  156. plist_secret: ${{ secrets.GHASecretsGPGPassphrase1 }}
  157. runs-on: macos-11
  158. steps:
  159. - uses: actions/checkout@v2
  160. - name: Setup Bundler
  161. run: scripts/setup_bundler.sh
  162. - name: Install Secret GoogleService-Info.plist
  163. run: |
  164. scripts/decrypt_gha_secret.sh scripts/gha-encrypted/messaging-sample-plist.gpg \
  165. FirebaseMessaging/Apps/Shared/GoogleService-Info.plist "$plist_secret"
  166. - name: Prereqs
  167. run: scripts/install_prereqs.sh MessagingSample iOS
  168. - name: Build
  169. run: ([ -z $plist_secret ] || scripts/build.sh MessagingSample iOS)
  170. podspec-presubmit:
  171. # Don't run on private repo unless it is a PR.
  172. if: github.repository == 'Firebase/firebase-ios-sdk' && github.event.pull_request.merged != true && github.event.action != 'closed'
  173. runs-on: macos-11
  174. steps:
  175. - uses: actions/checkout@v2
  176. - name: Setup Bundler
  177. run: scripts/setup_bundler.sh
  178. - name: Build and test
  179. 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/'