messaging.yml 7.6 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193
  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 3am (PST) - cron uses UTC times
  17. # This is set to 3 hours after zip workflow so zip testing can run after.
  18. - cron: '0 11 * * *'
  19. jobs:
  20. messaging:
  21. # Don't run on private repo unless it is a PR.
  22. if: github.repository != 'FirebasePrivate/firebase-ios-sdk' || github.event_name == 'pull_request'
  23. env:
  24. plist_secret: ${{ secrets.GHASecretsGPGPassphrase1 }}
  25. runs-on: macos-latest
  26. steps:
  27. - uses: actions/checkout@v2
  28. - name: Setup Bundler
  29. run: scripts/setup_bundler.sh
  30. - name: Install Secret GoogleService-Info.plist
  31. run: |
  32. mkdir FirebaseMessaging/Tests/IntegrationTests/Resources
  33. scripts/decrypt_gha_secret.sh scripts/gha-encrypted/messaging-sample-plist.gpg \
  34. FirebaseMessaging/Tests/IntegrationTests/Resources/GoogleService-Info.plist "$plist_secret"
  35. - name: BuildAndTest # can be replaced with pod lib lint with CocoaPods 1.10
  36. run: ([ -z $plist_secret ] || scripts/third_party/travis/retry.sh scripts/build.sh Messaging all)
  37. pod-lib-lint:
  38. # Don't run on private repo unless it is a PR.
  39. if: github.repository != 'FirebasePrivate/firebase-ios-sdk' || github.event_name == 'pull_request'
  40. runs-on: macOS-latest
  41. strategy:
  42. matrix:
  43. target: [ios, tvos, macos --skip-tests] # skipping tests on mac because of keychain access
  44. steps:
  45. - uses: actions/checkout@v2
  46. - name: Setup Bundler
  47. run: scripts/setup_bundler.sh
  48. - name: Build and test
  49. run: scripts/third_party/travis/retry.sh scripts/pod_lib_lint.rb FirebaseMessaging.podspec --platforms=${{ matrix.target }}
  50. catalyst:
  51. # Don't run on private repo unless it is a PR.
  52. if: github.repository != 'FirebasePrivate/firebase-ios-sdk' || github.event_name == 'pull_request'
  53. runs-on: macOS-latest
  54. steps:
  55. - uses: actions/checkout@v2
  56. - name: Setup Bundler
  57. run: scripts/setup_bundler.sh
  58. - name: Setup project and Build Catalyst
  59. run: scripts/test_catalyst.sh FirebaseMessaging build
  60. quickstart_framework:
  61. # Don't run on private repo.
  62. if: github.event_name == 'schedule' && github.repository != 'FirebasePrivate/firebase-ios-sdk'
  63. env:
  64. plist_secret: ${{ secrets.GHASecretsGPGPassphrase1 }}
  65. signin_secret: ${{ secrets.GHASecretsGPGPassphrase1 }}
  66. FRAMEWORK_ZIP: "Firebase-actions-dir.zip"
  67. SDK: "Messaging"
  68. runs-on: macOS-latest
  69. steps:
  70. - uses: actions/checkout@v2
  71. - name: Pull zip from GCS
  72. run: scripts/pull_zip_gcloud.sh "$plist_secret" "$FRAMEWORK_ZIP" "${HOME}/ios_frameworks"
  73. - name: Setup quickstart
  74. run: SAMPLE="$SDK" TARGET="${SDK}Example" scripts/setup_quickstart_framework.sh \
  75. "${HOME}"/ios_frameworks/Firebase/FirebaseMessaging/* \
  76. "${HOME}"/ios_frameworks/Firebase/FirebaseAnalytics/*
  77. - name: Install Secret GoogleService-Info.plist
  78. run: scripts/decrypt_gha_secret.sh scripts/gha-encrypted/qs-messaging.plist.gpg \
  79. quickstart-ios/messaging/GoogleService-Info.plist "$plist_secret"
  80. - name: Install Secret FIREGSignInInfo.h
  81. run: scripts/decrypt_gha_secret.sh scripts/gha-encrypted/FIREGSignInInfo.h.gpg \
  82. quickstart-ios/TestUtils/FIREGSignInInfo.h "$signin_secret"
  83. - name: Test Quickstart
  84. run: ([ -z $plist_secret ] || scripts/third_party/travis/retry.sh scripts/test_quickstart_framework.sh "${SDK}")
  85. - name: Remove data before upload
  86. if: ${{ failure() }}
  87. run: scripts/remove_data.sh "${SDK}"
  88. - uses: actions/upload-artifact@v2
  89. if: ${{ failure() }}
  90. with:
  91. name: quickstart_artifacts
  92. path: quickstart-ios/
  93. quickstart:
  94. # Don't run on private repo unless it is a PR.
  95. if: github.repository != 'FirebasePrivate/firebase-ios-sdk' || github.event_name == 'pull_request'
  96. env:
  97. plist_secret: ${{ secrets.GHASecretsGPGPassphrase1 }}
  98. signin_secret: ${{ secrets.GHASecretsGPGPassphrase1 }}
  99. runs-on: macOS-latest
  100. steps:
  101. - uses: actions/checkout@v2
  102. - name: Setup quickstart
  103. run: scripts/setup_quickstart.sh messaging
  104. - name: Install Secret GoogleService-Info.plist
  105. run: scripts/decrypt_gha_secret.sh scripts/gha-encrypted/qs-messaging.plist.gpg \
  106. quickstart-ios/messaging/GoogleService-Info.plist "$plist_secret"
  107. - name: Install Secret FIREGSignInInfo.h
  108. run: scripts/decrypt_gha_secret.sh scripts/gha-encrypted/FIREGSignInInfo.h.gpg \
  109. quickstart-ios/TestUtils/FIREGSignInInfo.h "$signin_secret"
  110. - name: Test objc quickstart
  111. run: ([ -z $plist_secret ] ||
  112. scripts/third_party/travis/retry.sh scripts/test_quickstart.sh Messaging)
  113. - name: Test swift quickstart
  114. run: ([ -z $plist_secret ] ||
  115. scripts/third_party/travis/retry.sh scripts/test_quickstart.sh Messaging swift)
  116. pod-lib-lint-watchos:
  117. # Don't run on private repo unless it is a PR.
  118. if: github.repository != 'FirebasePrivate/firebase-ios-sdk' || github.event_name == 'pull_request'
  119. runs-on: macOS-latest
  120. steps:
  121. - uses: actions/checkout@v2
  122. - name: Setup Bundler
  123. run: scripts/setup_bundler.sh
  124. - name: Build and test
  125. run: scripts/third_party/travis/retry.sh scripts/pod_lib_lint.rb FirebaseMessaging.podspec --skip-tests --platforms=watchos
  126. messaging-cron-only:
  127. # Don't run on private repo.
  128. if: github.event_name == 'schedule' && github.repository != 'FirebasePrivate/firebase-ios-sdk'
  129. runs-on: macos-latest
  130. strategy:
  131. matrix:
  132. target: [ios, tvos, macos --skip-tests]
  133. flags: [
  134. '--use-modular-headers',
  135. '--skip-tests --use-libraries'
  136. ]
  137. needs: pod-lib-lint
  138. steps:
  139. - uses: actions/checkout@v2
  140. - name: Setup Bundler
  141. run: scripts/setup_bundler.sh
  142. - name: PodLibLint Messaging Cron
  143. run: scripts/third_party/travis/retry.sh scripts/pod_lib_lint.rb FirebaseMessaging.podspec --platforms=${{ matrix.target }}
  144. messaging-watchos-cron-only:
  145. # Don't run on private repo.
  146. if: github.event_name == 'schedule' && github.repository != 'FirebasePrivate/firebase-ios-sdk'
  147. runs-on: macos-latest
  148. strategy:
  149. matrix:
  150. flags: [
  151. '--skip-tests --use-modular-headers',
  152. '--skip-tests --use-libraries'
  153. ]
  154. needs: pod-lib-lint-watchos
  155. steps:
  156. - uses: actions/checkout@v2
  157. - name: Setup Bundler
  158. run: scripts/setup_bundler.sh
  159. - name: PodLibLint Messaging Cron
  160. run: scripts/third_party/travis/retry.sh scripts/pod_lib_lint.rb FirebaseMessaging.podspec --platforms=watchos
  161. messaging-sample-build-test:
  162. # Don't run on private repo unless it is a PR.
  163. if: github.repository != 'FirebasePrivate/firebase-ios-sdk' || github.event_name == 'pull_request'
  164. env:
  165. plist_secret: ${{ secrets.GHASecretsGPGPassphrase1 }}
  166. runs-on: macos-latest
  167. steps:
  168. - uses: actions/checkout@v2
  169. - name: Setup Bundler
  170. run: scripts/setup_bundler.sh
  171. - name: Install Secret GoogleService-Info.plist
  172. run: |
  173. scripts/decrypt_gha_secret.sh scripts/gha-encrypted/messaging-sample-plist.gpg \
  174. FirebaseMessaging/Apps/Sample/Sample/GoogleService-Info.plist "$plist_secret"
  175. - name: Prereqs
  176. run: scripts/install_prereqs.sh MessagingSample iOS
  177. - name: Build
  178. run: ([ -z $plist_secret ] || scripts/build.sh MessagingSample iOS)