performance.yml 6.5 KB

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