remoteconfig.yml 6.8 KB

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