crashlytics.yml 6.2 KB

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