performance.yml 7.0 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182
  1. # Merge the yml file to main branch for the cron job schedule to be effective.
  2. # Reference: https://github.community/t/on-schedule-per-branch/17525
  3. name: performance
  4. on:
  5. pull_request:
  6. paths:
  7. # Performance sources
  8. - 'FirebasePerformance/**'
  9. # Podspec
  10. - 'FirebasePerformance.podspec'
  11. # YML configuration file
  12. - '.github/workflows/performance.yml'
  13. # Rebuild on Ruby infrastructure changes
  14. - 'Gemfile*'
  15. schedule:
  16. # Run every day at 11pm (PST) - cron uses UTC times
  17. # Specified in format 'minutes hours day month dayofweek'
  18. - cron: '0 7 * * *'
  19. concurrency:
  20. group: ${{ github.workflow }}-${{ github.head_ref || github.ref }}
  21. cancel-in-progress: true
  22. jobs:
  23. # Build and run the unit tests for Firebase performance SDK.
  24. performance:
  25. # Don't run on private repo unless it is a PR.
  26. if: (github.repository == 'Firebase/firebase-ios-sdk' && github.event_name == 'schedule') || github.event_name == 'pull_request'
  27. runs-on: macos-12
  28. strategy:
  29. matrix:
  30. target: [iOS, tvOS]
  31. test: [unit, proddev]
  32. steps:
  33. - uses: actions/checkout@v4
  34. - uses: mikehardy/buildcache-action@c87cea0ccd718971d6cc39e672c4f26815b6c126
  35. with:
  36. cache_key: ${{ matrix.target }}${{ matrix.test }}
  37. - uses: ruby/setup-ruby@v1
  38. - name: Setup Bundler
  39. run: scripts/setup_bundler.sh
  40. - name: Install xcpretty
  41. run: gem install xcpretty
  42. #TODO: Xcode 15 tests are blocked by #11903
  43. - name: BuildAndTest # can be replaced with pod lib lint with CocoaPods 1.10
  44. run: scripts/third_party/travis/retry.sh scripts/build.sh Performance ${{ matrix.target }} ${{ matrix.test }}
  45. # Podspec lint check for Firebase Performance
  46. pod-lib-lint:
  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]
  52. os: [macos-14, macos-13]
  53. include:
  54. - os: macos-14
  55. xcode: Xcode_15.3
  56. - os: macos-13
  57. xcode: Xcode_15.2
  58. runs-on: ${{ matrix.os }}
  59. steps:
  60. - uses: actions/checkout@v4
  61. - uses: ruby/setup-ruby@v1
  62. - name: Setup Bundler
  63. run: scripts/setup_bundler.sh
  64. - name: Xcode
  65. run: sudo xcode-select -s /Applications/${{ matrix.xcode }}.app/Contents/Developer
  66. - name: Build
  67. #TODO: tests are not supported with Xcode 15 because the test spec depends on the iOS 8 GDCWebServer
  68. run: scripts/third_party/travis/retry.sh scripts/pod_lib_lint.rb FirebasePerformance.podspec --skip-tests --platforms=${{ matrix.target }}
  69. quickstart:
  70. if: (github.repository == 'Firebase/firebase-ios-sdk' && github.event_name == 'schedule') || github.event_name == 'pull_request'
  71. env:
  72. plist_secret: ${{ secrets.GHASecretsGPGPassphrase1 }}
  73. signin_secret: ${{ secrets.GHASecretsGPGPassphrase1 }}
  74. runs-on: macos-14
  75. steps:
  76. - uses: actions/checkout@v4
  77. - uses: ruby/setup-ruby@v1
  78. - name: Setup quickstart
  79. run: scripts/setup_quickstart.sh performance
  80. - name: Install Secret GoogleService-Info.plist
  81. run: scripts/decrypt_gha_secret.sh scripts/gha-encrypted/qs-performance.plist.gpg \
  82. quickstart-ios/performance/GoogleService-Info.plist "$plist_secret"
  83. - name: Test swift quickstart
  84. run: ([ -z $plist_secret ] || scripts/third_party/travis/retry.sh scripts/test_quickstart.sh Performance true swift)
  85. # TODO: The legacy ObjC quickstarts don't run with Xcode 15, re-able if we get these working.
  86. # - name: Test objc quickstart
  87. # run: ([ -z $plist_secret ] || scripts/third_party/travis/retry.sh scripts/test_quickstart.sh Performance true)
  88. quickstart-ftl-cron-only:
  89. if: github.repository == 'Firebase/firebase-ios-sdk' && github.event_name == 'schedule'
  90. env:
  91. plist_secret: ${{ secrets.GHASecretsGPGPassphrase1 }}
  92. signin_secret: ${{ secrets.GHASecretsGPGPassphrase1 }}
  93. runs-on: macos-14
  94. steps:
  95. - uses: actions/checkout@v4
  96. - uses: ruby/setup-ruby@v1
  97. - uses: actions/setup-python@v4
  98. with:
  99. python-version: '3.11'
  100. - name: Setup quickstart
  101. run: scripts/setup_quickstart.sh performance
  102. - name: Install Secret GoogleService-Info.plist
  103. run: scripts/decrypt_gha_secret.sh scripts/gha-encrypted/qs-performance.plist.gpg \
  104. quickstart-ios/performance/GoogleService-Info.plist "$plist_secret"
  105. - name: Build swift quickstart
  106. run: ([ -z $plist_secret ] || scripts/third_party/travis/retry.sh scripts/test_quickstart_ftl.sh Performance swift)
  107. # - name: Build objc quickstart
  108. # run: ([ -z $plist_secret ] || scripts/third_party/travis/retry.sh scripts/test_quickstart_ftl.sh Performance)
  109. - id: ftl_test
  110. uses: FirebaseExtended/github-actions/firebase-test-lab@v1.4
  111. with:
  112. credentials_json: ${{ secrets.FIREBASE_SERVICE_ACCOUNT_CREDENTIALS }}
  113. testapp_dir: quickstart-ios/build-for-testing
  114. test_type: "xctest"
  115. spm:
  116. # Don't run on private repo unless it is a PR.
  117. if: (github.repository == 'Firebase/firebase-ios-sdk' && github.event_name == 'schedule') || github.event_name == 'pull_request'
  118. strategy:
  119. matrix:
  120. target: [iOS, tvOS]
  121. include:
  122. - os: macos-14
  123. xcode: Xcode_15.3
  124. - os: macos-13
  125. xcode: Xcode_15.2
  126. runs-on: ${{ matrix.os }}
  127. steps:
  128. - uses: actions/checkout@v4
  129. - uses: mikehardy/buildcache-action@c87cea0ccd718971d6cc39e672c4f26815b6c126
  130. with:
  131. cache_key: spm${{ matrix.os }}-${{ matrix.xcode }}-${{ matrix.target }}
  132. - name: Xcode
  133. run: sudo xcode-select -s /Applications/${{ matrix.xcode }}.app/Contents/Developer
  134. - name: Initialize xcodebuild
  135. run: scripts/setup_spm_tests.sh
  136. - name: Unit Tests
  137. run: scripts/third_party/travis/retry.sh ./scripts/build.sh PerformanceUnit ${{ matrix.target }} spm
  138. catalyst:
  139. if: (github.repository == 'Firebase/firebase-ios-sdk' && github.event_name == 'schedule') || github.event_name == 'pull_request'
  140. runs-on: macos-14
  141. steps:
  142. - uses: actions/checkout@v4
  143. - uses: mikehardy/buildcache-action@c87cea0ccd718971d6cc39e672c4f26815b6c126
  144. with:
  145. cache_key: catalyst
  146. - uses: ruby/setup-ruby@v1
  147. - name: Setup Bundler
  148. run: scripts/setup_bundler.sh
  149. - name: Setup project and Build Catalyst
  150. run: scripts/test_catalyst.sh FirebasePerformance build
  151. performance-cron-only:
  152. # Don't run on private repo.
  153. if: github.event_name == 'schedule' && github.repository == 'Firebase/firebase-ios-sdk'
  154. runs-on: macos-14
  155. strategy:
  156. matrix:
  157. target: [ios, tvos]
  158. flags: [
  159. '--skip-tests --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 Performance Cron
  168. run: |
  169. scripts/third_party/travis/retry.sh scripts/pod_lib_lint.rb FirebasePerformance.podspec --platforms=${{ matrix.target }} ${{ matrix.flags }}