abtesting.yml 4.1 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122
  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. concurrency:
  13. group: ${{ github.workflow }}-${{ github.head_ref || github.ref }}
  14. cancel-in-progress: true
  15. jobs:
  16. pod-lib-lint:
  17. # Don't run on private repo unless it is a PR.
  18. if: (github.repository == 'Firebase/firebase-ios-sdk' && github.event_name == 'schedule') || github.event_name == 'pull_request'
  19. runs-on: macos-12
  20. strategy:
  21. matrix:
  22. target: [ios, tvos, macos, watchos]
  23. steps:
  24. - uses: actions/checkout@v2
  25. - uses: ruby/setup-ruby@359bebbc29cbe6c87da6bc9ea3bc930432750108
  26. with:
  27. ruby-version: '2.7'
  28. - name: Setup Bundler
  29. run: scripts/setup_bundler.sh
  30. - name: Build and test
  31. run: |
  32. scripts/third_party/travis/retry.sh scripts/pod_lib_lint.rb FirebaseABTesting.podspec \
  33. --platforms=${{ matrix.target }}
  34. spm:
  35. # Don't run on private repo unless it is a PR.
  36. if: (github.repository == 'Firebase/firebase-ios-sdk' && github.event_name == 'schedule') || github.event_name == 'pull_request'
  37. runs-on: macos-12
  38. strategy:
  39. matrix:
  40. target: [iOS, tvOS, macOS, catalyst, watchOS]
  41. steps:
  42. - uses: actions/checkout@v2
  43. - uses: mikehardy/buildcache-action@50738c6c77de7f34e66b870e4f8ede333b69d077
  44. with:
  45. cache_key: ${{ matrix.os }}
  46. - name: Initialize xcodebuild
  47. run: scripts/setup_spm_tests.sh
  48. - name: Unit Tests
  49. run: scripts/third_party/travis/retry.sh ./scripts/build.sh ABTestingUnit ${{ matrix.target }} spm
  50. catalyst:
  51. # Don't run on private repo unless it is a PR.
  52. if: (github.repository == 'Firebase/firebase-ios-sdk' && github.event_name == 'schedule') || github.event_name == 'pull_request'
  53. runs-on: macos-12
  54. steps:
  55. - uses: actions/checkout@v2
  56. - uses: mikehardy/buildcache-action@50738c6c77de7f34e66b870e4f8ede333b69d077
  57. with:
  58. cache_key: ${{ matrix.os }}
  59. - uses: ruby/setup-ruby@359bebbc29cbe6c87da6bc9ea3bc930432750108
  60. with:
  61. ruby-version: '2.7'
  62. - name: Setup Bundler
  63. run: scripts/setup_bundler.sh
  64. - name: Setup project and Build for Catalyst
  65. run: scripts/test_catalyst.sh FirebaseABTesting test FirebaseABTesting-Unit-unit
  66. quickstart:
  67. # Don't run on private repo unless it is a PR.
  68. if: (github.repository == 'Firebase/firebase-ios-sdk' && github.event_name == 'schedule') || github.event_name == 'pull_request'
  69. env:
  70. plist_secret: ${{ secrets.GHASecretsGPGPassphrase1 }}
  71. signin_secret: ${{ secrets.GHASecretsGPGPassphrase1 }}
  72. runs-on: macos-12
  73. steps:
  74. - uses: actions/checkout@v2
  75. - uses: actions/checkout@v2
  76. - uses: ruby/setup-ruby@359bebbc29cbe6c87da6bc9ea3bc930432750108
  77. with:
  78. ruby-version: '2.7'
  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-12
  94. strategy:
  95. matrix:
  96. target: [ios, tvos, macos]
  97. flags: [
  98. '--use-static-frameworks'
  99. ]
  100. needs: pod-lib-lint
  101. steps:
  102. - uses: actions/checkout@v2
  103. - uses: ruby/setup-ruby@359bebbc29cbe6c87da6bc9ea3bc930432750108
  104. with:
  105. ruby-version: '2.7'
  106. - name: Setup Bundler
  107. run: scripts/setup_bundler.sh
  108. - name: PodLibLint ABTesting Cron
  109. run: |
  110. scripts/third_party/travis/retry.sh scripts/pod_lib_lint.rb \
  111. FirebaseABTesting.podspec --platforms=${{ matrix.target }} ${{ matrix.flags }}