messaging.yml 7.1 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187
  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 11pm (PST) - cron uses UTC times
  17. - cron: '0 7 * * *'
  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. steps:
  54. - uses: actions/checkout@v2
  55. - name: Xcode 12
  56. run: sudo xcode-select -s /Applications/Xcode_12.app/Contents/Developer
  57. - name: Initialize xcodebuild
  58. run: xcodebuild -list
  59. - name: iOS Unit Tests
  60. run: scripts/third_party/travis/retry.sh ./scripts/build.sh MessagingUnit iOS spm
  61. spm-cron:
  62. # Don't run on private repo.
  63. if: github.event_name == 'schedule' && github.repository == 'Firebase/firebase-ios-sdk'
  64. runs-on: macOS-latest
  65. strategy:
  66. matrix:
  67. target: [tvOS, macOS, catalyst]
  68. steps:
  69. - uses: actions/checkout@v2
  70. - name: Xcode 12
  71. run: sudo xcode-select -s /Applications/Xcode_12.app/Contents/Developer
  72. - name: Initialize xcodebuild
  73. run: xcodebuild -list
  74. - name: Unit Tests
  75. run: scripts/third_party/travis/retry.sh ./scripts/build.sh MessagingUnit ${{ matrix.target }} spm
  76. catalyst:
  77. # Don't run on private repo unless it is a PR.
  78. if: (github.repository == 'Firebase/firebase-ios-sdk' && github.event_name == 'schedule') || github.event_name == 'pull_request'
  79. runs-on: macOS-latest
  80. steps:
  81. - uses: actions/checkout@v2
  82. - name: Setup Bundler
  83. run: scripts/setup_bundler.sh
  84. - name: Setup project and Build Catalyst
  85. run: scripts/test_catalyst.sh FirebaseMessaging test FirebaseMessaging-Unit-unit
  86. quickstart:
  87. # Don't run on private repo unless it is a PR.
  88. if: (github.repository == 'Firebase/firebase-ios-sdk' && github.event_name == 'schedule') || github.event_name == 'pull_request'
  89. env:
  90. plist_secret: ${{ secrets.GHASecretsGPGPassphrase1 }}
  91. signin_secret: ${{ secrets.GHASecretsGPGPassphrase1 }}
  92. runs-on: macOS-latest
  93. steps:
  94. - uses: actions/checkout@v2
  95. - name: Setup quickstart
  96. run: scripts/setup_quickstart.sh messaging
  97. - name: Install Secret GoogleService-Info.plist
  98. run: scripts/decrypt_gha_secret.sh scripts/gha-encrypted/qs-messaging.plist.gpg \
  99. quickstart-ios/messaging/GoogleService-Info.plist "$plist_secret"
  100. - name: Install Secret FIREGSignInInfo.h
  101. run: scripts/decrypt_gha_secret.sh scripts/gha-encrypted/FIREGSignInInfo.h.gpg \
  102. quickstart-ios/TestUtils/FIREGSignInInfo.h "$signin_secret"
  103. - name: Test objc quickstart
  104. run: ([ -z $plist_secret ] ||
  105. scripts/third_party/travis/retry.sh scripts/test_quickstart.sh Messaging)
  106. - name: Test swift quickstart
  107. run: ([ -z $plist_secret ] ||
  108. scripts/third_party/travis/retry.sh scripts/test_quickstart.sh Messaging swift)
  109. pod-lib-lint-watchos:
  110. # Don't run on private repo unless it is a PR.
  111. if: (github.repository == 'Firebase/firebase-ios-sdk' && github.event_name == 'schedule') || github.event_name == 'pull_request'
  112. runs-on: macOS-latest
  113. steps:
  114. - uses: actions/checkout@v2
  115. - name: Setup Bundler
  116. run: scripts/setup_bundler.sh
  117. - name: Build and test
  118. run: scripts/third_party/travis/retry.sh scripts/pod_lib_lint.rb FirebaseMessaging.podspec --skip-tests --platforms=watchos
  119. messaging-cron-only:
  120. # Don't run on private repo.
  121. if: github.event_name == 'schedule' && github.repository == 'Firebase/firebase-ios-sdk'
  122. runs-on: macos-latest
  123. strategy:
  124. matrix:
  125. target: [ios, tvos, macos --skip-tests]
  126. flags: [
  127. '--use-modular-headers',
  128. '--skip-tests --use-libraries'
  129. ]
  130. needs: pod-lib-lint
  131. steps:
  132. - uses: actions/checkout@v2
  133. - name: Setup Bundler
  134. run: scripts/setup_bundler.sh
  135. - name: PodLibLint Messaging Cron
  136. run: scripts/third_party/travis/retry.sh scripts/pod_lib_lint.rb FirebaseMessaging.podspec --platforms=${{ matrix.target }}
  137. messaging-watchos-cron-only:
  138. # Don't run on private repo.
  139. if: github.event_name == 'schedule' && github.repository == 'Firebase/firebase-ios-sdk'
  140. runs-on: macos-latest
  141. strategy:
  142. matrix:
  143. flags: [
  144. '--use-static-frameworks',
  145. '--skip-tests --use-libraries'
  146. ]
  147. needs: pod-lib-lint-watchos
  148. steps:
  149. - uses: actions/checkout@v2
  150. - name: Setup Bundler
  151. run: scripts/setup_bundler.sh
  152. - name: PodLibLint Messaging Cron
  153. run: scripts/third_party/travis/retry.sh scripts/pod_lib_lint.rb FirebaseMessaging.podspec --platforms=watchos
  154. messaging-sample-build-test:
  155. # Don't run on private repo unless it is a PR.
  156. if: (github.repository == 'Firebase/firebase-ios-sdk' && github.event_name == 'schedule') || github.event_name == 'pull_request'
  157. env:
  158. plist_secret: ${{ secrets.GHASecretsGPGPassphrase1 }}
  159. runs-on: macos-latest
  160. steps:
  161. - uses: actions/checkout@v2
  162. - name: Setup Bundler
  163. run: scripts/setup_bundler.sh
  164. - name: Install Secret GoogleService-Info.plist
  165. run: |
  166. scripts/decrypt_gha_secret.sh scripts/gha-encrypted/messaging-sample-plist.gpg \
  167. FirebaseMessaging/Apps/Shared/GoogleService-Info.plist "$plist_secret"
  168. - name: Prereqs
  169. run: scripts/install_prereqs.sh MessagingSample iOS
  170. - name: Build
  171. run: ([ -z $plist_secret ] || scripts/build.sh MessagingSample iOS)