abtesting.yml 5.0 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150
  1. name: abtesting
  2. on:
  3. workflow_dispatch:
  4. pull_request:
  5. paths:
  6. - 'FirebaseABTesting**'
  7. - 'Interop/Analytics/Public/*.h'
  8. - '.github/workflows/abtesting.yml'
  9. - 'Gemfile*'
  10. schedule:
  11. # Run every day at 1am(PST) - cron uses UTC times
  12. - cron: '0 9 * * *'
  13. concurrency:
  14. group: ${{ github.workflow }}-${{ github.head_ref || github.ref }}
  15. cancel-in-progress: true
  16. jobs:
  17. spm:
  18. uses: ./.github/workflows/common.yml
  19. with:
  20. target: ABTestingUnit
  21. catalyst:
  22. uses: ./.github/workflows/common_catalyst.yml
  23. with:
  24. product: FirebaseABTesting
  25. target: FirebaseABTesting-Unit-unit
  26. pod-lib-lint:
  27. # Don't run on private repo unless it is a PR.
  28. if: (github.repository == 'Firebase/firebase-ios-sdk' && github.event_name == 'schedule') || github.event_name == 'pull_request'
  29. strategy:
  30. matrix:
  31. include:
  32. - os: macos-14
  33. xcode: Xcode_16.2
  34. target: ios
  35. - os: macos-15
  36. xcode: Xcode_16.2
  37. target: ios
  38. - os: macos-15
  39. xcode: Xcode_16.2
  40. target: tvos
  41. - os: macos-15
  42. xcode: Xcode_16.2
  43. target: macos
  44. - os: macos-15
  45. xcode: Xcode_16.2
  46. target: watchos
  47. runs-on: ${{ matrix.os }}
  48. steps:
  49. - uses: actions/checkout@v4
  50. - uses: ruby/setup-ruby@354a1ad156761f5ee2b7b13fa8e09943a5e8d252 # v1
  51. - name: Setup Bundler
  52. run: scripts/setup_bundler.sh
  53. - name: Xcode
  54. run: sudo xcode-select -s /Applications/${{ matrix.xcode }}.app/Contents/Developer
  55. - uses: nick-fields/retry@ce71cc2ab81d554ebbe88c79ab5975992d79ba08 # v3
  56. with:
  57. timeout_minutes: 120
  58. max_attempts: 3
  59. retry_on: error
  60. retry_wait_seconds: 120
  61. command: scripts/pod_lib_lint.rb FirebaseABTesting.podspec --platforms=${{ matrix.target }}
  62. quickstart:
  63. # Don't run on private repo unless it is a PR.
  64. if: (github.repository == 'Firebase/firebase-ios-sdk' && github.event_name == 'schedule') || github.event_name == 'pull_request'
  65. env:
  66. plist_secret: ${{ secrets.GHASecretsGPGPassphrase1 }}
  67. signin_secret: ${{ secrets.GHASecretsGPGPassphrase1 }}
  68. runs-on: macos-15
  69. steps:
  70. - uses: actions/checkout@v4
  71. - uses: ruby/setup-ruby@354a1ad156761f5ee2b7b13fa8e09943a5e8d252 # v1
  72. - name: Xcode
  73. run: sudo xcode-select -s /Applications/Xcode_16.2.app/Contents/Developer
  74. - name: Setup quickstart
  75. env:
  76. LEGACY: true
  77. run: scripts/setup_quickstart.sh abtesting
  78. - name: Install Secret GoogleService-Info.plist
  79. run: scripts/decrypt_gha_secret.sh scripts/gha-encrypted/qs-abtesting.plist.gpg \
  80. quickstart-ios/abtesting/GoogleService-Info.plist "$plist_secret"
  81. - name: Test swift quickstart
  82. env:
  83. LEGACY: true
  84. run: ([ -z $plist_secret ] || scripts/third_party/travis/retry.sh scripts/test_quickstart.sh ABTesting true)
  85. quickstart-ftl-cron-only:
  86. # Don't run on private repo.
  87. if: github.repository == 'Firebase/firebase-ios-sdk' && github.event_name == 'schedule'
  88. env:
  89. plist_secret: ${{ secrets.GHASecretsGPGPassphrase1 }}
  90. signin_secret: ${{ secrets.GHASecretsGPGPassphrase1 }}
  91. runs-on: macos-15
  92. steps:
  93. - uses: actions/checkout@v4
  94. - uses: ruby/setup-ruby@354a1ad156761f5ee2b7b13fa8e09943a5e8d252 # v1
  95. - uses: actions/setup-python@v5
  96. with:
  97. python-version: '3.11'
  98. - name: Setup quickstart
  99. env:
  100. LEGACY: true
  101. run: scripts/setup_quickstart.sh abtesting
  102. - name: Install Secret GoogleService-Info.plist
  103. run: scripts/decrypt_gha_secret.sh scripts/gha-encrypted/qs-abtesting.plist.gpg \
  104. quickstart-ios/abtesting/GoogleService-Info.plist "$plist_secret"
  105. - name: Xcode
  106. run: sudo xcode-select -s /Applications/Xcode_16.2.app/Contents/Developer
  107. - name: Build swift quickstart
  108. env:
  109. LEGACY: true
  110. run: ([ -z $plist_secret ] || scripts/third_party/travis/retry.sh scripts/test_quickstart_ftl.sh ABTesting)
  111. - id: ftl_test
  112. uses: FirebaseExtended/github-actions/firebase-test-lab@v1.4
  113. with:
  114. credentials_json: ${{ secrets.FIREBASE_SERVICE_ACCOUNT_CREDENTIALS }}
  115. testapp_dir: quickstart-ios/build-for-testing
  116. test_type: "xctest"
  117. abtesting-cron-only:
  118. # Don't run on private repo.
  119. if: github.event_name == 'schedule' && github.repository == 'Firebase/firebase-ios-sdk'
  120. runs-on: macos-15
  121. strategy:
  122. matrix:
  123. target: [ios, tvos, macos]
  124. flags: [
  125. '--use-static-frameworks'
  126. ]
  127. needs: pod-lib-lint
  128. steps:
  129. - uses: actions/checkout@v4
  130. - uses: ruby/setup-ruby@354a1ad156761f5ee2b7b13fa8e09943a5e8d252 # v1
  131. - name: Setup Bundler
  132. run: scripts/setup_bundler.sh
  133. - name: Xcode
  134. run: sudo xcode-select -s /Applications/Xcode_16.2.app/Contents/Developer
  135. - name: PodLibLint ABTesting Cron
  136. run: |
  137. scripts/third_party/travis/retry.sh scripts/pod_lib_lint.rb \
  138. FirebaseABTesting.podspec --platforms=${{ matrix.target }} ${{ matrix.flags }}