remoteconfig.yml 6.3 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161
  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@v3
  29. - uses: mikehardy/buildcache-action@c87cea0ccd718971d6cc39e672c4f26815b6c126
  30. with:
  31. cache_key: ${{ matrix.os }}
  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. runs-on: macos-12
  54. strategy:
  55. matrix:
  56. target: [ios, tvos, macos]
  57. podspec: [FirebaseRemoteConfig.podspec, FirebaseRemoteConfigSwift.podspec --skip-tests]
  58. steps:
  59. - uses: actions/checkout@v3
  60. - uses: ruby/setup-ruby@v1
  61. - name: Setup Bundler
  62. run: scripts/setup_bundler.sh
  63. - name: Build and test
  64. run: |
  65. scripts/third_party/travis/retry.sh scripts/pod_lib_lint.rb ${{ matrix.podspec }} --platforms=${{ matrix.target }}
  66. spm:
  67. # Don't run on private repo unless it is a PR.
  68. if: (github.repository == 'Firebase/firebase-ios-sdk' && github.event_name == 'schedule') || github.event_name == 'pull_request'
  69. runs-on: macos-12
  70. strategy:
  71. matrix:
  72. target: [iOS, tvOS, macOS, catalyst, watchOS]
  73. steps:
  74. - uses: actions/checkout@v3
  75. - uses: mikehardy/buildcache-action@c87cea0ccd718971d6cc39e672c4f26815b6c126
  76. with:
  77. cache_key: ${{ matrix.os }}
  78. - name: Initialize xcodebuild
  79. run: scripts/setup_spm_tests.sh
  80. - name: Unit Tests
  81. run: scripts/third_party/travis/retry.sh ./scripts/build.sh RemoteConfigUnit ${{ matrix.target }} spm
  82. - name: Fake Console tests
  83. run: scripts/third_party/travis/retry.sh ./scripts/build.sh RemoteConfigFakeConsole ${{ matrix.target }} spm
  84. catalyst:
  85. # Don't run on private repo unless it is a PR.
  86. if: (github.repository == 'Firebase/firebase-ios-sdk' && github.event_name == 'schedule') || github.event_name == 'pull_request'
  87. runs-on: macos-12
  88. steps:
  89. - uses: actions/checkout@v3
  90. - uses: mikehardy/buildcache-action@c87cea0ccd718971d6cc39e672c4f26815b6c126
  91. with:
  92. cache_key: ${{ matrix.os }}
  93. - uses: ruby/setup-ruby@v1
  94. - name: Setup Bundler
  95. run: scripts/setup_bundler.sh
  96. - name: Setup project and Build for Catalyst
  97. run: scripts/test_catalyst.sh FirebaseRemoteConfig test FirebaseRemoteConfig-Unit-unit
  98. quickstart:
  99. # Don't run on private repo unless it is a PR.
  100. if: (github.repository == 'Firebase/firebase-ios-sdk' && github.event_name == 'schedule') || github.event_name == 'pull_request'
  101. env:
  102. plist_secret: ${{ secrets.GHASecretsGPGPassphrase1 }}
  103. signin_secret: ${{ secrets.GHASecretsGPGPassphrase1 }}
  104. runs-on: macos-12
  105. steps:
  106. - uses: actions/checkout@v3
  107. - uses: actions/checkout@v3
  108. - uses: ruby/setup-ruby@v1
  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. sample-build-test:
  117. # Don't run on private repo unless it is a PR.
  118. if: (github.repository == 'Firebase/firebase-ios-sdk' && github.event_name == 'schedule') || github.event_name == 'pull_request'
  119. runs-on: macos-12
  120. steps:
  121. - uses: actions/checkout@v3
  122. - uses: mikehardy/buildcache-action@c87cea0ccd718971d6cc39e672c4f26815b6c126
  123. with:
  124. cache_key: ${{ matrix.os }}
  125. - uses: ruby/setup-ruby@v1
  126. - name: Setup Bundler
  127. run: scripts/setup_bundler.sh
  128. - name: Prereqs
  129. run: scripts/install_prereqs.sh RemoteConfigSample iOS
  130. - name: Build
  131. run: scripts/build.sh RemoteConfigSample iOS
  132. remoteconfig-cron-only:
  133. # Don't run on private repo.
  134. if: github.event_name == 'schedule' && github.repository == 'Firebase/firebase-ios-sdk'
  135. runs-on: macos-12
  136. strategy:
  137. matrix:
  138. target: [ios, tvos, macos]
  139. flags: [
  140. '--skip-tests --use-static-frameworks'
  141. ]
  142. needs: pod-lib-lint
  143. steps:
  144. - uses: actions/checkout@v3
  145. - uses: ruby/setup-ruby@v1
  146. - name: Setup Bundler
  147. run: scripts/setup_bundler.sh
  148. - name: PodLibLint RemoteConfig Cron
  149. run: |
  150. scripts/third_party/travis/retry.sh scripts/pod_lib_lint.rb FirebaseRemoteConfig.podspec --platforms=${{ matrix.target }} ${{ matrix.flags }}