crashlytics.yml 7.5 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202
  1. name: crashlytics
  2. on:
  3. pull_request:
  4. paths:
  5. - 'Crashlytics**'
  6. - 'FirebaseCrashlytics.podspec'
  7. - '.github/workflows/crashlytics.yml'
  8. - 'Interop/Analytics/Public/*.h'
  9. - 'Gemfile*'
  10. schedule:
  11. # Run every day at 10am (PST) - cron uses UTC times
  12. - cron: '0 2 * * *'
  13. concurrency:
  14. group: ${{ github.workflow }}-${{ github.head_ref || github.ref }}
  15. cancel-in-progress: true
  16. jobs:
  17. pod-lib-lint:
  18. # Don't run on private repo unless it is a PR.
  19. if: (github.repository == 'Firebase/firebase-ios-sdk' && github.event_name == 'schedule') || github.event_name == 'pull_request'
  20. strategy:
  21. matrix:
  22. target: [ios, tvos, macos, watchos --skip-tests]
  23. os: [macos-14, macos-13]
  24. flags: [
  25. '--use-modular-headers',
  26. ''
  27. ]
  28. include:
  29. - os: macos-14
  30. xcode: Xcode_15.3
  31. tests: --skip-tests
  32. - os: macos-13
  33. xcode: Xcode_15.2
  34. tests:
  35. runs-on: ${{ matrix.os }}
  36. steps:
  37. - uses: actions/checkout@v4
  38. - uses: ruby/setup-ruby@v1
  39. - name: Setup Bundler
  40. run: scripts/setup_bundler.sh
  41. - name: Xcode
  42. run: sudo xcode-select -s /Applications/${{ matrix.xcode }}.app/Contents/Developer
  43. - uses: nick-fields/retry@v3
  44. with:
  45. timeout_minutes: 120
  46. max_attempts: 3
  47. retry_on: error
  48. retry_wait_seconds: 120
  49. command: scripts/pod_lib_lint.rb FirebaseCrashlytics.podspec --platforms=${{ matrix.target }} ${{ matrix.tests }} ${{ matrix.flags }}
  50. spm:
  51. # Don't run on private repo unless it is a PR.
  52. if: (github.repository == 'Firebase/firebase-ios-sdk' && github.event_name == 'schedule') || github.event_name == 'pull_request'
  53. strategy:
  54. matrix:
  55. target: [iOS, tvOS, macOS, catalyst, watchOS]
  56. os: [macos-13, macos-14]
  57. include:
  58. - os: macos-13
  59. xcode: Xcode_15.2
  60. - os: macos-14
  61. xcode: Xcode_15.3
  62. - os: macos-14
  63. xcode: Xcode_15.3
  64. target: visionOS
  65. runs-on: ${{ matrix.os }}
  66. steps:
  67. - uses: actions/checkout@v4
  68. - uses: mikehardy/buildcache-action@c87cea0ccd718971d6cc39e672c4f26815b6c126
  69. with:
  70. cache_key: spm${{ matrix.os }}-${{ matrix.xcode }}-${{ matrix.target }}
  71. - name: Xcode
  72. run: sudo xcode-select -s /Applications/${{ matrix.xcode }}.app/Contents/Developer
  73. - name: Initialize xcodebuild
  74. run: scripts/setup_spm_tests.sh
  75. - uses: nick-fields/retry@v3
  76. with:
  77. timeout_minutes: 120
  78. max_attempts: 3
  79. retry_on: error
  80. retry_wait_seconds: 120
  81. command: scripts/third_party/travis/retry.sh ./scripts/build.sh FirebaseCrashlyticsUnit ${{ matrix.target }} spm
  82. catalyst:
  83. # Don't run on private repo unless it is a PR.
  84. if: (github.repository == 'Firebase/firebase-ios-sdk' && github.event_name == 'schedule') || github.event_name == 'pull_request'
  85. runs-on: macos-14
  86. steps:
  87. - uses: actions/checkout@v4
  88. - uses: mikehardy/buildcache-action@c87cea0ccd718971d6cc39e672c4f26815b6c126
  89. with:
  90. cache_key: catalyst${{ matrix.os }}
  91. - uses: ruby/setup-ruby@v1
  92. - name: Setup Bundler
  93. run: scripts/setup_bundler.sh
  94. - uses: nick-fields/retry@v3
  95. with:
  96. timeout_minutes: 120
  97. max_attempts: 3
  98. retry_on: error
  99. retry_wait_seconds: 120
  100. command: scripts/test_catalyst.sh FirebaseCrashlytics test FirebaseCrashlytics-Unit-unit
  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: ruby/setup-ruby@v1
  111. - name: Setup quickstart
  112. run: scripts/setup_quickstart.sh crashlytics
  113. env:
  114. LEGACY: true
  115. - name: Install Secret GoogleService-Info.plist
  116. run: scripts/decrypt_gha_secret.sh scripts/gha-encrypted/qs-crashlytics.plist.gpg \
  117. quickstart-ios/crashlytics/GoogleService-Info.plist "$plist_secret"
  118. - name: Test objc quickstart
  119. run: |
  120. mkdir quickstart-ios/crashlytics/LegacyCrashlyticsQuickstart/Pods/FirebaseCrashlytics
  121. # Set the deployed pod location of run and upload-symbols with the development pod version.
  122. cp Crashlytics/run quickstart-ios/crashlytics/LegacyCrashlyticsQuickstart/Pods/FirebaseCrashlytics/
  123. cp Crashlytics/upload-symbols quickstart-ios/crashlytics/LegacyCrashlyticsQuickstart/Pods/FirebaseCrashlytics/
  124. ([ -z $plist_secret ] || scripts/third_party/travis/retry.sh scripts/test_quickstart.sh Crashlytics true)
  125. env:
  126. LEGACY: true
  127. - name: Test swift quickstart
  128. run: ([ -z $plist_secret ] || scripts/third_party/travis/retry.sh scripts/test_quickstart.sh Crashlytics true swift)
  129. env:
  130. LEGACY: true
  131. quickstart-ftl-cron-only:
  132. # Don't run on private repo.
  133. if: github.repository == 'Firebase/firebase-ios-sdk' && github.event_name == 'schedule'
  134. env:
  135. plist_secret: ${{ secrets.GHASecretsGPGPassphrase1 }}
  136. signin_secret: ${{ secrets.GHASecretsGPGPassphrase1 }}
  137. runs-on: macos-14
  138. steps:
  139. - uses: actions/checkout@v4
  140. - uses: ruby/setup-ruby@v1
  141. - uses: actions/setup-python@v4
  142. with:
  143. python-version: '3.11'
  144. - name: Setup quickstart
  145. run: scripts/setup_quickstart.sh crashlytics
  146. env:
  147. LEGACY: true
  148. - name: Install Secret GoogleService-Info.plist
  149. run: scripts/decrypt_gha_secret.sh scripts/gha-encrypted/qs-crashlytics.plist.gpg \
  150. quickstart-ios/crashlytics/GoogleService-Info.plist "$plist_secret"
  151. - name: Build objc quickstart
  152. run: |
  153. mkdir quickstart-ios/crashlytics/LegacyCrashlyticsQuickstart/Pods/FirebaseCrashlytics
  154. # Set the deployed pod location of run and upload-symbols with the development pod version.
  155. cp Crashlytics/run quickstart-ios/crashlytics/LegacyCrashlyticsQuickstart/Pods/FirebaseCrashlytics/
  156. cp Crashlytics/upload-symbols quickstart-ios/crashlytics/LegacyCrashlyticsQuickstart/Pods/FirebaseCrashlytics/
  157. ([ -z $plist_secret ] || scripts/third_party/travis/retry.sh scripts/test_quickstart_ftl.sh Crashlytics)
  158. env:
  159. LEGACY: true
  160. - name: Build swift quickstart
  161. run: ([ -z $plist_secret ] || scripts/third_party/travis/retry.sh scripts/test_quickstart_ftl.sh Crashlytics swift)
  162. env:
  163. LEGACY: true
  164. - id: ftl_test
  165. uses: FirebaseExtended/github-actions/firebase-test-lab@v1.4
  166. with:
  167. credentials_json: ${{ secrets.FIREBASE_SERVICE_ACCOUNT_CREDENTIALS }}
  168. testapp_dir: quickstart-ios/build-for-testing
  169. test_type: "xctest"
  170. crashlytics-cron-only:
  171. # Don't run on private repo.
  172. if: github.event_name == 'schedule' && github.repository == 'Firebase/firebase-ios-sdk'
  173. runs-on: macos-14
  174. strategy:
  175. matrix:
  176. # Disable watchos because it does not support XCTest.
  177. target: [ios, tvos, macos, watchos --skip-tests]
  178. flags: [
  179. '--use-static-frameworks'
  180. ]
  181. needs: pod-lib-lint
  182. steps:
  183. - uses: actions/checkout@v4
  184. - uses: ruby/setup-ruby@v1
  185. - name: Setup Bundler
  186. run: scripts/setup_bundler.sh
  187. - name: PodLibLint Auth Cron
  188. run: scripts/third_party/travis/retry.sh scripts/pod_lib_lint.rb FirebaseCrashlytics.podspec --platforms=${{ matrix.target }} ${{ matrix.flags }}