abtesting.yml 4.7 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131
  1. name: abtesting
  2. on:
  3. pull_request:
  4. paths:
  5. - 'FirebaseABTesting**'
  6. - 'Interop/Analytics/Public/*.h'
  7. - '.github/workflows/abtesting.yml'
  8. - 'Gemfile*'
  9. schedule:
  10. # Run every day at 1am(PST) - cron uses UTC times
  11. - cron: '0 9 * * *'
  12. jobs:
  13. pod-lib-lint:
  14. # Don't run on private repo unless it is a PR.
  15. if: (github.repository == 'Firebase/firebase-ios-sdk' && github.event_name == 'schedule') || github.event_name == 'pull_request'
  16. runs-on: macos-11
  17. strategy:
  18. matrix:
  19. target: [ios, tvos, macos, watchos]
  20. steps:
  21. - uses: actions/checkout@v2
  22. - name: Setup Bundler
  23. run: scripts/setup_bundler.sh
  24. - name: Build and test
  25. run: |
  26. scripts/third_party/travis/retry.sh scripts/pod_lib_lint.rb FirebaseABTesting.podspec \
  27. --platforms=${{ matrix.target }}
  28. spm:
  29. # Don't run on private repo unless it is a PR.
  30. if: (github.repository == 'Firebase/firebase-ios-sdk' && github.event_name == 'schedule') || github.event_name == 'pull_request'
  31. runs-on: macos-11
  32. steps:
  33. - uses: actions/checkout@v2
  34. - uses: mikehardy/buildcache-action@50738c6c77de7f34e66b870e4f8ede333b69d077
  35. with:
  36. cache_key: ${{ matrix.os }}
  37. - name: Initialize xcodebuild
  38. run: scripts/setup_spm_tests.sh
  39. - name: iOS Unit Tests
  40. run: scripts/third_party/travis/retry.sh ./scripts/build.sh ABTestingUnit iOS spm
  41. spm-cron:
  42. # Don't run on private repo.
  43. if: github.event_name == 'schedule' && github.repository == 'Firebase/firebase-ios-sdk'
  44. runs-on: macos-11
  45. strategy:
  46. matrix:
  47. target: [tvOS, macOS, catalyst]
  48. steps:
  49. - uses: actions/checkout@v2
  50. - uses: mikehardy/buildcache-action@50738c6c77de7f34e66b870e4f8ede333b69d077
  51. with:
  52. cache_key: ${{ matrix.os }}
  53. - name: Initialize xcodebuild
  54. run: scripts/setup_spm_tests.sh
  55. - name: Unit Tests
  56. run: scripts/third_party/travis/retry.sh ./scripts/build.sh ABTestingUnit ${{ matrix.target }} spm
  57. catalyst:
  58. # Don't run on private repo unless it is a PR.
  59. if: (github.repository == 'Firebase/firebase-ios-sdk' && github.event_name == 'schedule') || github.event_name == 'pull_request'
  60. runs-on: macos-11
  61. steps:
  62. - uses: actions/checkout@v2
  63. - uses: mikehardy/buildcache-action@50738c6c77de7f34e66b870e4f8ede333b69d077
  64. with:
  65. cache_key: ${{ matrix.os }}
  66. - name: Setup Bundler
  67. run: scripts/setup_bundler.sh
  68. - name: Setup project and Build for Catalyst
  69. run: scripts/test_catalyst.sh FirebaseABTesting test FirebaseABTesting-Unit-unit
  70. quickstart:
  71. # Don't run on private repo unless it is a PR.
  72. if: (github.repository == 'Firebase/firebase-ios-sdk' && github.event_name == 'schedule') || github.event_name == 'pull_request'
  73. env:
  74. plist_secret: ${{ secrets.GHASecretsGPGPassphrase1 }}
  75. signin_secret: ${{ secrets.GHASecretsGPGPassphrase1 }}
  76. runs-on: macos-11
  77. steps:
  78. - uses: actions/checkout@v2
  79. - name: Setup quickstart
  80. env:
  81. LEGACY: true
  82. run: scripts/setup_quickstart.sh abtesting
  83. - name: Install Secret GoogleService-Info.plist
  84. run: scripts/decrypt_gha_secret.sh scripts/gha-encrypted/qs-abtesting.plist.gpg \
  85. quickstart-ios/abtesting/GoogleService-Info.plist "$plist_secret"
  86. - name: Test swift quickstart
  87. env:
  88. LEGACY: true
  89. run: ([ -z $plist_secret ] || scripts/third_party/travis/retry.sh scripts/test_quickstart.sh ABTesting true)
  90. abtesting-cron-only:
  91. # Don't run on private repo.
  92. if: github.event_name == 'schedule' && github.repository == 'Firebase/firebase-ios-sdk'
  93. runs-on: macos-11
  94. strategy:
  95. matrix:
  96. target: [ios, tvos, macos]
  97. flags: [
  98. '--use-static-frameworks',
  99. '--use-libraries'
  100. ]
  101. needs: pod-lib-lint
  102. steps:
  103. - uses: actions/checkout@v2
  104. - name: Setup Bundler
  105. run: scripts/setup_bundler.sh
  106. - name: PodLibLint ABTesting Cron
  107. run: |
  108. scripts/third_party/travis/retry.sh scripts/pod_lib_lint.rb \
  109. FirebaseABTesting.podspec --platforms=${{ matrix.target }} ${{ matrix.flags }}
  110. podspec-presubmit:
  111. # Don't run on private repo unless it is a PR.
  112. if: github.repository == 'Firebase/firebase-ios-sdk' && github.event.pull_request.merged != true && github.event.action != 'closed'
  113. runs-on: macos-11
  114. steps:
  115. - uses: actions/checkout@v2
  116. - name: Setup Bundler
  117. run: scripts/setup_bundler.sh
  118. - name: Build and test
  119. run: scripts/third_party/travis/retry.sh pod spec lint FirebaseABTesting.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/'