crashlytics.yml 8.3 KB

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