remoteconfig.yml 5.9 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151
  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. concurrency:
  14. group: ${{ github.workflow }}-${{ github.head_ref || github.ref }}
  15. cancel-in-progress: true
  16. jobs:
  17. remoteconfig:
  18. # Don't run on private repo unless it is a PR.
  19. if: (github.repository == 'Firebase/firebase-ios-sdk' && github.event_name == 'schedule') || github.event_name == 'pull_request'
  20. env:
  21. plist_secret: ${{ secrets.GHASecretsGPGPassphrase1 }}
  22. runs-on: macos-11
  23. strategy:
  24. matrix:
  25. target: [iOS, tvOS, macOS]
  26. steps:
  27. - uses: actions/checkout@v2
  28. - uses: mikehardy/buildcache-action@50738c6c77de7f34e66b870e4f8ede333b69d077
  29. with:
  30. cache_key: ${{ matrix.os }}
  31. - name: Setup Bundler
  32. run: scripts/setup_bundler.sh
  33. - name: Install Secret GoogleService-Info.plist
  34. run: scripts/decrypt_gha_secret.sh scripts/gha-encrypted/RemoteConfigSwiftAPI/GoogleService-Info.plist.gpg \
  35. FirebaseRemoteConfigSwift/Tests/SwiftAPI/GoogleService-Info.plist "$plist_secret"
  36. - name: Generate Access Token for RemoteConfigConsoleAPI in IntegrationTests
  37. if: matrix.target == 'iOS'
  38. run: ([ -z $plist_secret ] || scripts/generate_access_token.sh "$plist_secret" scripts/gha-encrypted/RemoteConfigSwiftAPI/ServiceAccount.json.gpg
  39. FirebaseRemoteConfigSwift/Tests/AccessToken.json)
  40. - name: Fake Console API Tests
  41. run: scripts/third_party/travis/retry.sh scripts/build.sh RemoteConfig iOS fakeconsole
  42. - name: IntegrationTest
  43. if: matrix.target == 'iOS'
  44. # No retry to avoid exhausting AccessToken quota.
  45. run: ([ -z $plist_secret ] || scripts/build.sh RemoteConfig iOS integration)
  46. pod-lib-lint:
  47. # Don't run on private repo unless it is a PR.
  48. if: (github.repository == 'Firebase/firebase-ios-sdk' && github.event_name == 'schedule') || github.event_name == 'pull_request'
  49. runs-on: macos-11
  50. strategy:
  51. matrix:
  52. target: [ios, tvos, macos, watchos]
  53. podspec: [FirebaseRemoteConfig.podspec, FirebaseRemoteConfigSwift.podspec --skip-tests]
  54. steps:
  55. - uses: actions/checkout@v2
  56. - name: Setup Bundler
  57. run: scripts/setup_bundler.sh
  58. - name: Build and test
  59. run: |
  60. scripts/third_party/travis/retry.sh scripts/pod_lib_lint.rb ${{ matrix.podspec }} --platforms=${{ matrix.target }}
  61. spm:
  62. # Don't run on private repo unless it is a PR.
  63. if: (github.repository == 'Firebase/firebase-ios-sdk' && github.event_name == 'schedule') || github.event_name == 'pull_request'
  64. runs-on: macos-11
  65. strategy:
  66. matrix:
  67. target: [iOS, tvOS, macOS, catalyst, watchOS]
  68. steps:
  69. - uses: actions/checkout@v2
  70. - uses: mikehardy/buildcache-action@50738c6c77de7f34e66b870e4f8ede333b69d077
  71. with:
  72. cache_key: ${{ matrix.os }}
  73. - name: Initialize xcodebuild
  74. run: scripts/setup_spm_tests.sh
  75. - name: Unit Tests
  76. run: scripts/third_party/travis/retry.sh ./scripts/build.sh RemoteConfigUnit ${{ matrix.target }} spm
  77. - name: Fake Console tests
  78. run: scripts/third_party/travis/retry.sh ./scripts/build.sh RemoteConfigFakeConsole ${{ matrix.target }} spm
  79. catalyst:
  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. runs-on: macos-11
  83. steps:
  84. - uses: actions/checkout@v2
  85. - uses: mikehardy/buildcache-action@50738c6c77de7f34e66b870e4f8ede333b69d077
  86. with:
  87. cache_key: ${{ matrix.os }}
  88. - name: Setup Bundler
  89. run: scripts/setup_bundler.sh
  90. - name: Setup project and Build for Catalyst
  91. run: scripts/test_catalyst.sh FirebaseRemoteConfig test FirebaseRemoteConfig-Unit-unit
  92. quickstart:
  93. # Don't run on private repo unless it is a PR.
  94. if: (github.repository == 'Firebase/firebase-ios-sdk' && github.event_name == 'schedule') || github.event_name == 'pull_request'
  95. env:
  96. plist_secret: ${{ secrets.GHASecretsGPGPassphrase1 }}
  97. signin_secret: ${{ secrets.GHASecretsGPGPassphrase1 }}
  98. runs-on: macos-11
  99. steps:
  100. - uses: actions/checkout@v2
  101. - name: Setup quickstart
  102. run: scripts/setup_quickstart.sh config
  103. - name: Install Secret GoogleService-Info.plist
  104. run: scripts/decrypt_gha_secret.sh scripts/gha-encrypted/qs-config.plist.gpg \
  105. quickstart-ios/config/GoogleService-Info.plist "$plist_secret"
  106. - name: Test Swift Quickstart
  107. run: ([ -z $plist_secret ] || scripts/third_party/travis/retry.sh scripts/test_quickstart.sh Config true)
  108. sample-build-test:
  109. # Don't run on private repo unless it is a PR.
  110. if: (github.repository == 'Firebase/firebase-ios-sdk' && github.event_name == 'schedule') || github.event_name == 'pull_request'
  111. runs-on: macos-11
  112. steps:
  113. - uses: actions/checkout@v2
  114. - uses: mikehardy/buildcache-action@50738c6c77de7f34e66b870e4f8ede333b69d077
  115. with:
  116. cache_key: ${{ matrix.os }}
  117. - name: Setup Bundler
  118. run: scripts/setup_bundler.sh
  119. - name: Prereqs
  120. run: scripts/install_prereqs.sh RemoteConfigSample iOS
  121. - name: Build
  122. run: scripts/build.sh RemoteConfigSample iOS
  123. remoteconfig-cron-only:
  124. # Don't run on private repo.
  125. if: github.event_name == 'schedule' && github.repository == 'Firebase/firebase-ios-sdk'
  126. runs-on: macos-11
  127. strategy:
  128. matrix:
  129. target: [ios, tvos, macos]
  130. flags: [
  131. '--skip-tests --use-static-frameworks'
  132. ]
  133. needs: pod-lib-lint
  134. steps:
  135. - uses: actions/checkout@v2
  136. - name: Setup Bundler
  137. run: scripts/setup_bundler.sh
  138. - name: PodLibLint RemoteConfig Cron
  139. run: |
  140. scripts/third_party/travis/retry.sh scripts/pod_lib_lint.rb FirebaseRemoteConfig.podspec --platforms=${{ matrix.target }} ${{ matrix.flags }}