remoteconfig.yml 8.4 KB

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