remoteconfig.yml 6.1 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152
  1. name: remoteconfig
  2. on:
  3. pull_request:
  4. paths:
  5. - 'FirebaseRemoteConfig**'
  6. - 'Interop/Analytics/Public/*.h'
  7. - '.github/workflows/remoteconfig.yml'
  8. - 'Gemfile'
  9. - 'scripts/generate_access_token.sh'
  10. schedule:
  11. # Run every day at 12am (PST) - cron uses UTC times
  12. - cron: '0 8 * * *'
  13. jobs:
  14. remoteconfig:
  15. # Don't run on private repo unless it is a PR.
  16. if: (github.repository == 'Firebase/firebase-ios-sdk' && github.event_name == 'schedule') || github.event_name == 'pull_request'
  17. env:
  18. plist_secret: ${{ secrets.GHASecretsGPGPassphrase1 }}
  19. runs-on: macos-latest
  20. strategy:
  21. matrix:
  22. target: [iOS, tvOS, macOS]
  23. steps:
  24. - uses: actions/checkout@v2
  25. - name: Setup Bundler
  26. run: scripts/setup_bundler.sh
  27. - name: Install Secret GoogleService-Info.plist
  28. run: scripts/decrypt_gha_secret.sh scripts/gha-encrypted/RemoteConfigSwiftAPI/GoogleService-Info.plist.gpg \
  29. FirebaseRemoteConfig/Tests/SwiftAPI/GoogleService-Info.plist "$plist_secret"
  30. - name: Generate Access Token for RemoteConfigConsoleAPI in IntegrationTests
  31. if: matrix.target == 'iOS'
  32. run: ([ -z $plist_secret ] || scripts/generate_access_token.sh "$plist_secret" scripts/gha-encrypted/RemoteConfigSwiftAPI/ServiceAccount.json.gpg
  33. FirebaseRemoteConfig/Tests/SwiftAPI/AccessToken.json)
  34. - name: BuildAndUnitTest # can be replaced with pod lib lint with CocoaPods 1.10
  35. run: scripts/third_party/travis/retry.sh scripts/build.sh RemoteConfig ${{ matrix.target }} unit
  36. - name: Fake Console API Tests
  37. run: scripts/third_party/travis/retry.sh scripts/build.sh RemoteConfig iOS fakeconsole
  38. - name: IntegrationTest
  39. if: matrix.target == 'iOS'
  40. run: ([ -z $plist_secret ] || scripts/third_party/travis/retry.sh scripts/build.sh RemoteConfig iOS integration)
  41. pod-lib-lint:
  42. # Don't run on private repo unless it is a PR.
  43. if: (github.repository == 'Firebase/firebase-ios-sdk' && github.event_name == 'schedule') || github.event_name == 'pull_request'
  44. runs-on: macOS-latest
  45. strategy:
  46. matrix:
  47. target: [ios, tvos, macos, watchos]
  48. steps:
  49. - uses: actions/checkout@v2
  50. - name: Setup Bundler
  51. run: scripts/setup_bundler.sh
  52. - name: Build and test
  53. run: |
  54. scripts/third_party/travis/retry.sh scripts/pod_lib_lint.rb FirebaseRemoteConfig.podspec --skip-tests --platforms=${{ matrix.target }}
  55. spm:
  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: Xcode 12
  62. run: sudo xcode-select -s /Applications/Xcode_12.app/Contents/Developer
  63. - name: Initialize xcodebuild
  64. run: xcodebuild -list
  65. - name: iOS Unit Tests
  66. run: scripts/third_party/travis/retry.sh ./scripts/build.sh RemoteConfigUnit iOS spm
  67. spm-cron:
  68. # Don't run on private repo.
  69. if: github.event_name == 'schedule' && github.repository == 'Firebase/firebase-ios-sdk'
  70. runs-on: macOS-latest
  71. strategy:
  72. matrix:
  73. target: [tvOS, macOS, catalyst]
  74. steps:
  75. - uses: actions/checkout@v2
  76. - name: Xcode 12
  77. run: sudo xcode-select -s /Applications/Xcode_12.app/Contents/Developer
  78. - name: Initialize xcodebuild
  79. run: xcodebuild -list
  80. - name: Unit Tests
  81. run: scripts/third_party/travis/retry.sh ./scripts/build.sh RemoteConfigUnit ${{ matrix.target }} spm
  82. catalyst:
  83. # Don't run on private repo unless it is a PR.
  84. if: (github.repository == 'Firebase/firebase-ios-sdk' && github.event_name == 'schedule') || github.event_name == 'pull_request'
  85. runs-on: macOS-latest
  86. steps:
  87. - uses: actions/checkout@v2
  88. - name: Setup Bundler
  89. run: scripts/setup_bundler.sh
  90. - name: Setup project and Build for Catalyst
  91. run: scripts/test_catalyst.sh FirebaseRemoteConfig test FirebaseRemoteConfig-Unit-unit
  92. quickstart:
  93. # Don't run on private repo unless it is a PR.
  94. if: (github.repository == 'Firebase/firebase-ios-sdk' && github.event_name == 'schedule') || github.event_name == 'pull_request'
  95. env:
  96. plist_secret: ${{ secrets.GHASecretsGPGPassphrase1 }}
  97. signin_secret: ${{ secrets.GHASecretsGPGPassphrase1 }}
  98. runs-on: macOS-latest
  99. steps:
  100. - uses: actions/checkout@v2
  101. - name: Setup quickstart
  102. run: scripts/setup_quickstart.sh config
  103. - name: Install Secret GoogleService-Info.plist
  104. run: scripts/decrypt_gha_secret.sh scripts/gha-encrypted/qs-config.plist.gpg \
  105. quickstart-ios/config/GoogleService-Info.plist "$plist_secret"
  106. - name: Install Secret FIREGSignInInfo.h
  107. run: scripts/decrypt_gha_secret.sh scripts/gha-encrypted/FIREGSignInInfo.h.gpg \
  108. quickstart-ios/TestUtils/FIREGSignInInfo.h "$signin_secret"
  109. - name: Test Swift Quickstart
  110. run: ([ -z $plist_secret ] || scripts/third_party/travis/retry.sh scripts/test_quickstart.sh Config)
  111. sample-build-test:
  112. # Don't run on private repo unless it is a PR.
  113. if: (github.repository == 'Firebase/firebase-ios-sdk' && github.event_name == 'schedule') || github.event_name == 'pull_request'
  114. runs-on: macos-latest
  115. steps:
  116. - uses: actions/checkout@v2
  117. - name: Setup Bundler
  118. run: scripts/setup_bundler.sh
  119. - name: Prereqs
  120. run: scripts/install_prereqs.sh RemoteConfigSample iOS
  121. - name: Build
  122. run: scripts/build.sh RemoteConfigSample iOS
  123. remoteconfig-cron-only:
  124. # Don't run on private repo.
  125. if: github.event_name == 'schedule' && github.repository == 'Firebase/firebase-ios-sdk'
  126. runs-on: macos-latest
  127. strategy:
  128. matrix:
  129. target: [ios, tvos, macos]
  130. flags: [
  131. '--skip-tests --use-static-frameworks',
  132. '--skip-tests --use-libraries'
  133. ]
  134. needs: pod-lib-lint
  135. steps:
  136. - uses: actions/checkout@v2
  137. - name: Setup Bundler
  138. run: scripts/setup_bundler.sh
  139. - name: PodLibLint RemoteConfig Cron
  140. run: |
  141. scripts/third_party/travis/retry.sh scripts/pod_lib_lint.rb FirebaseRemoteConfig.podspec --platforms=${{ matrix.target }} ${{ matrix.flags }}