crashlytics.yml 8.2 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234
  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]
  24. flags: [
  25. '--use-modular-headers --skip-tests',
  26. ''
  27. ]
  28. xcode: [Xcode_15.2, Xcode_16]
  29. runs-on: ${{ matrix.os }}
  30. steps:
  31. - uses: actions/checkout@v4
  32. - uses: ruby/setup-ruby@v1
  33. - name: Setup Bundler
  34. run: scripts/setup_bundler.sh
  35. - name: Xcode
  36. run: sudo xcode-select -s /Applications/${{ matrix.xcode }}.app/Contents/Developer
  37. - uses: nick-fields/retry@v3
  38. with:
  39. timeout_minutes: 120
  40. max_attempts: 3
  41. retry_on: error
  42. retry_wait_seconds: 120
  43. command: scripts/pod_lib_lint.rb FirebaseCrashlytics.podspec --platforms=${{ matrix.target }} ${{ matrix.tests }} ${{ matrix.flags }}
  44. spm-package-resolved:
  45. env:
  46. FIREBASECI_USE_LATEST_GOOGLEAPPMEASUREMENT: 1
  47. runs-on: macos-14
  48. outputs:
  49. cache_key: ${{ steps.generate_cache_key.outputs.cache_key }}
  50. steps:
  51. - uses: actions/checkout@v4
  52. - name: Generate Swift Package.resolved
  53. id: swift_package_resolve
  54. run: |
  55. swift package resolve
  56. - name: Generate cache key
  57. id: generate_cache_key
  58. run: |
  59. cache_key="${{ runner.os }}-spm-${{ hashFiles('**/Package.resolved') }}"
  60. echo "cache_key=${cache_key}" >> "$GITHUB_OUTPUT"
  61. - uses: actions/cache/save@v4
  62. id: cache
  63. with:
  64. path: .build
  65. key: ${{ steps.generate_cache_key.outputs.cache_key }}
  66. spm:
  67. # Don't run on private repo unless it is a PR.
  68. if: (github.repository == 'Firebase/firebase-ios-sdk' && github.event_name == 'schedule') || github.event_name == 'pull_request'
  69. needs: [spm-package-resolved]
  70. strategy:
  71. matrix:
  72. include:
  73. - os: macos-13
  74. xcode: Xcode_15.2
  75. target: iOS
  76. - os: macos-14
  77. xcode: Xcode_15.4
  78. target: iOS
  79. - os: macos-15
  80. xcode: Xcode_16
  81. target: iOS
  82. - os: macos-15
  83. xcode: Xcode_16
  84. target: tvOS
  85. - os: macos-15
  86. xcode: Xcode_16
  87. target: macOS
  88. - os: macos-15
  89. xcode: Xcode_16
  90. target: watchOS
  91. - os: macos-15
  92. xcode: Xcode_16
  93. target: catalyst
  94. - os: macos-15
  95. xcode: Xcode_16
  96. target: visionOS
  97. runs-on: ${{ matrix.os }}
  98. steps:
  99. - uses: actions/checkout@v4
  100. - uses: actions/cache/restore@v4
  101. with:
  102. path: .build
  103. key: ${{needs.spm-package-resolved.outputs.cache_key}}
  104. - name: Xcode
  105. run: sudo xcode-select -s /Applications/${{ matrix.xcode }}.app/Contents/Developer
  106. - name: Initialize xcodebuild
  107. run: scripts/setup_spm_tests.sh
  108. - uses: nick-fields/retry@v3
  109. with:
  110. timeout_minutes: 120
  111. max_attempts: 3
  112. retry_on: error
  113. retry_wait_seconds: 120
  114. command: scripts/third_party/travis/retry.sh ./scripts/build.sh FirebaseCrashlyticsUnit ${{ matrix.target }} spm
  115. catalyst:
  116. # Don't run on private repo unless it is a PR.
  117. if: (github.repository == 'Firebase/firebase-ios-sdk' && github.event_name == 'schedule') || github.event_name == 'pull_request'
  118. runs-on: macos-14
  119. steps:
  120. - uses: actions/checkout@v4
  121. - uses: mikehardy/buildcache-action@c87cea0ccd718971d6cc39e672c4f26815b6c126
  122. with:
  123. cache_key: catalyst${{ matrix.os }}
  124. - uses: ruby/setup-ruby@v1
  125. - name: Setup Bundler
  126. run: scripts/setup_bundler.sh
  127. - uses: nick-fields/retry@v3
  128. with:
  129. timeout_minutes: 120
  130. max_attempts: 5
  131. retry_on: error
  132. retry_wait_seconds: 120
  133. command: scripts/test_catalyst.sh FirebaseCrashlytics test FirebaseCrashlytics-Unit-unit
  134. quickstart:
  135. # Don't run on private repo unless it is a PR.
  136. if: (github.repository == 'Firebase/firebase-ios-sdk' && github.event_name == 'schedule') || github.event_name == 'pull_request'
  137. env:
  138. plist_secret: ${{ secrets.GHASecretsGPGPassphrase1 }}
  139. signin_secret: ${{ secrets.GHASecretsGPGPassphrase1 }}
  140. runs-on: macos-14
  141. steps:
  142. - uses: actions/checkout@v4
  143. - uses: ruby/setup-ruby@v1
  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: Test swift 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.sh Crashlytics true swift)
  158. env:
  159. LEGACY: true
  160. quickstart-ftl-cron-only:
  161. # Don't run on private repo.
  162. if: github.repository == 'Firebase/firebase-ios-sdk' && github.event_name == 'schedule'
  163. env:
  164. plist_secret: ${{ secrets.GHASecretsGPGPassphrase1 }}
  165. signin_secret: ${{ secrets.GHASecretsGPGPassphrase1 }}
  166. runs-on: macos-14
  167. steps:
  168. - uses: actions/checkout@v4
  169. - uses: ruby/setup-ruby@v1
  170. - uses: actions/setup-python@v5
  171. with:
  172. python-version: '3.11'
  173. - name: Setup quickstart
  174. run: scripts/setup_quickstart.sh crashlytics
  175. env:
  176. LEGACY: true
  177. - name: Install Secret GoogleService-Info.plist
  178. run: scripts/decrypt_gha_secret.sh scripts/gha-encrypted/qs-crashlytics.plist.gpg \
  179. quickstart-ios/crashlytics/GoogleService-Info.plist "$plist_secret"
  180. - name: Build swift quickstart
  181. run: |
  182. mkdir quickstart-ios/crashlytics/LegacyCrashlyticsQuickstart/Pods/FirebaseCrashlytics
  183. # Set the deployed pod location of run and upload-symbols with the development pod version.
  184. cp Crashlytics/run quickstart-ios/crashlytics/LegacyCrashlyticsQuickstart/Pods/FirebaseCrashlytics/
  185. cp Crashlytics/upload-symbols quickstart-ios/crashlytics/LegacyCrashlyticsQuickstart/Pods/FirebaseCrashlytics/
  186. ([ -z $plist_secret ] || scripts/third_party/travis/retry.sh scripts/test_quickstart_ftl.sh Crashlytics swift)
  187. env:
  188. LEGACY: true
  189. - id: ftl_test
  190. uses: FirebaseExtended/github-actions/firebase-test-lab@v1.4
  191. with:
  192. credentials_json: ${{ secrets.FIREBASE_SERVICE_ACCOUNT_CREDENTIALS }}
  193. testapp_dir: quickstart-ios/build-for-testing
  194. test_type: "xctest"
  195. crashlytics-cron-only:
  196. # Don't run on private repo.
  197. if: github.event_name == 'schedule' && github.repository == 'Firebase/firebase-ios-sdk'
  198. runs-on: macos-14
  199. strategy:
  200. matrix:
  201. # Disable watchos because it does not support XCTest.
  202. target: [ios, tvos, macos, watchos --skip-tests]
  203. flags: [
  204. '--use-static-frameworks'
  205. ]
  206. needs: pod-lib-lint
  207. steps:
  208. - uses: actions/checkout@v4
  209. - uses: ruby/setup-ruby@v1
  210. - name: Setup Bundler
  211. run: scripts/setup_bundler.sh
  212. - uses: nick-fields/retry@v3
  213. with:
  214. timeout_minutes: 120
  215. max_attempts: 3
  216. retry_on: error
  217. retry_wait_seconds: 120
  218. command: scripts/third_party/travis/retry.sh scripts/pod_lib_lint.rb FirebaseCrashlytics.podspec --platforms=${{ matrix.target }} ${{ matrix.flags }}