messaging.yml 7.2 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190
  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: Setup Bundler
  28. run: scripts/setup_bundler.sh
  29. - name: Install Secret GoogleService-Info.plist
  30. run: |
  31. mkdir FirebaseMessaging/Tests/IntegrationTests/Resources
  32. scripts/decrypt_gha_secret.sh scripts/gha-encrypted/messaging-sample-plist.gpg \
  33. FirebaseMessaging/Tests/IntegrationTests/Resources/GoogleService-Info.plist "$plist_secret"
  34. - name: BuildAndTest # can be replaced with pod lib lint with CocoaPods 1.10
  35. run: ([ -z $plist_secret ] || scripts/third_party/travis/retry.sh scripts/build.sh Messaging all)
  36. pod-lib-lint:
  37. # Don't run on private repo unless it is a PR.
  38. if: (github.repository == 'Firebase/firebase-ios-sdk' && github.event_name == 'schedule') || github.event_name == 'pull_request'
  39. runs-on: macOS-latest
  40. strategy:
  41. matrix:
  42. target: [ios, tvos, macos --skip-tests] # skipping tests on mac because of keychain access
  43. steps:
  44. - uses: actions/checkout@v2
  45. - name: Setup Bundler
  46. run: scripts/setup_bundler.sh
  47. - name: Build and test
  48. run: scripts/third_party/travis/retry.sh scripts/pod_lib_lint.rb FirebaseMessaging.podspec --platforms=${{ matrix.target }}
  49. spm:
  50. # Don't run on private repo unless it is a PR.
  51. if: (github.repository == 'Firebase/firebase-ios-sdk' && github.event_name == 'schedule') || github.event_name == 'pull_request'
  52. runs-on: macOS-latest
  53. strategy:
  54. matrix:
  55. target: [iOS, watchOS]
  56. steps:
  57. - uses: actions/checkout@v2
  58. - name: Xcode 12
  59. run: sudo xcode-select -s /Applications/Xcode_12.app/Contents/Developer
  60. - name: Initialize xcodebuild
  61. run: xcodebuild -list
  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: Xcode 12
  74. run: sudo xcode-select -s /Applications/Xcode_12.app/Contents/Developer
  75. - name: Initialize xcodebuild
  76. run: xcodebuild -list
  77. - name: Unit Tests
  78. run: scripts/third_party/travis/retry.sh ./scripts/build.sh MessagingUnit ${{ matrix.target }} spm
  79. catalyst:
  80. # Don't run on private repo unless it is a PR.
  81. if: (github.repository == 'Firebase/firebase-ios-sdk' && github.event_name == 'schedule') || github.event_name == 'pull_request'
  82. runs-on: macOS-latest
  83. steps:
  84. - uses: actions/checkout@v2
  85. - name: Setup Bundler
  86. run: scripts/setup_bundler.sh
  87. - name: Setup project and Build Catalyst
  88. run: scripts/test_catalyst.sh FirebaseMessaging test FirebaseMessaging-Unit-unit
  89. quickstart:
  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. env:
  93. plist_secret: ${{ secrets.GHASecretsGPGPassphrase1 }}
  94. signin_secret: ${{ secrets.GHASecretsGPGPassphrase1 }}
  95. runs-on: macOS-latest
  96. steps:
  97. - uses: actions/checkout@v2
  98. - name: Setup quickstart
  99. run: scripts/setup_quickstart.sh messaging
  100. - name: Install Secret GoogleService-Info.plist
  101. run: scripts/decrypt_gha_secret.sh scripts/gha-encrypted/qs-messaging.plist.gpg \
  102. quickstart-ios/messaging/GoogleService-Info.plist "$plist_secret"
  103. - name: Install Secret FIREGSignInInfo.h
  104. run: scripts/decrypt_gha_secret.sh scripts/gha-encrypted/FIREGSignInInfo.h.gpg \
  105. quickstart-ios/TestUtils/FIREGSignInInfo.h "$signin_secret"
  106. - name: Test objc quickstart
  107. run: ([ -z $plist_secret ] ||
  108. scripts/third_party/travis/retry.sh scripts/test_quickstart.sh Messaging)
  109. - name: Test swift quickstart
  110. run: ([ -z $plist_secret ] ||
  111. scripts/third_party/travis/retry.sh scripts/test_quickstart.sh Messaging swift)
  112. pod-lib-lint-watchos:
  113. # Don't run on private repo unless it is a PR.
  114. if: (github.repository == 'Firebase/firebase-ios-sdk' && github.event_name == 'schedule') || github.event_name == 'pull_request'
  115. runs-on: macOS-latest
  116. steps:
  117. - uses: actions/checkout@v2
  118. - name: Setup Bundler
  119. run: scripts/setup_bundler.sh
  120. - name: Build and test
  121. run: scripts/third_party/travis/retry.sh scripts/pod_lib_lint.rb FirebaseMessaging.podspec --skip-tests --platforms=watchos
  122. messaging-cron-only:
  123. # Don't run on private repo.
  124. if: github.event_name == 'schedule' && github.repository == 'Firebase/firebase-ios-sdk'
  125. runs-on: macos-latest
  126. strategy:
  127. matrix:
  128. target: [ios, tvos, macos --skip-tests]
  129. flags: [
  130. '--use-modular-headers',
  131. '--skip-tests --use-libraries'
  132. ]
  133. needs: pod-lib-lint
  134. steps:
  135. - uses: actions/checkout@v2
  136. - name: Setup Bundler
  137. run: scripts/setup_bundler.sh
  138. - name: PodLibLint Messaging Cron
  139. run: scripts/third_party/travis/retry.sh scripts/pod_lib_lint.rb FirebaseMessaging.podspec --platforms=${{ matrix.target }}
  140. messaging-watchos-cron-only:
  141. # Don't run on private repo.
  142. if: github.event_name == 'schedule' && github.repository == 'Firebase/firebase-ios-sdk'
  143. runs-on: macos-latest
  144. strategy:
  145. matrix:
  146. flags: [
  147. '--use-static-frameworks',
  148. '--skip-tests --use-libraries'
  149. ]
  150. needs: pod-lib-lint-watchos
  151. steps:
  152. - uses: actions/checkout@v2
  153. - name: Setup Bundler
  154. run: scripts/setup_bundler.sh
  155. - name: PodLibLint Messaging Cron
  156. run: scripts/third_party/travis/retry.sh scripts/pod_lib_lint.rb FirebaseMessaging.podspec --platforms=watchos
  157. messaging-sample-build-test:
  158. # Don't run on private repo unless it is a PR.
  159. if: (github.repository == 'Firebase/firebase-ios-sdk' && github.event_name == 'schedule') || github.event_name == 'pull_request'
  160. env:
  161. plist_secret: ${{ secrets.GHASecretsGPGPassphrase1 }}
  162. runs-on: macos-latest
  163. steps:
  164. - uses: actions/checkout@v2
  165. - name: Setup Bundler
  166. run: scripts/setup_bundler.sh
  167. - name: Install Secret GoogleService-Info.plist
  168. run: |
  169. scripts/decrypt_gha_secret.sh scripts/gha-encrypted/messaging-sample-plist.gpg \
  170. FirebaseMessaging/Apps/Shared/GoogleService-Info.plist "$plist_secret"
  171. - name: Prereqs
  172. run: scripts/install_prereqs.sh MessagingSample iOS
  173. - name: Build
  174. run: ([ -z $plist_secret ] || scripts/build.sh MessagingSample iOS)