inappmessaging.yml 4.5 KB

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