remoteconfig.yml 5.8 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156
  1. name: remoteconfig
  2. permissions:
  3. contents: read
  4. on:
  5. workflow_dispatch:
  6. pull_request:
  7. paths:
  8. - 'FirebaseRemoteConfig**'
  9. - 'Interop/Analytics/Public/*.h'
  10. - '.github/workflows/remoteconfig.yml'
  11. - '.github/workflows/common.yml'
  12. - '.github/workflows/common_cocoapods.yml'
  13. - '.github/workflows/common_catalyst.yml'
  14. - '.github/workflows/common_quickstart.yml'
  15. - '.github/workflows/common_cocoapods_cron.yml'
  16. - 'Gemfile*'
  17. - 'scripts/generate_access_token.sh'
  18. - 'scripts/gha-encrypted/RemoteConfigSwiftAPI/**'
  19. schedule:
  20. # Run every day at 1am (PDT) / 4am (EDT) - cron uses UTC times
  21. - cron: '0 8 * * *'
  22. concurrency:
  23. group: ${{ github.workflow }}-${{ github.head_ref || github.ref }}
  24. cancel-in-progress: true
  25. jobs:
  26. spm_1:
  27. uses: ./.github/workflows/common.yml
  28. with:
  29. target: RemoteConfigUnit
  30. spm_2:
  31. uses: ./.github/workflows/common.yml
  32. with:
  33. target: RemoteConfigFakeConsole
  34. buildonly_platforms: watchOS
  35. catalyst:
  36. uses: ./.github/workflows/common_catalyst.yml
  37. with:
  38. product: FirebaseRemoteConfig
  39. target: FirebaseRemoteConfig-Unit-unit
  40. remoteconfig:
  41. # Don't run on private repo unless it is a PR.
  42. if: (github.repository == 'Firebase/firebase-ios-sdk' && github.event_name == 'schedule') || github.event_name == 'pull_request'
  43. env:
  44. plist_secret: ${{ secrets.GHASecretsGPGPassphrase1 }}
  45. USE_REAL_CONSOLE: true
  46. runs-on: macos-15
  47. strategy:
  48. matrix:
  49. target: [iOS]
  50. steps:
  51. - uses: actions/checkout@v4
  52. - uses: mikehardy/buildcache-action@c87cea0ccd718971d6cc39e672c4f26815b6c126
  53. with:
  54. cache_key: rc${{ matrix.target }}
  55. - uses: ruby/setup-ruby@354a1ad156761f5ee2b7b13fa8e09943a5e8d252 # v1
  56. - name: Setup Bundler
  57. run: scripts/setup_bundler.sh
  58. - name: Install xcpretty
  59. run: gem install xcpretty
  60. - name: Install Secret GoogleService-Info.plist
  61. run: scripts/decrypt_gha_secret.sh scripts/gha-encrypted/RemoteConfigSwiftAPI/GoogleService-Info.plist.gpg \
  62. FirebaseRemoteConfig/Tests/Swift/SwiftAPI/GoogleService-Info.plist "$plist_secret"
  63. - name: Generate Access Token for RemoteConfigConsoleAPI in IntegrationTests
  64. if: matrix.target == 'iOS'
  65. run: ([ -z $plist_secret ] || scripts/generate_access_token.sh "$plist_secret" scripts/gha-encrypted/RemoteConfigSwiftAPI/ServiceAccount.json.gpg
  66. FirebaseRemoteConfig/Tests/Swift/AccessToken.json)
  67. - name: Xcode
  68. run: sudo xcode-select -s /Applications/Xcode_16.4.app/Contents/Developer
  69. - name: Fake Console API Tests
  70. uses: nick-fields/retry@ce71cc2ab81d554ebbe88c79ab5975992d79ba08 # v3
  71. with:
  72. timeout_minutes: 15
  73. max_attempts: 3
  74. retry_wait_seconds: 120
  75. command: scripts/build.sh RemoteConfig ${{ matrix.target }} fakeconsole
  76. - name: IntegrationTest
  77. if: matrix.target == 'iOS'
  78. # No retry to avoid exhausting AccessToken quota.
  79. run: ([ -z $plist_secret ] || scripts/build.sh RemoteConfig iOS integration)
  80. pod_lib_lint:
  81. uses: ./.github/workflows/common_cocoapods.yml
  82. with:
  83. product: FirebaseRemoteConfig
  84. quickstart:
  85. uses: ./.github/workflows/common_quickstart.yml
  86. with:
  87. product: Config
  88. is_legacy: false
  89. setup_command: scripts/setup_quickstart.sh config
  90. plist_src_path: scripts/gha-encrypted/qs-config.plist.gpg
  91. plist_dst_path: quickstart-ios/config/GoogleService-Info.plist
  92. secrets:
  93. plist_secret: ${{ secrets.GHASecretsGPGPassphrase1 }}
  94. # TODO(@sunmou99): currently have issue with this job, will re-enable it once the issue resolved.
  95. # quickstart-ftl-cron-only:
  96. # # Don't run on private repo.
  97. # if: (github.repository == 'Firebase/firebase-ios-sdk' && github.event_name == 'schedule') || github.event_name == 'pull_request'
  98. # env:
  99. # plist_secret: ${{ secrets.GHASecretsGPGPassphrase1 }}
  100. # runs-on: macos-14
  101. # steps:
  102. # - uses: actions/checkout@v4
  103. # - uses: ruby/setup-ruby@354a1ad156761f5ee2b7b13fa8e09943a5e8d252 # v1
  104. # - uses: actions/setup-python@v5
  105. # with:
  106. # python-version: '3.11'
  107. # - name: Setup quickstart
  108. # run: scripts/setup_quickstart.sh config
  109. # - name: Install Secret GoogleService-Info.plist
  110. # run: scripts/decrypt_gha_secret.sh scripts/gha-encrypted/qs-config.plist.gpg \
  111. # quickstart-ios/config/GoogleService-Info.plist "$plist_secret"
  112. # - name: Build Swift Quickstart
  113. # run: ([ -z $plist_secret ] || scripts/third_party/travis/retry.sh scripts/test_quickstart_ftl.sh Config)
  114. # - id: ftl_test
  115. # uses: FirebaseExtended/github-actions/firebase-test-lab@v1.4
  116. # with:
  117. # credentials_json: ${{ secrets.FIREBASE_SERVICE_ACCOUNT_CREDENTIALS }}
  118. # testapp_dir: quickstart-ios/build-for-testing
  119. # test_type: "xctest"
  120. sample-build-test:
  121. # Don't run on private repo unless it is a PR.
  122. if: (github.repository == 'Firebase/firebase-ios-sdk' && github.event_name == 'schedule') || github.event_name == 'pull_request'
  123. runs-on: macos-15
  124. steps:
  125. - uses: actions/checkout@v4
  126. - uses: mikehardy/buildcache-action@c87cea0ccd718971d6cc39e672c4f26815b6c126
  127. with:
  128. cache_key: build-test
  129. - uses: ruby/setup-ruby@354a1ad156761f5ee2b7b13fa8e09943a5e8d252 # v1
  130. - name: Setup Bundler
  131. run: scripts/setup_bundler.sh
  132. - name: Xcode
  133. run: sudo xcode-select -s /Applications/Xcode_16.4.app/Contents/Developer
  134. - name: Prereqs
  135. run: scripts/install_prereqs.sh RemoteConfigSample iOS
  136. - name: Build
  137. run: scripts/build.sh RemoteConfigSample iOS
  138. remoteconfig-cron-only:
  139. needs: pod_lib_lint
  140. uses: ./.github/workflows/common_cocoapods_cron.yml
  141. with:
  142. product: FirebaseRemoteConfig
  143. platforms: '[ "ios", "tvos", "macos" ]'
  144. flags: '[ "--skip-tests --use-static-frameworks" ]'