crashlytics.yml 7.0 KB

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