abtesting.yml 3.7 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109
  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-11
  20. strategy:
  21. matrix:
  22. target: [ios, tvos, macos, watchos]
  23. steps:
  24. - uses: actions/checkout@v2
  25. - name: Setup Bundler
  26. run: scripts/setup_bundler.sh
  27. - name: Build and test
  28. run: |
  29. scripts/third_party/travis/retry.sh scripts/pod_lib_lint.rb FirebaseABTesting.podspec \
  30. --platforms=${{ matrix.target }}
  31. spm:
  32. # Don't run on private repo unless it is a PR.
  33. if: (github.repository == 'Firebase/firebase-ios-sdk' && github.event_name == 'schedule') || github.event_name == 'pull_request'
  34. runs-on: macos-11
  35. strategy:
  36. matrix:
  37. target: [iOS, tvOS, macOS, catalyst, watchOS]
  38. steps:
  39. - uses: actions/checkout@v2
  40. - uses: mikehardy/buildcache-action@50738c6c77de7f34e66b870e4f8ede333b69d077
  41. with:
  42. cache_key: ${{ matrix.os }}
  43. - name: Initialize xcodebuild
  44. run: scripts/setup_spm_tests.sh
  45. - name: Unit Tests
  46. run: scripts/third_party/travis/retry.sh ./scripts/build.sh ABTestingUnit ${{ matrix.target }} spm
  47. catalyst:
  48. # Don't run on private repo unless it is a PR.
  49. if: (github.repository == 'Firebase/firebase-ios-sdk' && github.event_name == 'schedule') || github.event_name == 'pull_request'
  50. runs-on: macos-11
  51. steps:
  52. - uses: actions/checkout@v2
  53. - uses: mikehardy/buildcache-action@50738c6c77de7f34e66b870e4f8ede333b69d077
  54. with:
  55. cache_key: ${{ matrix.os }}
  56. - name: Setup Bundler
  57. run: scripts/setup_bundler.sh
  58. - name: Setup project and Build for Catalyst
  59. run: scripts/test_catalyst.sh FirebaseABTesting test FirebaseABTesting-Unit-unit
  60. quickstart:
  61. # Don't run on private repo unless it is a PR.
  62. if: (github.repository == 'Firebase/firebase-ios-sdk' && github.event_name == 'schedule') || github.event_name == 'pull_request'
  63. env:
  64. plist_secret: ${{ secrets.GHASecretsGPGPassphrase1 }}
  65. signin_secret: ${{ secrets.GHASecretsGPGPassphrase1 }}
  66. runs-on: macos-11
  67. steps:
  68. - uses: actions/checkout@v2
  69. - name: Setup quickstart
  70. env:
  71. LEGACY: true
  72. run: scripts/setup_quickstart.sh abtesting
  73. - name: Install Secret GoogleService-Info.plist
  74. run: scripts/decrypt_gha_secret.sh scripts/gha-encrypted/qs-abtesting.plist.gpg \
  75. quickstart-ios/abtesting/GoogleService-Info.plist "$plist_secret"
  76. - name: Test swift quickstart
  77. env:
  78. LEGACY: true
  79. run: ([ -z $plist_secret ] || scripts/third_party/travis/retry.sh scripts/test_quickstart.sh ABTesting true)
  80. abtesting-cron-only:
  81. # Don't run on private repo.
  82. if: github.event_name == 'schedule' && github.repository == 'Firebase/firebase-ios-sdk'
  83. runs-on: macos-11
  84. strategy:
  85. matrix:
  86. target: [ios, tvos, macos]
  87. flags: [
  88. '--use-static-frameworks'
  89. ]
  90. needs: pod-lib-lint
  91. steps:
  92. - uses: actions/checkout@v2
  93. - name: Setup Bundler
  94. run: scripts/setup_bundler.sh
  95. - name: PodLibLint ABTesting Cron
  96. run: |
  97. scripts/third_party/travis/retry.sh scripts/pod_lib_lint.rb \
  98. FirebaseABTesting.podspec --platforms=${{ matrix.target }} ${{ matrix.flags }}