remoteconfig.yml 7.5 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185
  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. - 'scripts/gha-encrypted/RemoteConfigSwiftAPI/**'
  11. schedule:
  12. # Run every day at 12am (PST) - cron uses UTC times
  13. - cron: '0 8 * * *'
  14. concurrency:
  15. group: ${{ github.workflow }}-${{ github.head_ref || github.ref }}
  16. cancel-in-progress: true
  17. jobs:
  18. remoteconfig:
  19. # Don't run on private repo unless it is a PR.
  20. if: (github.repository == 'Firebase/firebase-ios-sdk' && github.event_name == 'schedule') || github.event_name == 'pull_request'
  21. env:
  22. plist_secret: ${{ secrets.GHASecretsGPGPassphrase1 }}
  23. runs-on: macos-12
  24. strategy:
  25. matrix:
  26. target: [iOS, tvOS, macOS]
  27. steps:
  28. - uses: actions/checkout@v3
  29. - uses: mikehardy/buildcache-action@c87cea0ccd718971d6cc39e672c4f26815b6c126
  30. with:
  31. cache_key: ${{ matrix.os }}
  32. - uses: ruby/setup-ruby@v1
  33. - name: Setup Bundler
  34. run: scripts/setup_bundler.sh
  35. - name: Install xcpretty
  36. run: gem install xcpretty
  37. - name: Install Secret GoogleService-Info.plist
  38. run: scripts/decrypt_gha_secret.sh scripts/gha-encrypted/RemoteConfigSwiftAPI/GoogleService-Info.plist.gpg \
  39. FirebaseRemoteConfigSwift/Tests/SwiftAPI/GoogleService-Info.plist "$plist_secret"
  40. - name: Generate Access Token for RemoteConfigConsoleAPI in IntegrationTests
  41. if: matrix.target == 'iOS'
  42. run: ([ -z $plist_secret ] || scripts/generate_access_token.sh "$plist_secret" scripts/gha-encrypted/RemoteConfigSwiftAPI/ServiceAccount.json.gpg
  43. FirebaseRemoteConfigSwift/Tests/AccessToken.json)
  44. - name: Fake Console API Tests
  45. run: scripts/third_party/travis/retry.sh scripts/build.sh RemoteConfig iOS fakeconsole
  46. - name: IntegrationTest
  47. if: matrix.target == 'iOS'
  48. # No retry to avoid exhausting AccessToken quota.
  49. run: ([ -z $plist_secret ] || scripts/build.sh RemoteConfig iOS integration)
  50. pod-lib-lint:
  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. strategy:
  55. matrix:
  56. target: [ios, tvos, macos, watchos]
  57. podspec: [FirebaseRemoteConfig.podspec, FirebaseRemoteConfigSwift.podspec --skip-tests]
  58. steps:
  59. - uses: actions/checkout@v3
  60. - uses: ruby/setup-ruby@v1
  61. - name: Setup Bundler
  62. run: scripts/setup_bundler.sh
  63. - name: Build and test
  64. run: |
  65. scripts/third_party/travis/retry.sh scripts/pod_lib_lint.rb ${{ matrix.podspec }} --platforms=${{ matrix.target }}
  66. spm:
  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. runs-on: macos-12
  70. strategy:
  71. matrix:
  72. target: [iOS, tvOS, macOS, catalyst, watchOS]
  73. steps:
  74. - uses: actions/checkout@v3
  75. - uses: mikehardy/buildcache-action@c87cea0ccd718971d6cc39e672c4f26815b6c126
  76. with:
  77. cache_key: ${{ matrix.os }}
  78. - name: Initialize xcodebuild
  79. run: scripts/setup_spm_tests.sh
  80. - name: Unit Tests
  81. run: scripts/third_party/travis/retry.sh ./scripts/build.sh RemoteConfigUnit ${{ matrix.target }} spm
  82. - name: Fake Console tests
  83. run: scripts/third_party/travis/retry.sh ./scripts/build.sh RemoteConfigFakeConsole ${{ matrix.target }} spm
  84. catalyst:
  85. # Don't run on private repo unless it is a PR.
  86. if: (github.repository == 'Firebase/firebase-ios-sdk' && github.event_name == 'schedule') || github.event_name == 'pull_request'
  87. runs-on: macos-12
  88. steps:
  89. - uses: actions/checkout@v3
  90. - uses: mikehardy/buildcache-action@c87cea0ccd718971d6cc39e672c4f26815b6c126
  91. with:
  92. cache_key: ${{ matrix.os }}
  93. - uses: ruby/setup-ruby@v1
  94. - name: Setup Bundler
  95. run: scripts/setup_bundler.sh
  96. - name: Setup project and Build for Catalyst
  97. run: scripts/test_catalyst.sh FirebaseRemoteConfig test FirebaseRemoteConfig-Unit-unit
  98. quickstart:
  99. # Don't run on private repo unless it is a PR.
  100. if: (github.repository == 'Firebase/firebase-ios-sdk' && github.event_name == 'schedule') || github.event_name == 'pull_request'
  101. env:
  102. plist_secret: ${{ secrets.GHASecretsGPGPassphrase1 }}
  103. signin_secret: ${{ secrets.GHASecretsGPGPassphrase1 }}
  104. runs-on: macos-12
  105. steps:
  106. - uses: actions/checkout@v3
  107. - uses: ruby/setup-ruby@v1
  108. - name: Setup quickstart
  109. run: scripts/setup_quickstart.sh config
  110. - name: Install Secret GoogleService-Info.plist
  111. run: scripts/decrypt_gha_secret.sh scripts/gha-encrypted/qs-config.plist.gpg \
  112. quickstart-ios/config/GoogleService-Info.plist "$plist_secret"
  113. - name: Test Swift Quickstart
  114. run: ([ -z $plist_secret ] || scripts/third_party/travis/retry.sh scripts/test_quickstart.sh Config true)
  115. # TODO(@sunmou99): currently have issue with this job, will re-enable it once the issue resolved.
  116. # quickstart-ftl-cron-only:
  117. # # Don't run on private repo.
  118. # if: (github.repository == 'Firebase/firebase-ios-sdk' && github.event_name == 'schedule') || github.event_name == 'pull_request'
  119. # env:
  120. # plist_secret: ${{ secrets.GHASecretsGPGPassphrase1 }}
  121. # signin_secret: ${{ secrets.GHASecretsGPGPassphrase1 }}
  122. # runs-on: macos-12
  123. # steps:
  124. # - uses: actions/checkout@v3
  125. # - uses: ruby/setup-ruby@v1
  126. # - name: Setup quickstart
  127. # run: scripts/setup_quickstart.sh config
  128. # - name: Install Secret GoogleService-Info.plist
  129. # run: scripts/decrypt_gha_secret.sh scripts/gha-encrypted/qs-config.plist.gpg \
  130. # quickstart-ios/config/GoogleService-Info.plist "$plist_secret"
  131. # - name: Build Swift Quickstart
  132. # run: ([ -z $plist_secret ] || scripts/third_party/travis/retry.sh scripts/test_quickstart_ftl.sh Config)
  133. # - id: ftl_test
  134. # uses: FirebaseExtended/github-actions/firebase-test-lab@v1.2
  135. # with:
  136. # credentials_json: ${{ secrets.FIREBASE_SERVICE_ACCOUNT_CREDENTIALS }}
  137. # testapp_dir: quickstart-ios/build-for-testing
  138. # test_type: "xctest"
  139. sample-build-test:
  140. # Don't run on private repo unless it is a PR.
  141. if: (github.repository == 'Firebase/firebase-ios-sdk' && github.event_name == 'schedule') || github.event_name == 'pull_request'
  142. runs-on: macos-12
  143. steps:
  144. - uses: actions/checkout@v3
  145. - uses: mikehardy/buildcache-action@c87cea0ccd718971d6cc39e672c4f26815b6c126
  146. with:
  147. cache_key: ${{ matrix.os }}
  148. - uses: ruby/setup-ruby@v1
  149. - name: Setup Bundler
  150. run: scripts/setup_bundler.sh
  151. - name: Prereqs
  152. run: scripts/install_prereqs.sh RemoteConfigSample iOS
  153. - name: Build
  154. run: scripts/build.sh RemoteConfigSample iOS
  155. remoteconfig-cron-only:
  156. # Don't run on private repo.
  157. if: github.event_name == 'schedule' && github.repository == 'Firebase/firebase-ios-sdk'
  158. runs-on: macos-12
  159. strategy:
  160. matrix:
  161. target: [ios, tvos, macos]
  162. flags: [
  163. '--skip-tests --use-static-frameworks'
  164. ]
  165. needs: pod-lib-lint
  166. steps:
  167. - uses: actions/checkout@v3
  168. - uses: ruby/setup-ruby@v1
  169. - name: Setup Bundler
  170. run: scripts/setup_bundler.sh
  171. - name: PodLibLint RemoteConfig Cron
  172. run: |
  173. scripts/third_party/travis/retry.sh scripts/pod_lib_lint.rb FirebaseRemoteConfig.podspec --platforms=${{ matrix.target }} ${{ matrix.flags }}