remoteconfig.yml 7.7 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193
  1. name: remoteconfig
  2. on:
  3. workflow_dispatch:
  4. pull_request:
  5. paths:
  6. - 'FirebaseRemoteConfig**'
  7. - 'Interop/Analytics/Public/*.h'
  8. - '.github/workflows/remoteconfig.yml'
  9. - 'Gemfile*'
  10. - 'scripts/generate_access_token.sh'
  11. - 'scripts/gha-encrypted/RemoteConfigSwiftAPI/**'
  12. schedule:
  13. # Run every day at 12am (PST) - cron uses UTC times
  14. - cron: '0 8 * * *'
  15. concurrency:
  16. group: ${{ github.workflow }}-${{ github.head_ref || github.ref }}
  17. cancel-in-progress: true
  18. jobs:
  19. spm_1:
  20. uses: ./.github/workflows/common.yml
  21. with:
  22. target: RemoteConfigUnit
  23. spm_2:
  24. uses: ./.github/workflows/common.yml
  25. with:
  26. target: RemoteConfigFakeConsole
  27. buildonly_platforms: watchOS
  28. catalyst:
  29. uses: ./.github/workflows/common_catalyst.yml
  30. with:
  31. product: FirebaseRemoteConfig
  32. target: FirebaseRemoteConfig-Unit-unit
  33. remoteconfig:
  34. # Don't run on private repo unless it is a PR.
  35. if: (github.repository == 'Firebase/firebase-ios-sdk' && github.event_name == 'schedule') || github.event_name == 'pull_request'
  36. env:
  37. plist_secret: ${{ secrets.GHASecretsGPGPassphrase1 }}
  38. USE_REAL_CONSOLE: true
  39. runs-on: macos-15
  40. strategy:
  41. matrix:
  42. target: [iOS]
  43. steps:
  44. - uses: actions/checkout@v4
  45. - uses: mikehardy/buildcache-action@c87cea0ccd718971d6cc39e672c4f26815b6c126
  46. with:
  47. cache_key: rc${{ matrix.target }}
  48. - uses: ruby/setup-ruby@354a1ad156761f5ee2b7b13fa8e09943a5e8d252 # v1
  49. - name: Setup Bundler
  50. run: scripts/setup_bundler.sh
  51. - name: Install xcpretty
  52. run: gem install xcpretty
  53. - name: Install Secret GoogleService-Info.plist
  54. run: scripts/decrypt_gha_secret.sh scripts/gha-encrypted/RemoteConfigSwiftAPI/GoogleService-Info.plist.gpg \
  55. FirebaseRemoteConfig/Tests/Swift/SwiftAPI/GoogleService-Info.plist "$plist_secret"
  56. - name: Generate Access Token for RemoteConfigConsoleAPI in IntegrationTests
  57. if: matrix.target == 'iOS'
  58. run: ([ -z $plist_secret ] || scripts/generate_access_token.sh "$plist_secret" scripts/gha-encrypted/RemoteConfigSwiftAPI/ServiceAccount.json.gpg
  59. FirebaseRemoteConfig/Tests/Swift/AccessToken.json)
  60. - name: Xcode
  61. run: sudo xcode-select -s /Applications/Xcode_16.2.app/Contents/Developer
  62. - name: Fake Console API Tests
  63. run: scripts/third_party/travis/retry.sh scripts/build.sh RemoteConfig ${{ matrix.target }} fakeconsole
  64. - name: IntegrationTest
  65. if: matrix.target == 'iOS'
  66. # No retry to avoid exhausting AccessToken quota.
  67. run: ([ -z $plist_secret ] || scripts/build.sh RemoteConfig iOS integration)
  68. pod-lib-lint:
  69. # Don't run on private repo unless it is a PR.
  70. if: (github.repository == 'Firebase/firebase-ios-sdk' && github.event_name == 'schedule') || github.event_name == 'pull_request'
  71. strategy:
  72. matrix:
  73. # TODO: macos tests are blocked by https://github.com/erikdoe/ocmock/pull/532
  74. target: [ios, tvos, macos --skip-tests, watchos]
  75. podspec: [FirebaseRemoteConfig.podspec]
  76. build-env:
  77. - os: macos-14
  78. xcode: Xcode_16.2
  79. # # TODO(#13078): Fix testing infra to enforce warnings again.
  80. # tests: --allow-warnings
  81. # Flaky tests on CI
  82. - os: macos-15
  83. xcode: Xcode_16.2
  84. tests: --skip-tests
  85. runs-on: ${{ matrix.build-env.os }}
  86. steps:
  87. - uses: actions/checkout@v4
  88. - uses: ruby/setup-ruby@354a1ad156761f5ee2b7b13fa8e09943a5e8d252 # v1
  89. - name: Setup Bundler
  90. run: scripts/setup_bundler.sh
  91. - name: Xcode
  92. run: sudo xcode-select -s /Applications/${{ matrix.build-env.xcode }}.app/Contents/Developer
  93. - name: Build and test
  94. run: |
  95. scripts/third_party/travis/retry.sh scripts/pod_lib_lint.rb ${{ matrix.podspec }} --platforms=${{ matrix.target }} \
  96. ${{ matrix.build-env.tests }}
  97. quickstart:
  98. # Don't run on private repo unless it is a PR.
  99. if: (github.repository == 'Firebase/firebase-ios-sdk' && github.event_name == 'schedule') || github.event_name == 'pull_request'
  100. env:
  101. plist_secret: ${{ secrets.GHASecretsGPGPassphrase1 }}
  102. signin_secret: ${{ secrets.GHASecretsGPGPassphrase1 }}
  103. runs-on: macos-15
  104. steps:
  105. - uses: actions/checkout@v4
  106. - uses: ruby/setup-ruby@354a1ad156761f5ee2b7b13fa8e09943a5e8d252 # v1
  107. - name: Xcode
  108. run: sudo xcode-select -s /Applications/Xcode_16.2.app/Contents/Developer
  109. - name: Setup quickstart
  110. run: scripts/setup_quickstart.sh config
  111. - name: Install Secret GoogleService-Info.plist
  112. run: scripts/decrypt_gha_secret.sh scripts/gha-encrypted/qs-config.plist.gpg \
  113. quickstart-ios/config/GoogleService-Info.plist "$plist_secret"
  114. - name: Test Swift Quickstart
  115. run: ([ -z $plist_secret ] || scripts/third_party/travis/retry.sh scripts/test_quickstart.sh Config true)
  116. # TODO(@sunmou99): currently have issue with this job, will re-enable it once the issue resolved.
  117. # quickstart-ftl-cron-only:
  118. # # Don't run on private repo.
  119. # if: (github.repository == 'Firebase/firebase-ios-sdk' && github.event_name == 'schedule') || github.event_name == 'pull_request'
  120. # env:
  121. # plist_secret: ${{ secrets.GHASecretsGPGPassphrase1 }}
  122. # signin_secret: ${{ secrets.GHASecretsGPGPassphrase1 }}
  123. # runs-on: macos-14
  124. # steps:
  125. # - uses: actions/checkout@v4
  126. # - uses: ruby/setup-ruby@354a1ad156761f5ee2b7b13fa8e09943a5e8d252 # v1
  127. # - uses: actions/setup-python@v5
  128. # with:
  129. # python-version: '3.11'
  130. # - name: Setup quickstart
  131. # run: scripts/setup_quickstart.sh config
  132. # - name: Install Secret GoogleService-Info.plist
  133. # run: scripts/decrypt_gha_secret.sh scripts/gha-encrypted/qs-config.plist.gpg \
  134. # quickstart-ios/config/GoogleService-Info.plist "$plist_secret"
  135. # - name: Build Swift Quickstart
  136. # run: ([ -z $plist_secret ] || scripts/third_party/travis/retry.sh scripts/test_quickstart_ftl.sh Config)
  137. # - id: ftl_test
  138. # uses: FirebaseExtended/github-actions/firebase-test-lab@v1.4
  139. # with:
  140. # credentials_json: ${{ secrets.FIREBASE_SERVICE_ACCOUNT_CREDENTIALS }}
  141. # testapp_dir: quickstart-ios/build-for-testing
  142. # test_type: "xctest"
  143. sample-build-test:
  144. # Don't run on private repo unless it is a PR.
  145. if: (github.repository == 'Firebase/firebase-ios-sdk' && github.event_name == 'schedule') || github.event_name == 'pull_request'
  146. runs-on: macos-15
  147. steps:
  148. - uses: actions/checkout@v4
  149. - uses: mikehardy/buildcache-action@c87cea0ccd718971d6cc39e672c4f26815b6c126
  150. with:
  151. cache_key: build-test
  152. - uses: ruby/setup-ruby@354a1ad156761f5ee2b7b13fa8e09943a5e8d252 # v1
  153. - name: Setup Bundler
  154. run: scripts/setup_bundler.sh
  155. - name: Xcode
  156. run: sudo xcode-select -s /Applications/Xcode_16.3.app/Contents/Developer
  157. - name: Prereqs
  158. run: scripts/install_prereqs.sh RemoteConfigSample iOS
  159. - name: Build
  160. run: scripts/build.sh RemoteConfigSample iOS
  161. remoteconfig-cron-only:
  162. # Don't run on private repo.
  163. if: github.event_name == 'schedule' && github.repository == 'Firebase/firebase-ios-sdk'
  164. runs-on: macos-15
  165. strategy:
  166. matrix:
  167. target: [ios, tvos, macos]
  168. flags: [
  169. '--skip-tests --use-static-frameworks'
  170. ]
  171. needs: pod-lib-lint
  172. steps:
  173. - uses: actions/checkout@v4
  174. - uses: ruby/setup-ruby@354a1ad156761f5ee2b7b13fa8e09943a5e8d252 # v1
  175. - name: Xcode
  176. run: sudo xcode-select -s /Applications/Xcode_16.2.app/Contents/Developer
  177. - name: Setup Bundler
  178. run: scripts/setup_bundler.sh
  179. - name: PodLibLint RemoteConfig Cron
  180. run: |
  181. scripts/third_party/travis/retry.sh scripts/pod_lib_lint.rb FirebaseRemoteConfig.podspec --platforms=${{ matrix.target }} ${{ matrix.flags }}