messaging.yml 4.8 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144
  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. env:
  21. plist_secret: ${{ secrets.GHASecretsGPGPassphrase1 }}
  22. runs-on: macos-latest
  23. steps:
  24. - uses: actions/checkout@v2
  25. - name: Setup Bundler
  26. run: scripts/setup_bundler.sh
  27. - name: Install Secret GoogleService-Info.plist
  28. run: |
  29. mkdir FirebaseMessaging/Tests/IntegrationTests/Resources
  30. scripts/decrypt_gha_secret.sh scripts/gha-encrypted/messaging-sample-plist.gpg \
  31. FirebaseMessaging/Tests/IntegrationTests/Resources/GoogleService-Info.plist "$plist_secret"
  32. - name: BuildAndTest # can be replaced with pod lib lint with CocoaPods 1.10
  33. run: ([ -z $plist_secret ] || scripts/third_party/travis/retry.sh scripts/build.sh Messaging all)
  34. pod-lib-lint:
  35. runs-on: macOS-latest
  36. strategy:
  37. matrix:
  38. target: [ios, tvos, macos --skip-tests] # skipping tests on mac because of keychain access
  39. steps:
  40. - uses: actions/checkout@v2
  41. - name: Setup Bundler
  42. run: scripts/setup_bundler.sh
  43. - name: Build and test
  44. run: scripts/third_party/travis/retry.sh scripts/pod_lib_lint.rb FirebaseMessaging.podspec --platforms=${{ matrix.target }}
  45. catalyst:
  46. runs-on: macOS-latest
  47. steps:
  48. - uses: actions/checkout@v2
  49. - name: Setup Bundler
  50. run: scripts/setup_bundler.sh
  51. - name: Setup project and Build Catalyst
  52. run: scripts/test_catalyst.sh FirebaseMessaging build
  53. quickstart:
  54. env:
  55. plist_secret: ${{ secrets.GHASecretsGPGPassphrase1 }}
  56. signin_secret: ${{ secrets.GHASecretsGPGPassphrase1 }}
  57. runs-on: macOS-latest
  58. steps:
  59. - uses: actions/checkout@v2
  60. - name: Setup quickstart
  61. run: scripts/setup_quickstart.sh messaging
  62. - name: Install Secret GoogleService-Info.plist
  63. run: scripts/decrypt_gha_secret.sh scripts/gha-encrypted/qs-messaging.plist.gpg \
  64. quickstart-ios/messaging/GoogleService-Info.plist "$plist_secret"
  65. - name: Install Secret FIREGSignInInfo.h
  66. run: scripts/decrypt_gha_secret.sh scripts/gha-encrypted/FIREGSignInInfo.h.gpg \
  67. quickstart-ios/TestUtils/FIREGSignInInfo.h "$signin_secret"
  68. - name: Test objc quickstart
  69. run: ([ -z $plist_secret ] ||
  70. scripts/third_party/travis/retry.sh scripts/test_quickstart.sh Messaging)
  71. - name: Test swift quickstart
  72. run: ([ -z $plist_secret ] ||
  73. scripts/third_party/travis/retry.sh scripts/test_quickstart.sh Messaging swift)
  74. pod-lib-lint-watchos:
  75. runs-on: macOS-latest
  76. steps:
  77. - uses: actions/checkout@v2
  78. - name: Setup Bundler
  79. run: scripts/setup_bundler.sh
  80. - name: Build and test
  81. run: scripts/third_party/travis/retry.sh scripts/pod_lib_lint.rb FirebaseMessaging.podspec --skip-tests --platforms=watchos
  82. messaging-cron-only:
  83. runs-on: macos-latest
  84. if: github.event_name == 'schedule'
  85. strategy:
  86. matrix:
  87. target: [ios, tvos, macos --skip-tests]
  88. flags: [
  89. '--use-modular-headers',
  90. '--skip-tests --use-libraries'
  91. ]
  92. needs: pod-lib-lint
  93. steps:
  94. - uses: actions/checkout@v2
  95. - name: Setup Bundler
  96. run: scripts/setup_bundler.sh
  97. - name: PodLibLint Messaging Cron
  98. run: scripts/third_party/travis/retry.sh scripts/pod_lib_lint.rb FirebaseMessaging.podspec --platforms=${{ matrix.target }}
  99. messaging-watchos-cron-only:
  100. runs-on: macos-latest
  101. if: github.event_name == 'schedule'
  102. strategy:
  103. matrix:
  104. flags: [
  105. '--skip-tests --use-modular-headers',
  106. '--skip-tests --use-libraries'
  107. ]
  108. needs: pod-lib-lint-watchos
  109. steps:
  110. - uses: actions/checkout@v2
  111. - name: Setup Bundler
  112. run: scripts/setup_bundler.sh
  113. - name: PodLibLint Messaging Cron
  114. run: scripts/third_party/travis/retry.sh scripts/pod_lib_lint.rb FirebaseMessaging.podspec --platforms=watchos
  115. messaging-sample-build-test:
  116. env:
  117. plist_secret: ${{ secrets.GHASecretsGPGPassphrase1 }}
  118. runs-on: macos-latest
  119. steps:
  120. - uses: actions/checkout@v2
  121. - name: Setup Bundler
  122. run: scripts/setup_bundler.sh
  123. - name: Install Secret GoogleService-Info.plist
  124. run: |
  125. scripts/decrypt_gha_secret.sh scripts/gha-encrypted/messaging-sample-plist.gpg \
  126. FirebaseMessaging/Apps/Sample/Sample/GoogleService-Info.plist "$plist_secret"
  127. - name: Prereqs
  128. run: scripts/install_prereqs.sh MessagingSample iOS
  129. - name: Build
  130. run: ([ -z $plist_secret ] || scripts/build.sh MessagingSample iOS)