messaging.yml 4.5 KB

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