crashlytics.yml 6.8 KB

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