inappmessaging.yml 4.8 KB

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