messaging.yml 4.7 KB

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