remoteconfig.yml 8.5 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212
  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-14
  24. strategy:
  25. matrix:
  26. target: [iOS, tvOS, macOS]
  27. steps:
  28. - uses: actions/checkout@v4
  29. - uses: mikehardy/buildcache-action@c87cea0ccd718971d6cc39e672c4f26815b6c126
  30. with:
  31. cache_key: rc${{ matrix.target }}
  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. strategy:
  54. matrix:
  55. # TODO: macos tests are blocked by https://github.com/erikdoe/ocmock/pull/532
  56. target: [ios, tvos, macos --skip-tests, watchos]
  57. podspec: [FirebaseRemoteConfig.podspec, FirebaseRemoteConfigSwift.podspec --allow-warnings --skip-tests]
  58. os: [macos-14, macos-13]
  59. include:
  60. - os: macos-14
  61. xcode: Xcode_15.3
  62. tests:
  63. # Flaky tests on CI
  64. - os: macos-13
  65. xcode: Xcode_15.2
  66. tests: --skip-tests
  67. runs-on: ${{ matrix.os }}
  68. steps:
  69. - uses: actions/checkout@v4
  70. - uses: ruby/setup-ruby@v1
  71. - name: Setup Bundler
  72. run: scripts/setup_bundler.sh
  73. - name: Xcode
  74. run: sudo xcode-select -s /Applications/${{ matrix.xcode }}.app/Contents/Developer
  75. - name: Build and test
  76. run: |
  77. scripts/third_party/travis/retry.sh scripts/pod_lib_lint.rb ${{ matrix.podspec }} --platforms=${{ matrix.target }} \
  78. ${{ matrix.tests }}
  79. spm:
  80. # Don't run on private repo unless it is a PR.
  81. if: (github.repository == 'Firebase/firebase-ios-sdk' && github.event_name == 'schedule') || github.event_name == 'pull_request'
  82. strategy:
  83. matrix:
  84. target: [iOS, tvOS, macOS, catalyst, watchOS]
  85. os: [macos-13, macos-14]
  86. include:
  87. - os: macos-13
  88. xcode: Xcode_15.2
  89. test: spmbuildonly
  90. - os: macos-14
  91. xcode: Xcode_15.3
  92. test: spmbuildonly
  93. - os: macos-14
  94. xcode: Xcode_15.3
  95. target: visionOS
  96. test: spm
  97. runs-on: ${{ matrix.os }}
  98. steps:
  99. - uses: actions/checkout@v4
  100. - uses: mikehardy/buildcache-action@c87cea0ccd718971d6cc39e672c4f26815b6c126
  101. with:
  102. cache_key: spm${{ matrix.os }}-${{ matrix.xcode }}-${{ matrix.target }}
  103. - name: Xcode
  104. run: sudo xcode-select -s /Applications/${{ matrix.xcode }}.app/Contents/Developer
  105. - name: Initialize xcodebuild
  106. run: scripts/setup_spm_tests.sh
  107. - name: Unit Tests
  108. run: scripts/third_party/travis/retry.sh ./scripts/build.sh RemoteConfigUnit ${{ matrix.target }} ${{ matrix.test }}
  109. - name: Fake Console tests
  110. run: scripts/third_party/travis/retry.sh ./scripts/build.sh RemoteConfigFakeConsole ${{ matrix.target }} ${{ matrix.test }}
  111. catalyst:
  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-14
  115. steps:
  116. - uses: actions/checkout@v4
  117. - uses: mikehardy/buildcache-action@c87cea0ccd718971d6cc39e672c4f26815b6c126
  118. with:
  119. cache_key: catalyst${{ matrix.os }}
  120. - uses: ruby/setup-ruby@v1
  121. - name: Setup Bundler
  122. run: scripts/setup_bundler.sh
  123. - name: Setup project and Build for Catalyst
  124. run: scripts/test_catalyst.sh FirebaseRemoteConfig test FirebaseRemoteConfig-Unit-unit
  125. quickstart:
  126. # Don't run on private repo unless it is a PR.
  127. if: (github.repository == 'Firebase/firebase-ios-sdk' && github.event_name == 'schedule') || github.event_name == 'pull_request'
  128. env:
  129. plist_secret: ${{ secrets.GHASecretsGPGPassphrase1 }}
  130. signin_secret: ${{ secrets.GHASecretsGPGPassphrase1 }}
  131. runs-on: macos-14
  132. steps:
  133. - uses: actions/checkout@v4
  134. - uses: ruby/setup-ruby@v1
  135. - name: Setup quickstart
  136. run: scripts/setup_quickstart.sh config
  137. - name: Install Secret GoogleService-Info.plist
  138. run: scripts/decrypt_gha_secret.sh scripts/gha-encrypted/qs-config.plist.gpg \
  139. quickstart-ios/config/GoogleService-Info.plist "$plist_secret"
  140. - name: Test Swift Quickstart
  141. run: ([ -z $plist_secret ] || scripts/third_party/travis/retry.sh scripts/test_quickstart.sh Config true)
  142. # TODO(@sunmou99): currently have issue with this job, will re-enable it once the issue resolved.
  143. # quickstart-ftl-cron-only:
  144. # # Don't run on private repo.
  145. # if: (github.repository == 'Firebase/firebase-ios-sdk' && github.event_name == 'schedule') || github.event_name == 'pull_request'
  146. # env:
  147. # plist_secret: ${{ secrets.GHASecretsGPGPassphrase1 }}
  148. # signin_secret: ${{ secrets.GHASecretsGPGPassphrase1 }}
  149. # runs-on: macos-14
  150. # steps:
  151. # - uses: actions/checkout@v4
  152. # - uses: ruby/setup-ruby@v1
  153. # - name: Setup quickstart
  154. # run: scripts/setup_quickstart.sh config
  155. # - name: Install Secret GoogleService-Info.plist
  156. # run: scripts/decrypt_gha_secret.sh scripts/gha-encrypted/qs-config.plist.gpg \
  157. # quickstart-ios/config/GoogleService-Info.plist "$plist_secret"
  158. # - name: Build Swift Quickstart
  159. # run: ([ -z $plist_secret ] || scripts/third_party/travis/retry.sh scripts/test_quickstart_ftl.sh Config)
  160. # - id: ftl_test
  161. # uses: FirebaseExtended/github-actions/firebase-test-lab@v1.2
  162. # with:
  163. # credentials_json: ${{ secrets.FIREBASE_SERVICE_ACCOUNT_CREDENTIALS }}
  164. # testapp_dir: quickstart-ios/build-for-testing
  165. # test_type: "xctest"
  166. sample-build-test:
  167. # Don't run on private repo unless it is a PR.
  168. if: (github.repository == 'Firebase/firebase-ios-sdk' && github.event_name == 'schedule') || github.event_name == 'pull_request'
  169. runs-on: macos-14
  170. steps:
  171. - uses: actions/checkout@v4
  172. - uses: mikehardy/buildcache-action@c87cea0ccd718971d6cc39e672c4f26815b6c126
  173. with:
  174. cache_key: build-test
  175. - uses: ruby/setup-ruby@v1
  176. - name: Setup Bundler
  177. run: scripts/setup_bundler.sh
  178. - name: Prereqs
  179. run: scripts/install_prereqs.sh RemoteConfigSample iOS
  180. - name: Build
  181. run: scripts/build.sh RemoteConfigSample iOS
  182. remoteconfig-cron-only:
  183. # Don't run on private repo.
  184. if: github.event_name == 'schedule' && github.repository == 'Firebase/firebase-ios-sdk'
  185. runs-on: macos-14
  186. strategy:
  187. matrix:
  188. target: [ios, tvos, macos]
  189. flags: [
  190. '--skip-tests --use-static-frameworks'
  191. ]
  192. needs: pod-lib-lint
  193. steps:
  194. - uses: actions/checkout@v4
  195. - uses: ruby/setup-ruby@v1
  196. - name: Setup Bundler
  197. run: scripts/setup_bundler.sh
  198. - name: PodLibLint RemoteConfig Cron
  199. run: |
  200. scripts/third_party/travis/retry.sh scripts/pod_lib_lint.rb FirebaseRemoteConfig.podspec --platforms=${{ matrix.target }} ${{ matrix.flags }}