performance.yml 5.5 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144
  1. # Merge the yml file to master 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. jobs:
  20. # Build and run the unit tests for Firebase performance SDK.
  21. performance:
  22. # Don't run on private repo unless it is a PR.
  23. if: (github.repository == 'Firebase/firebase-ios-sdk' && github.event_name == 'schedule') || github.event_name == 'pull_request'
  24. runs-on: macos-11
  25. strategy:
  26. matrix:
  27. target: [iOS, tvOS]
  28. test: [unit, proddev]
  29. steps:
  30. - uses: actions/checkout@v2
  31. - name: Setup Bundler
  32. run: scripts/setup_bundler.sh
  33. - name: BuildAndTest # can be replaced with pod lib lint with CocoaPods 1.10
  34. run: scripts/third_party/travis/retry.sh scripts/build.sh Performance ${{ matrix.target }} ${{ matrix.test }}
  35. # Podspec lint check for Firebase Performance
  36. pod-lib-lint:
  37. # Don't run on private repo unless it is a PR.
  38. if: (github.repository == 'Firebase/firebase-ios-sdk' && github.event_name == 'schedule') || github.event_name == 'pull_request'
  39. runs-on: macos-11
  40. strategy:
  41. matrix:
  42. target: [ios, tvos]
  43. steps:
  44. - uses: actions/checkout@v2
  45. - name: Setup Bundler
  46. run: scripts/setup_bundler.sh
  47. - name: Build
  48. run: scripts/third_party/travis/retry.sh scripts/pod_lib_lint.rb FirebasePerformance.podspec --skip-tests --platforms=${{ matrix.target }}
  49. quickstart:
  50. if: (github.repository == 'Firebase/firebase-ios-sdk' && github.event_name == 'schedule') || github.event_name == 'pull_request'
  51. env:
  52. plist_secret: ${{ secrets.GHASecretsGPGPassphrase1 }}
  53. signin_secret: ${{ secrets.GHASecretsGPGPassphrase1 }}
  54. runs-on: macos-11
  55. steps:
  56. - uses: actions/checkout@v2
  57. - name: Setup quickstart
  58. run: scripts/setup_quickstart.sh performance
  59. - name: Install Secret GoogleService-Info.plist
  60. run: scripts/decrypt_gha_secret.sh scripts/gha-encrypted/qs-performance.plist.gpg \
  61. quickstart-ios/performance/GoogleService-Info.plist "$plist_secret"
  62. - name: Install Secret FIREGSignInInfo.h
  63. run: scripts/decrypt_gha_secret.sh scripts/gha-encrypted/FIREGSignInInfo.h.gpg \
  64. quickstart-ios/TestUtils/FIREGSignInInfo.h "$signin_secret"
  65. - name: Test swift quickstart
  66. run: ([ -z $plist_secret ] || scripts/third_party/travis/retry.sh scripts/test_quickstart.sh Performance true)
  67. - name: Test objc quickstart
  68. run: ([ -z $plist_secret ] || scripts/third_party/travis/retry.sh scripts/test_quickstart.sh Performance true)
  69. spm:
  70. # Don't run on private repo unless it is a PR.
  71. if: (github.repository == 'Firebase/firebase-ios-sdk' && github.event_name == 'schedule') || github.event_name == 'pull_request'
  72. runs-on: macos-11
  73. strategy:
  74. matrix:
  75. target: [iOS]
  76. steps:
  77. - uses: actions/checkout@v2
  78. - name: Initialize xcodebuild
  79. run: scripts/setup_spm_tests.sh
  80. - name: Unit Tests
  81. run: scripts/third_party/travis/retry.sh ./scripts/build.sh PerformanceUnit ${{ matrix.target }} spm
  82. spm-cron:
  83. # Don't run on private repo.
  84. if: github.event_name == 'schedule' && github.repository == 'Firebase/firebase-ios-sdk'
  85. runs-on: macos-11
  86. strategy:
  87. matrix:
  88. target: [tvOS]
  89. steps:
  90. - uses: actions/checkout@v2
  91. - name: Initialize xcodebuild
  92. run: scripts/setup_spm_tests.sh
  93. - name: Unit Tests
  94. run: scripts/third_party/travis/retry.sh ./scripts/build.sh PerformanceUnit ${{ matrix.target }} spm
  95. catalyst:
  96. if: (github.repository == 'Firebase/firebase-ios-sdk' && github.event_name == 'schedule') || github.event_name == 'pull_request'
  97. runs-on: macos-11
  98. steps:
  99. - uses: actions/checkout@v2
  100. - name: Setup Bundler
  101. run: scripts/setup_bundler.sh
  102. - name: Setup project and Build Catalyst
  103. run: scripts/test_catalyst.sh FirebasePerformance build
  104. podspec-presubmit:
  105. # Don't run on private repo unless it is a PR.
  106. if: github.repository == 'Firebase/firebase-ios-sdk' && github.event.pull_request.merged != true && github.event.action != 'closed'
  107. runs-on: macos-11
  108. steps:
  109. - uses: actions/checkout@v2
  110. - name: Setup Bundler
  111. run: scripts/setup_bundler.sh
  112. - name: Build and test
  113. run: scripts/third_party/travis/retry.sh pod spec lint FirebasePerformance.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/'
  114. performance-cron-only:
  115. # Don't run on private repo.
  116. if: github.event_name == 'schedule' && github.repository == 'Firebase/firebase-ios-sdk'
  117. runs-on: macos-11
  118. strategy:
  119. matrix:
  120. target: [ios, tvos]
  121. flags: [
  122. '--skip-tests --use-static-frameworks',
  123. '--skip-tests --use-libraries'
  124. ]
  125. needs: pod-lib-lint
  126. steps:
  127. - uses: actions/checkout@v2
  128. - name: Setup Bundler
  129. run: scripts/setup_bundler.sh
  130. - name: PodLibLint Performance Cron
  131. run: |
  132. scripts/third_party/travis/retry.sh scripts/pod_lib_lint.rb FirebasePerformance.podspec --platforms=${{ matrix.target }} ${{ matrix.flags }}