inappmessaging.yml 4.7 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135
  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-12, macos-13]
  23. include:
  24. - os: macos-12
  25. xcode: Xcode_14.2
  26. - os: macos-13
  27. xcode: Xcode_15.1
  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. runs-on: macos-12
  42. strategy:
  43. matrix:
  44. # TODO(#8682): Reenable iPad after fixing Xcode 13 test failures.
  45. # platform: [iOS, iPad]
  46. platform: [iOS]
  47. steps:
  48. - uses: actions/checkout@v4
  49. - uses: mikehardy/buildcache-action@c87cea0ccd718971d6cc39e672c4f26815b6c126
  50. with:
  51. cache_key: ${{ matrix.platform }}
  52. - uses: ruby/setup-ruby@v1
  53. - name: Setup Bundler
  54. run: scripts/setup_bundler.sh
  55. - name: Prereqs
  56. run: scripts/install_prereqs.sh InAppMessaging ${{ matrix.platform }} xcodebuild
  57. - name: Build and test
  58. run: scripts/third_party/travis/retry.sh scripts/build.sh InAppMessaging ${{ matrix.platform }} xcodebuild
  59. spm:
  60. # Don't run on private repo unless it is a PR.
  61. if: (github.repository == 'Firebase/firebase-ios-sdk' && github.event_name == 'schedule') || github.event_name == 'pull_request'
  62. strategy:
  63. matrix:
  64. os: [macos-12, macos-13]
  65. include:
  66. - os: macos-12
  67. xcode: Xcode_14.2
  68. - os: macos-13
  69. xcode: Xcode_15.1
  70. runs-on: ${{ matrix.os }}
  71. steps:
  72. - uses: actions/checkout@v4
  73. - uses: mikehardy/buildcache-action@c87cea0ccd718971d6cc39e672c4f26815b6c126
  74. with:
  75. cache_key: spm${{ matrix.os }}-${{ matrix.xcode }}
  76. - name: Xcode
  77. run: sudo xcode-select -s /Applications/${{ matrix.xcode }}.app/Contents/Developer
  78. - name: Initialize xcodebuild
  79. run: scripts/setup_spm_tests.sh
  80. - name: iOS Unit Tests
  81. run: scripts/third_party/travis/retry.sh ./scripts/build.sh FirebaseInAppMessaging-Beta iOS spmbuildonly
  82. fiam-cron-only:
  83. # Don't run on private repo.
  84. if: github.event_name == 'schedule' && github.repository == 'Firebase/firebase-ios-sdk'
  85. runs-on: macos-12
  86. strategy:
  87. matrix:
  88. flags: [
  89. '--use-static-frameworks'
  90. ]
  91. platform: [ios, tvos]
  92. needs: pod_lib_lint
  93. steps:
  94. - uses: actions/checkout@v4
  95. - uses: ruby/setup-ruby@v1
  96. - name: Setup Bundler
  97. run: scripts/setup_bundler.sh
  98. - name: PodLibLint InAppMessaging Cron
  99. run: scripts/third_party/travis/retry.sh scripts/pod_lib_lint.rb FirebaseInAppMessaging.podspec --platforms=${{ matrix.platform }} ${{ matrix.flags }}
  100. quickstart:
  101. # Don't run on private repo unless it is a PR.
  102. if: (github.repository == 'Firebase/firebase-ios-sdk' && github.event_name == 'schedule') || github.event_name == 'pull_request'
  103. env:
  104. plist_secret: ${{ secrets.GHASecretsGPGPassphrase1 }}
  105. signin_secret: ${{ secrets.GHASecretsGPGPassphrase1 }}
  106. runs-on: macos-12
  107. steps:
  108. - uses: actions/checkout@v4
  109. - uses: actions/checkout@v4
  110. - uses: ruby/setup-ruby@v1
  111. - name: Setup quickstart
  112. run: scripts/setup_quickstart.sh inappmessaging
  113. - name: install secret googleservice-info.plist
  114. run: scripts/decrypt_gha_secret.sh scripts/gha-encrypted/qs-inappmessaging.plist.gpg \
  115. quickstart-ios/inappmessaging/GoogleService-Info.plist "$plist_secret"
  116. - name: Test objc quickstart
  117. run: ([ -z $plist_secret ] ||
  118. scripts/third_party/travis/retry.sh scripts/test_quickstart.sh InAppMessaging true)
  119. - name: Test swift quickstart
  120. run: ([ -z $plist_secret ] ||
  121. scripts/third_party/travis/retry.sh scripts/test_quickstart.sh InAppMessaging true swift)