messaging.yml 5.9 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158
  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 != 'FirebasePrivate/firebase-ios-sdk' || 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 != 'FirebasePrivate/firebase-ios-sdk' || 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. catalyst:
  50. # Don't run on private repo unless it is a PR.
  51. if: github.repository != 'FirebasePrivate/firebase-ios-sdk' || github.event_name == 'pull_request'
  52. runs-on: macOS-latest
  53. steps:
  54. - uses: actions/checkout@v2
  55. - name: Setup Bundler
  56. run: scripts/setup_bundler.sh
  57. - name: Setup project and Build Catalyst
  58. run: scripts/test_catalyst.sh FirebaseMessaging build
  59. quickstart:
  60. # Don't run on private repo unless it is a PR.
  61. if: github.repository != 'FirebasePrivate/firebase-ios-sdk' || github.event_name == 'pull_request'
  62. env:
  63. plist_secret: ${{ secrets.GHASecretsGPGPassphrase1 }}
  64. signin_secret: ${{ secrets.GHASecretsGPGPassphrase1 }}
  65. runs-on: macOS-latest
  66. steps:
  67. - uses: actions/checkout@v2
  68. - name: Setup quickstart
  69. run: scripts/setup_quickstart.sh messaging
  70. - name: Install Secret GoogleService-Info.plist
  71. run: scripts/decrypt_gha_secret.sh scripts/gha-encrypted/qs-messaging.plist.gpg \
  72. quickstart-ios/messaging/GoogleService-Info.plist "$plist_secret"
  73. - name: Install Secret FIREGSignInInfo.h
  74. run: scripts/decrypt_gha_secret.sh scripts/gha-encrypted/FIREGSignInInfo.h.gpg \
  75. quickstart-ios/TestUtils/FIREGSignInInfo.h "$signin_secret"
  76. - name: Test objc quickstart
  77. run: ([ -z $plist_secret ] ||
  78. scripts/third_party/travis/retry.sh scripts/test_quickstart.sh Messaging)
  79. - name: Test swift quickstart
  80. run: ([ -z $plist_secret ] ||
  81. scripts/third_party/travis/retry.sh scripts/test_quickstart.sh Messaging swift)
  82. pod-lib-lint-watchos:
  83. # Don't run on private repo unless it is a PR.
  84. if: github.repository != 'FirebasePrivate/firebase-ios-sdk' || github.event_name == 'pull_request'
  85. runs-on: macOS-latest
  86. steps:
  87. - uses: actions/checkout@v2
  88. - name: Setup Bundler
  89. run: scripts/setup_bundler.sh
  90. - name: Build and test
  91. run: scripts/third_party/travis/retry.sh scripts/pod_lib_lint.rb FirebaseMessaging.podspec --skip-tests --platforms=watchos
  92. messaging-cron-only:
  93. # Don't run on private repo.
  94. if: github.event_name == 'schedule' && github.repository != 'FirebasePrivate/firebase-ios-sdk'
  95. runs-on: macos-latest
  96. strategy:
  97. matrix:
  98. target: [ios, tvos, macos --skip-tests]
  99. flags: [
  100. '--use-modular-headers',
  101. '--skip-tests --use-libraries'
  102. ]
  103. needs: pod-lib-lint
  104. steps:
  105. - uses: actions/checkout@v2
  106. - name: Setup Bundler
  107. run: scripts/setup_bundler.sh
  108. - name: PodLibLint Messaging Cron
  109. run: scripts/third_party/travis/retry.sh scripts/pod_lib_lint.rb FirebaseMessaging.podspec --platforms=${{ matrix.target }}
  110. messaging-watchos-cron-only:
  111. # Don't run on private repo.
  112. if: github.event_name == 'schedule' && github.repository != 'FirebasePrivate/firebase-ios-sdk'
  113. runs-on: macos-latest
  114. strategy:
  115. matrix:
  116. flags: [
  117. '--skip-tests --use-modular-headers',
  118. '--skip-tests --use-libraries'
  119. ]
  120. needs: pod-lib-lint-watchos
  121. steps:
  122. - uses: actions/checkout@v2
  123. - name: Setup Bundler
  124. run: scripts/setup_bundler.sh
  125. - name: PodLibLint Messaging Cron
  126. run: scripts/third_party/travis/retry.sh scripts/pod_lib_lint.rb FirebaseMessaging.podspec --platforms=watchos
  127. messaging-sample-build-test:
  128. # Don't run on private repo unless it is a PR.
  129. if: github.repository != 'FirebasePrivate/firebase-ios-sdk' || github.event_name == 'pull_request'
  130. env:
  131. plist_secret: ${{ secrets.GHASecretsGPGPassphrase1 }}
  132. runs-on: macos-latest
  133. steps:
  134. - uses: actions/checkout@v2
  135. - name: Setup Bundler
  136. run: scripts/setup_bundler.sh
  137. - name: Install Secret GoogleService-Info.plist
  138. run: |
  139. scripts/decrypt_gha_secret.sh scripts/gha-encrypted/messaging-sample-plist.gpg \
  140. FirebaseMessaging/Apps/Sample/Sample/GoogleService-Info.plist "$plist_secret"
  141. - name: Prereqs
  142. run: scripts/install_prereqs.sh MessagingSample iOS
  143. - name: Build
  144. run: ([ -z $plist_secret ] || scripts/build.sh MessagingSample iOS)