abtesting.yml 4.0 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114
  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 7pm (PST) - cron uses UTC times
  11. - cron: '0 3 * * *'
  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-latest
  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-latest
  32. steps:
  33. - uses: actions/checkout@v2
  34. - name: Xcode 12
  35. run: sudo xcode-select -s /Applications/Xcode_12.app/Contents/Developer
  36. - name: Initialize xcodebuild
  37. run: xcodebuild -list
  38. - name: iOS Unit Tests
  39. run: scripts/third_party/travis/retry.sh ./scripts/build.sh ABTestingUnit iOS spm
  40. spm-cron:
  41. # Don't run on private repo.
  42. if: github.event_name == 'schedule' && github.repository == 'Firebase/firebase-ios-sdk'
  43. runs-on: macOS-latest
  44. strategy:
  45. matrix:
  46. target: [tvOS, macOS, catalyst]
  47. steps:
  48. - uses: actions/checkout@v2
  49. - name: Xcode 12
  50. run: sudo xcode-select -s /Applications/Xcode_12.app/Contents/Developer
  51. - name: Initialize xcodebuild
  52. run: xcodebuild -list
  53. - name: Unit Tests
  54. run: scripts/third_party/travis/retry.sh ./scripts/build.sh ABTestingUnit ${{ matrix.target }} spm
  55. catalyst:
  56. # Don't run on private repo unless it is a PR.
  57. if: (github.repository == 'Firebase/firebase-ios-sdk' && github.event_name == 'schedule') || github.event_name == 'pull_request'
  58. runs-on: macOS-latest
  59. steps:
  60. - uses: actions/checkout@v2
  61. - name: Setup Bundler
  62. run: scripts/setup_bundler.sh
  63. - name: Setup project and Build for Catalyst
  64. run: scripts/test_catalyst.sh FirebaseABTesting test FirebaseABTesting-Unit-unit
  65. quickstart:
  66. # Don't run on private repo unless it is a PR.
  67. if: (github.repository == 'Firebase/firebase-ios-sdk' && github.event_name == 'schedule') || github.event_name == 'pull_request'
  68. env:
  69. plist_secret: ${{ secrets.GHASecretsGPGPassphrase1 }}
  70. signin_secret: ${{ secrets.GHASecretsGPGPassphrase1 }}
  71. runs-on: macOS-latest
  72. steps:
  73. - uses: actions/checkout@v2
  74. - name: Setup quickstart
  75. run: scripts/setup_quickstart.sh abtesting
  76. - name: Install Secret GoogleService-Info.plist
  77. run: scripts/decrypt_gha_secret.sh scripts/gha-encrypted/qs-abtesting.plist.gpg \
  78. quickstart-ios/abtesting/GoogleService-Info.plist "$plist_secret"
  79. - name: Install Secret FIREGSignInInfo.h
  80. run: scripts/decrypt_gha_secret.sh scripts/gha-encrypted/FIREGSignInInfo.h.gpg \
  81. quickstart-ios/TestUtils/FIREGSignInInfo.h "$signin_secret"
  82. - name: Test swift quickstart
  83. run: ([ -z $plist_secret ] || scripts/third_party/travis/retry.sh scripts/test_quickstart.sh ABTesting)
  84. abtesting-cron-only:
  85. # Don't run on private repo.
  86. if: github.event_name == 'schedule' && github.repository == 'Firebase/firebase-ios-sdk'
  87. runs-on: macos-latest
  88. strategy:
  89. matrix:
  90. target: [ios, tvos, macos]
  91. flags: [
  92. '--use-static-frameworks',
  93. '--use-libraries'
  94. ]
  95. needs: pod-lib-lint
  96. steps:
  97. - uses: actions/checkout@v2
  98. - name: Setup Bundler
  99. run: scripts/setup_bundler.sh
  100. - name: PodLibLint ABTesting Cron
  101. run: |
  102. scripts/third_party/travis/retry.sh scripts/pod_lib_lint.rb \
  103. FirebaseABTesting.podspec --platforms=${{ matrix.target }} ${{ matrix.flags }}