abtesting.yml 3.6 KB

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