crashlytics.yml 7.3 KB

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