crashlytics.yml 5.4 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142
  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. jobs:
  14. pod-lib-lint:
  15. # Don't run on private repo unless it is a PR.
  16. if: (github.repository == 'Firebase/firebase-ios-sdk' && github.event_name == 'schedule') || github.event_name == 'pull_request'
  17. runs-on: macos-11
  18. strategy:
  19. matrix:
  20. target: [ios, tvos, macos, watchos --skip-tests]
  21. steps:
  22. - uses: actions/checkout@v2
  23. - name: Setup Bundler
  24. run: scripts/setup_bundler.sh
  25. - name: Build and test
  26. run: |
  27. scripts/third_party/travis/retry.sh scripts/pod_lib_lint.rb FirebaseCrashlytics.podspec --platforms=${{ matrix.target }}
  28. spm:
  29. # Don't run on private repo unless it is a PR.
  30. if: (github.repository == 'Firebase/firebase-ios-sdk' && github.event_name == 'schedule') || github.event_name == 'pull_request'
  31. runs-on: macos-11
  32. steps:
  33. - uses: actions/checkout@v2
  34. - uses: mikehardy/buildcache-action@50738c6c77de7f34e66b870e4f8ede333b69d077
  35. with:
  36. cache_key: ${{ matrix.os }}
  37. - name: Initialize xcodebuild
  38. run: scripts/setup_spm_tests.sh
  39. - name: iOS Unit Tests
  40. run: scripts/third_party/travis/retry.sh ./scripts/build.sh FirebaseCrashlytics iOS spmbuildonly
  41. spm-cron:
  42. # Don't run on private repo.
  43. if: github.event_name == 'schedule' && github.repository == 'Firebase/firebase-ios-sdk'
  44. runs-on: macos-11
  45. strategy:
  46. matrix:
  47. target: [tvOS, macOS, catalyst]
  48. steps:
  49. - uses: actions/checkout@v2
  50. - uses: mikehardy/buildcache-action@50738c6c77de7f34e66b870e4f8ede333b69d077
  51. with:
  52. cache_key: ${{ matrix.os }}
  53. - name: Initialize xcodebuild
  54. run: scripts/setup_spm_tests.sh
  55. - name: Unit Tests
  56. run: scripts/third_party/travis/retry.sh ./scripts/build.sh FirebaseCrashlytics ${{ matrix.target }} spmbuildonly
  57. catalyst:
  58. # Don't run on private repo unless it is a PR.
  59. if: (github.repository == 'Firebase/firebase-ios-sdk' && github.event_name == 'schedule') || github.event_name == 'pull_request'
  60. runs-on: macos-11
  61. steps:
  62. - uses: actions/checkout@v2
  63. - uses: mikehardy/buildcache-action@50738c6c77de7f34e66b870e4f8ede333b69d077
  64. with:
  65. cache_key: ${{ matrix.os }}
  66. - name: Setup Bundler
  67. run: scripts/setup_bundler.sh
  68. - name: Setup project and Build for Catalyst
  69. run: scripts/test_catalyst.sh FirebaseCrashlytics test FirebaseCrashlytics-Unit-unit
  70. quickstart:
  71. # Don't run on private repo unless it is a PR.
  72. if: (github.repository == 'Firebase/firebase-ios-sdk' && github.event_name == 'schedule') || github.event_name == 'pull_request'
  73. env:
  74. plist_secret: ${{ secrets.GHASecretsGPGPassphrase1 }}
  75. signin_secret: ${{ secrets.GHASecretsGPGPassphrase1 }}
  76. runs-on: macos-11
  77. steps:
  78. - uses: actions/checkout@v2
  79. - name: Setup quickstart
  80. run: scripts/setup_quickstart.sh crashlytics
  81. env:
  82. LEGACY: true
  83. - name: Install Secret GoogleService-Info.plist
  84. run: scripts/decrypt_gha_secret.sh scripts/gha-encrypted/qs-crashlytics.plist.gpg \
  85. quickstart-ios/crashlytics/GoogleService-Info.plist "$plist_secret"
  86. - name: Test objc quickstart
  87. run: |
  88. mkdir quickstart-ios/crashlytics/LegacyCrashlyticsQuickstart/Pods/FirebaseCrashlytics
  89. # Set the deployed pod location of run and upload-symbols with the development pod version.
  90. cp Crashlytics/run quickstart-ios/crashlytics/LegacyCrashlyticsQuickstart/Pods/FirebaseCrashlytics/
  91. cp Crashlytics/upload-symbols quickstart-ios/crashlytics/LegacyCrashlyticsQuickstart/Pods/FirebaseCrashlytics/
  92. ([ -z $plist_secret ] || scripts/third_party/travis/retry.sh scripts/test_quickstart.sh Crashlytics true)
  93. env:
  94. LEGACY: true
  95. - name: Test swift quickstart
  96. run: ([ -z $plist_secret ] || scripts/third_party/travis/retry.sh scripts/test_quickstart.sh Crashlytics true swift)
  97. env:
  98. LEGACY: true
  99. crashlytics-cron-only:
  100. # Don't run on private repo.
  101. if: github.event_name == 'schedule' && github.repository == 'Firebase/firebase-ios-sdk'
  102. runs-on: macos-11
  103. strategy:
  104. matrix:
  105. # Disable watchos because it does not support XCTest.
  106. target: [ios, tvos, macos, watchos --skip-tests]
  107. flags: [
  108. '--use-static-frameworks',
  109. '--use-libraries'
  110. ]
  111. needs: pod-lib-lint
  112. steps:
  113. - uses: actions/checkout@v2
  114. - name: Setup Bundler
  115. run: scripts/setup_bundler.sh
  116. - name: PodLibLint Auth Cron
  117. run: scripts/third_party/travis/retry.sh scripts/pod_lib_lint.rb FirebaseCrashlytics.podspec --platforms=${{ matrix.target }} ${{ matrix.flags }}
  118. podspec-presubmit:
  119. # Don't run on private repo unless it is a PR.
  120. if: github.repository == 'Firebase/firebase-ios-sdk' && github.event.pull_request.merged != true && github.event.action != 'closed'
  121. runs-on: macos-11
  122. steps:
  123. - uses: actions/checkout@v2
  124. - name: Setup Bundler
  125. run: scripts/setup_bundler.sh
  126. - name: Build and test
  127. run: scripts/third_party/travis/retry.sh pod spec lint FirebaseCrashlytics.podspec --skip-tests --sources='https://github.com/firebase/SpecsTesting','https://github.com/firebase/SpecsDev.git','https://github.com/firebase/SpecsStaging.git','https://cdn.cocoapods.org/'