inappmessaging.yml 3.9 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112
  1. name: inappmessaging
  2. permissions:
  3. contents: read
  4. on:
  5. workflow_dispatch:
  6. pull_request:
  7. paths:
  8. - 'FirebaseInAppMessaging**'
  9. - 'Interop/Analytics/Public/*.h'
  10. - '.github/workflows/inappmessaging.yml'
  11. - '.github/workflows/common.yml'
  12. - '.github/workflows/common_cocoapods.yml'
  13. - 'Gemfile*'
  14. schedule:
  15. # Run every day at 10pm (PST) - cron uses UTC times
  16. - cron: '0 6 * * *'
  17. concurrency:
  18. group: ${{ github.workflow }}-${{ github.head_ref || github.ref }}
  19. cancel-in-progress: true
  20. jobs:
  21. spm:
  22. uses: ./.github/workflows/common.yml
  23. with:
  24. target: FirebaseInAppMessaging-Beta
  25. platforms: iOS
  26. buildonly_platforms: iOS
  27. pod_lib_lint:
  28. uses: ./.github/workflows/common_cocoapods.yml
  29. with:
  30. product: FirebaseInAppMessaging
  31. platforms: iOS, tvOS
  32. tests:
  33. # Don't run on private repo unless it is a PR.
  34. if: (github.repository == 'Firebase/firebase-ios-sdk' && github.event_name == 'schedule') || github.event_name == 'pull_request'
  35. # TODO(#12770): Update to macos-14 when tests are updated for Xcode 15.
  36. runs-on: macos-15
  37. strategy:
  38. matrix:
  39. # TODO(#8682): Reenable iPad after fixing Xcode 13 test failures.
  40. # platform: [iOS, iPad]
  41. platform: [iOS]
  42. xcode: [Xcode_16.2]
  43. steps:
  44. - uses: actions/checkout@v4
  45. - uses: mikehardy/buildcache-action@c87cea0ccd718971d6cc39e672c4f26815b6c126
  46. with:
  47. cache_key: ${{ matrix.platform }}
  48. - uses: ruby/setup-ruby@354a1ad156761f5ee2b7b13fa8e09943a5e8d252 # v1
  49. - name: Setup Bundler
  50. run: scripts/setup_bundler.sh
  51. - name: Xcode
  52. run: sudo xcode-select -s /Applications/${{ matrix.xcode }}.app/Contents/Developer
  53. - name: Prereqs
  54. run: scripts/install_prereqs.sh InAppMessaging ${{ matrix.platform }} xcodebuild
  55. - name: Build and test
  56. run: scripts/third_party/travis/retry.sh scripts/build.sh InAppMessaging ${{ matrix.platform }} xcodebuild
  57. fiam-cron-only:
  58. # Don't run on private repo.
  59. if: github.event_name == 'schedule' && github.repository == 'Firebase/firebase-ios-sdk'
  60. runs-on: macos-15
  61. strategy:
  62. matrix:
  63. flags: [
  64. '--use-static-frameworks'
  65. ]
  66. platform: [ios, tvos]
  67. needs: pod_lib_lint
  68. steps:
  69. - uses: actions/checkout@v4
  70. - uses: ruby/setup-ruby@354a1ad156761f5ee2b7b13fa8e09943a5e8d252 # v1
  71. - name: Xcode
  72. run: sudo xcode-select -s /Applications/Xcode_16.2.app/Contents/Developer
  73. - name: Setup Bundler
  74. run: scripts/setup_bundler.sh
  75. - name: PodLibLint InAppMessaging Cron
  76. run: scripts/third_party/travis/retry.sh scripts/pod_lib_lint.rb FirebaseInAppMessaging.podspec --platforms=${{ matrix.platform }} ${{ matrix.flags }}
  77. quickstart:
  78. # Don't run on private repo unless it is a PR.
  79. if: (github.repository == 'Firebase/firebase-ios-sdk' && github.event_name == 'schedule') || github.event_name == 'pull_request'
  80. env:
  81. plist_secret: ${{ secrets.GHASecretsGPGPassphrase1 }}
  82. signin_secret: ${{ secrets.GHASecretsGPGPassphrase1 }}
  83. runs-on: macos-15
  84. steps:
  85. - uses: actions/checkout@v4
  86. - uses: actions/checkout@v4
  87. - uses: ruby/setup-ruby@354a1ad156761f5ee2b7b13fa8e09943a5e8d252 # v1
  88. - name: Xcode
  89. run: sudo xcode-select -s /Applications/Xcode_16.2.app/Contents/Developer
  90. - name: Setup quickstart
  91. run: scripts/setup_quickstart.sh inappmessaging
  92. - name: install secret googleservice-info.plist
  93. run: scripts/decrypt_gha_secret.sh scripts/gha-encrypted/qs-inappmessaging.plist.gpg \
  94. quickstart-ios/inappmessaging/GoogleService-Info.plist "$plist_secret"
  95. - name: Test objc quickstart
  96. run: ([ -z $plist_secret ] ||
  97. scripts/third_party/travis/retry.sh scripts/test_quickstart.sh InAppMessaging true)
  98. - name: Test swift quickstart
  99. run: ([ -z $plist_secret ] ||
  100. scripts/third_party/travis/retry.sh scripts/test_quickstart.sh InAppMessaging true swift)