remoteconfig.yml 6.9 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171
  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. schedule:
  11. # Run every day at 12am (PST) - cron uses UTC times
  12. - cron: '0 8 * * *'
  13. jobs:
  14. remoteconfig:
  15. # Don't run on private repo unless it is a PR.
  16. if: (github.repository == 'Firebase/firebase-ios-sdk' && github.event_name == 'schedule') || github.event_name == 'pull_request'
  17. env:
  18. plist_secret: ${{ secrets.GHASecretsGPGPassphrase1 }}
  19. runs-on: macos-11
  20. strategy:
  21. matrix:
  22. target: [iOS, tvOS, macOS]
  23. steps:
  24. - uses: actions/checkout@v2
  25. - uses: mikehardy/buildcache-action@50738c6c77de7f34e66b870e4f8ede333b69d077
  26. with:
  27. cache_key: ${{ matrix.os }}
  28. - name: Setup Bundler
  29. run: scripts/setup_bundler.sh
  30. - name: Install Secret GoogleService-Info.plist
  31. run: scripts/decrypt_gha_secret.sh scripts/gha-encrypted/RemoteConfigSwiftAPI/GoogleService-Info.plist.gpg \
  32. FirebaseRemoteConfig/Tests/SwiftAPI/GoogleService-Info.plist "$plist_secret"
  33. - name: Generate Access Token for RemoteConfigConsoleAPI in IntegrationTests
  34. if: matrix.target == 'iOS'
  35. run: ([ -z $plist_secret ] || scripts/generate_access_token.sh "$plist_secret" scripts/gha-encrypted/RemoteConfigSwiftAPI/ServiceAccount.json.gpg
  36. FirebaseRemoteConfig/Tests/SwiftAPI/AccessToken.json)
  37. - name: Fake Console API Tests
  38. run: scripts/third_party/travis/retry.sh scripts/build.sh RemoteConfig iOS fakeconsole
  39. # Disable - pending resolution of #9086
  40. # - name: IntegrationTest
  41. # if: matrix.target == 'iOS'
  42. # run: ([ -z $plist_secret ] || scripts/third_party/travis/retry.sh scripts/build.sh RemoteConfig iOS integration)
  43. pod-lib-lint:
  44. # Don't run on private repo unless it is a PR.
  45. if: (github.repository == 'Firebase/firebase-ios-sdk' && github.event_name == 'schedule') || github.event_name == 'pull_request'
  46. runs-on: macos-11
  47. strategy:
  48. matrix:
  49. target: [ios, tvos, macos, watchos]
  50. podspec: [FirebaseRemoteConfig.podspec, FirebaseRemoteConfigSwift.podspec --skip-tests]
  51. steps:
  52. - uses: actions/checkout@v2
  53. - name: Setup Bundler
  54. run: scripts/setup_bundler.sh
  55. - name: Build and test
  56. run: |
  57. scripts/third_party/travis/retry.sh scripts/pod_lib_lint.rb ${{ matrix.podspec }} --platforms=${{ matrix.target }}
  58. spm:
  59. # Don't run on private repo unless it is a PR.
  60. if: (github.repository == 'Firebase/firebase-ios-sdk' && github.event_name == 'schedule') || github.event_name == 'pull_request'
  61. runs-on: macos-11
  62. steps:
  63. - uses: actions/checkout@v2
  64. - uses: mikehardy/buildcache-action@50738c6c77de7f34e66b870e4f8ede333b69d077
  65. with:
  66. cache_key: ${{ matrix.os }}
  67. - name: Initialize xcodebuild
  68. run: scripts/setup_spm_tests.sh
  69. - name: iOS Unit Tests
  70. run: scripts/third_party/travis/retry.sh ./scripts/build.sh RemoteConfigUnit iOS spm
  71. spm-cron:
  72. # Don't run on private repo.
  73. if: github.event_name == 'schedule' && github.repository == 'Firebase/firebase-ios-sdk'
  74. runs-on: macos-11
  75. strategy:
  76. matrix:
  77. target: [tvOS, macOS, catalyst]
  78. steps:
  79. - uses: actions/checkout@v2
  80. - uses: mikehardy/buildcache-action@50738c6c77de7f34e66b870e4f8ede333b69d077
  81. with:
  82. cache_key: ${{ matrix.os }}
  83. - name: Initialize xcodebuild
  84. run: scripts/setup_spm_tests.sh
  85. - name: Unit Tests
  86. run: scripts/third_party/travis/retry.sh ./scripts/build.sh RemoteConfigUnit ${{ matrix.target }} spm
  87. catalyst:
  88. # Don't run on private repo unless it is a PR.
  89. if: (github.repository == 'Firebase/firebase-ios-sdk' && github.event_name == 'schedule') || github.event_name == 'pull_request'
  90. runs-on: macos-11
  91. steps:
  92. - uses: actions/checkout@v2
  93. - uses: mikehardy/buildcache-action@50738c6c77de7f34e66b870e4f8ede333b69d077
  94. with:
  95. cache_key: ${{ matrix.os }}
  96. - name: Setup Bundler
  97. run: scripts/setup_bundler.sh
  98. - name: Setup project and Build for Catalyst
  99. run: scripts/test_catalyst.sh FirebaseRemoteConfig test FirebaseRemoteConfig-Unit-unit
  100. quickstart:
  101. # Don't run on private repo unless it is a PR.
  102. if: (github.repository == 'Firebase/firebase-ios-sdk' && github.event_name == 'schedule') || github.event_name == 'pull_request'
  103. env:
  104. plist_secret: ${{ secrets.GHASecretsGPGPassphrase1 }}
  105. signin_secret: ${{ secrets.GHASecretsGPGPassphrase1 }}
  106. runs-on: macos-11
  107. steps:
  108. - uses: actions/checkout@v2
  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-11
  120. steps:
  121. - uses: actions/checkout@v2
  122. - uses: mikehardy/buildcache-action@50738c6c77de7f34e66b870e4f8ede333b69d077
  123. with:
  124. cache_key: ${{ matrix.os }}
  125. - name: Setup Bundler
  126. run: scripts/setup_bundler.sh
  127. - name: Prereqs
  128. run: scripts/install_prereqs.sh RemoteConfigSample iOS
  129. - name: Build
  130. run: scripts/build.sh RemoteConfigSample iOS
  131. remoteconfig-cron-only:
  132. # Don't run on private repo.
  133. if: github.event_name == 'schedule' && github.repository == 'Firebase/firebase-ios-sdk'
  134. runs-on: macos-11
  135. strategy:
  136. matrix:
  137. target: [ios, tvos, macos]
  138. flags: [
  139. '--skip-tests --use-static-frameworks',
  140. '--skip-tests --use-libraries'
  141. ]
  142. needs: pod-lib-lint
  143. steps:
  144. - uses: actions/checkout@v2
  145. - name: Setup Bundler
  146. run: scripts/setup_bundler.sh
  147. - name: PodLibLint RemoteConfig Cron
  148. run: |
  149. scripts/third_party/travis/retry.sh scripts/pod_lib_lint.rb FirebaseRemoteConfig.podspec --platforms=${{ matrix.target }} ${{ matrix.flags }}
  150. podspec-presubmit:
  151. # Don't run on private repo unless it is a PR.
  152. if: github.repository == 'Firebase/firebase-ios-sdk' && github.event.pull_request.merged != true && github.event.action != 'closed'
  153. runs-on: macos-11
  154. steps:
  155. - uses: actions/checkout@v2
  156. - name: Setup Bundler
  157. run: scripts/setup_bundler.sh
  158. - name: Build and test
  159. run: scripts/third_party/travis/retry.sh pod spec lint FirebaseRemoteConfig.podspec --skip-tests --sources='https://github.com/firebase/SpecsTesting','https://github.com/firebase/SpecsDev.git','https://github.com/firebase/SpecsStaging.git','https://cdn.cocoapods.org/'