performance.yml 7.1 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183
  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. quickstart-ftl-cron-only:
  24. if: github.repository == 'Firebase/firebase-ios-sdk'
  25. env:
  26. plist_secret: ${{ secrets.GHASecretsGPGPassphrase1 }}
  27. signin_secret: ${{ secrets.GHASecretsGPGPassphrase1 }}
  28. runs-on: macos-14
  29. steps:
  30. - uses: actions/checkout@v4
  31. - uses: ruby/setup-ruby@v1
  32. - uses: actions/setup-python@v4
  33. with:
  34. python-version: '3.11'
  35. - name: Setup quickstart
  36. run: scripts/setup_quickstart.sh performance
  37. - name: Install Secret GoogleService-Info.plist
  38. run: scripts/decrypt_gha_secret.sh scripts/gha-encrypted/qs-performance.plist.gpg \
  39. quickstart-ios/performance/GoogleService-Info.plist "$plist_secret"
  40. - name: Build swift quickstart
  41. run: ([ -z $plist_secret ] || scripts/third_party/travis/retry.sh scripts/test_quickstart_ftl.sh Performance swift)
  42. # - name: Build objc quickstart
  43. # run: ([ -z $plist_secret ] || scripts/third_party/travis/retry.sh scripts/test_quickstart_ftl.sh Performance)
  44. - id: ftl_test
  45. uses: FirebaseExtended/github-actions/firebase-test-lab@v1.4
  46. with:
  47. credentials_json: ${{ secrets.FIREBASE_SERVICE_ACCOUNT_CREDENTIALS }}
  48. testapp_dir: quickstart-ios/build-for-testing
  49. test_type: "xctest"
  50. #
  51. # # Build and run the unit tests for Firebase performance SDK.
  52. # performance:
  53. # # Don't run on private repo unless it is a PR.
  54. # if: (github.repository == 'Firebase/firebase-ios-sdk') || github.event_name == 'pull_request'
  55. # runs-on: macos-12
  56. # strategy:
  57. # matrix:
  58. # target: [iOS, tvOS]
  59. # test: [unit, proddev]
  60. # steps:
  61. # - uses: actions/checkout@v4
  62. # - uses: mikehardy/buildcache-action@c87cea0ccd718971d6cc39e672c4f26815b6c126
  63. # with:
  64. # cache_key: ${{ matrix.target }}${{ matrix.test }}
  65. # - uses: ruby/setup-ruby@v1
  66. # - name: Setup Bundler
  67. # run: scripts/setup_bundler.sh
  68. # - name: Install xcpretty
  69. # run: gem install xcpretty
  70. # #TODO: Xcode 15 tests are blocked by #11903
  71. # - name: BuildAndTest # can be replaced with pod lib lint with CocoaPods 1.10
  72. # run: scripts/third_party/travis/retry.sh scripts/build.sh Performance ${{ matrix.target }} ${{ matrix.test }}
  73. #
  74. # # Podspec lint check for Firebase Performance
  75. # pod-lib-lint:
  76. # # Don't run on private repo unless it is a PR.
  77. # if: (github.repository == 'Firebase/firebase-ios-sdk' && github.event_name == 'schedule') || github.event_name == 'pull_request'
  78. #
  79. # strategy:
  80. # matrix:
  81. # target: [ios, tvos]
  82. # os: [macos-14, macos-13]
  83. # include:
  84. # - os: macos-14
  85. # xcode: Xcode_15.3
  86. # - os: macos-13
  87. # xcode: Xcode_15.2
  88. # runs-on: ${{ matrix.os }}
  89. # steps:
  90. # - uses: actions/checkout@v4
  91. # - uses: ruby/setup-ruby@v1
  92. # - name: Setup Bundler
  93. # run: scripts/setup_bundler.sh
  94. # - name: Xcode
  95. # run: sudo xcode-select -s /Applications/${{ matrix.xcode }}.app/Contents/Developer
  96. # - name: Build
  97. # #TODO: tests are not supported with Xcode 15 because the test spec depends on the iOS 8 GDCWebServer
  98. # run: scripts/third_party/travis/retry.sh scripts/pod_lib_lint.rb FirebasePerformance.podspec --skip-tests --platforms=${{ matrix.target }}
  99. #
  100. # quickstart:
  101. # if: (github.repository == 'Firebase/firebase-ios-sdk' && github.event_name == 'schedule') || github.event_name == 'pull_request'
  102. #
  103. # env:
  104. # plist_secret: ${{ secrets.GHASecretsGPGPassphrase1 }}
  105. # signin_secret: ${{ secrets.GHASecretsGPGPassphrase1 }}
  106. # runs-on: macos-14
  107. # steps:
  108. # - uses: actions/checkout@v4
  109. # - uses: ruby/setup-ruby@v1
  110. # - name: Setup quickstart
  111. # run: scripts/setup_quickstart.sh performance
  112. # - name: Install Secret GoogleService-Info.plist
  113. # run: scripts/decrypt_gha_secret.sh scripts/gha-encrypted/qs-performance.plist.gpg \
  114. # quickstart-ios/performance/GoogleService-Info.plist "$plist_secret"
  115. # - name: Test swift quickstart
  116. # run: ([ -z $plist_secret ] || scripts/third_party/travis/retry.sh scripts/test_quickstart.sh Performance true swift)
  117. # # TODO: The legacy ObjC quickstarts don't run with Xcode 15, re-able if we get these working.
  118. # # - name: Test objc quickstart
  119. # # run: ([ -z $plist_secret ] || scripts/third_party/travis/retry.sh scripts/test_quickstart.sh Performance true)
  120. #
  121. # spm:
  122. # # Don't run on private repo unless it is a PR.
  123. # if: (github.repository == 'Firebase/firebase-ios-sdk' && github.event_name == 'schedule') || github.event_name == 'pull_request'
  124. # strategy:
  125. # matrix:
  126. # target: [iOS, tvOS]
  127. # include:
  128. # - os: macos-14
  129. # xcode: Xcode_15.3
  130. # - os: macos-13
  131. # xcode: Xcode_15.2
  132. # runs-on: ${{ matrix.os }}
  133. # steps:
  134. # - uses: actions/checkout@v4
  135. # - uses: mikehardy/buildcache-action@c87cea0ccd718971d6cc39e672c4f26815b6c126
  136. # with:
  137. # cache_key: spm${{ matrix.os }}-${{ matrix.xcode }}-${{ matrix.target }}
  138. # - name: Xcode
  139. # run: sudo xcode-select -s /Applications/${{ matrix.xcode }}.app/Contents/Developer
  140. # - name: Initialize xcodebuild
  141. # run: scripts/setup_spm_tests.sh
  142. # - name: Unit Tests
  143. # run: scripts/third_party/travis/retry.sh ./scripts/build.sh PerformanceUnit ${{ matrix.target }} spm
  144. #
  145. # catalyst:
  146. # if: (github.repository == 'Firebase/firebase-ios-sdk' && github.event_name == 'schedule') || github.event_name == 'pull_request'
  147. # runs-on: macos-14
  148. # steps:
  149. # - uses: actions/checkout@v4
  150. # - uses: mikehardy/buildcache-action@c87cea0ccd718971d6cc39e672c4f26815b6c126
  151. # with:
  152. # cache_key: catalyst
  153. # - uses: ruby/setup-ruby@v1
  154. # - name: Setup Bundler
  155. # run: scripts/setup_bundler.sh
  156. # - name: Setup project and Build Catalyst
  157. # run: scripts/test_catalyst.sh FirebasePerformance build
  158. #
  159. # performance-cron-only:
  160. # # Don't run on private repo.
  161. # if: github.event_name == 'schedule' && github.repository == 'Firebase/firebase-ios-sdk'
  162. # runs-on: macos-14
  163. # strategy:
  164. # matrix:
  165. # target: [ios, tvos]
  166. # flags: [
  167. # '--skip-tests --use-static-frameworks'
  168. # ]
  169. # needs: pod-lib-lint
  170. # steps:
  171. # - uses: actions/checkout@v4
  172. # - uses: ruby/setup-ruby@v1
  173. # - name: Setup Bundler
  174. # run: scripts/setup_bundler.sh
  175. # - name: PodLibLint Performance Cron
  176. # run: |
  177. # scripts/third_party/travis/retry.sh scripts/pod_lib_lint.rb FirebasePerformance.podspec --platforms=${{ matrix.target }} ${{ matrix.flags }}