firestore.yml 5.5 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191
  1. # Copyright 2020 Google LLC
  2. #
  3. # Licensed under the Apache License, Version 2.0 (the "License");
  4. # you may not use this file except in compliance with the License.
  5. # You may obtain a copy of the License at
  6. #
  7. # http://www.apache.org/licenses/LICENSE-2.0
  8. #
  9. # Unless required by applicable law or agreed to in writing, software
  10. # distributed under the License is distributed on an "AS IS" BASIS,
  11. # WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
  12. # See the License for the specific language governing permissions and
  13. # limitations under the License.
  14. name: firestore
  15. on:
  16. pull_request:
  17. paths:
  18. # Firestore sources
  19. - 'Firestore/**'
  20. # Interop headers
  21. - 'Interop/Auth/Public/*.h'
  22. # Podspec
  23. - 'FirebaseFirestore.podspec'
  24. # CMake
  25. - 'CMakeLists.txt'
  26. - 'cmake/**'
  27. # Build scripts to which Firestore is sensitive
  28. #
  29. # Note that this doesn't include check scripts because changing those will
  30. # already trigger the check workflow.
  31. - 'scripts/binary_to_array.py'
  32. - 'scripts/build.sh'
  33. - 'scripts/install_prereqs.sh'
  34. - 'scripts/localize_podfile.swift'
  35. - 'scripts/pod_lib_lint.rb'
  36. - 'scripts/run_firestore_emulator.sh'
  37. - 'scripts/setup_*'
  38. - 'scripts/sync_project.rb'
  39. - 'scripts/test_quickstart.sh'
  40. - 'scripts/xcresult_logs.py'
  41. # This workflow
  42. - '.github/workflows/firestore.yml'
  43. # Rebuild on Ruby infrastructure changes.
  44. - 'Gemfile'
  45. schedule:
  46. # Run every day at 11pm (PST) - cron uses UTC times
  47. - cron: '0 7 * * *'
  48. jobs:
  49. check:
  50. # Don't run on private repo unless it is a PR.
  51. if: github.repository != 'FirebasePrivate/firebase-ios-sdk' || github.event_name == 'pull_request'
  52. runs-on: macos-latest
  53. steps:
  54. - uses: actions/checkout@v2
  55. - name: Setup check
  56. run: scripts/setup_check.sh
  57. - name: Run check
  58. run: scripts/check.sh --test-only
  59. cmake:
  60. # Don't run on private repo unless it is a PR.
  61. if: github.repository != 'FirebasePrivate/firebase-ios-sdk' || github.event_name == 'pull_request'
  62. needs: check
  63. strategy:
  64. matrix:
  65. os: [macos-latest, ubuntu-latest]
  66. runs-on: ${{ matrix.os }}
  67. steps:
  68. - uses: actions/checkout@v2
  69. - name: Prepare ccache
  70. uses: actions/cache@v1
  71. with:
  72. path: ~/.ccache
  73. key: firestore-ccache-${{ runner.os }}-${{ github.sha }}
  74. restore-keys: |
  75. firestore-ccache-${{ runner.os }}-
  76. - name: Setup build
  77. run: scripts/install_prereqs.sh Firestore ${{ runner.os }} cmake
  78. - name: Build and test
  79. run: scripts/third_party/travis/retry.sh scripts/build.sh Firestore ${{ runner.os }} cmake
  80. sanitizers:
  81. # Don't run on private repo unless it is a PR.
  82. if: github.repository != 'FirebasePrivate/firebase-ios-sdk' || github.event_name == 'pull_request'
  83. runs-on: macos-latest
  84. needs: check
  85. strategy:
  86. matrix:
  87. sanitizer: [asan, tsan]
  88. env:
  89. SANITIZERS: ${{ matrix.sanitizer }}
  90. steps:
  91. - uses: actions/checkout@v2
  92. - name: Prepare ccache
  93. uses: actions/cache@v1
  94. with:
  95. path: ~/.ccache
  96. key: firestore-ccache-${{ runner.os }}-${{ matrix.sanitizer }}-${{ github.sha }}
  97. restore-keys: |
  98. firestore-ccache-${{ runner.os }}-${{ matrix.sanitizer }}-
  99. - name: Setup build
  100. run: scripts/install_prereqs.sh Firestore ${{ runner.os }} cmake
  101. - name: Build and test
  102. run: scripts/third_party/travis/retry.sh scripts/build.sh Firestore ${{ runner.os }} cmake
  103. xcodebuild:
  104. # Don't run on private repo unless it is a PR.
  105. if: github.repository != 'FirebasePrivate/firebase-ios-sdk' || github.event_name == 'pull_request'
  106. runs-on: macos-latest
  107. needs: check
  108. strategy:
  109. matrix:
  110. target: [iOS, tvOS, macOS]
  111. steps:
  112. - uses: actions/checkout@v2
  113. - name: Setup build
  114. run: scripts/install_prereqs.sh Firestore ${{ matrix.target }} xcodebuild
  115. - name: Build and test
  116. run: scripts/third_party/travis/retry.sh scripts/build.sh Firestore ${{ matrix.target }} xcodebuild
  117. pod-lib-lint:
  118. # Don't run on private repo unless it is a PR.
  119. if: github.repository != 'FirebasePrivate/firebase-ios-sdk' || github.event_name == 'pull_request'
  120. runs-on: macos-latest
  121. needs: check
  122. steps:
  123. - uses: actions/checkout@v2
  124. - name: Setup Bundler
  125. run: ./scripts/setup_bundler.sh
  126. - name: Pod lib lint
  127. run: |
  128. scripts/third_party/travis/retry.sh scripts/pod_lib_lint.rb FirebaseFirestore.podspec \
  129. --platforms=ios \
  130. --allow-warnings
  131. quickstart:
  132. # Don't run on private repo unless it is a PR.
  133. if: github.repository != 'FirebasePrivate/firebase-ios-sdk' || github.event_name == 'pull_request'
  134. env:
  135. plist_secret: ${{ secrets.GHASecretsGPGPassphrase1 }}
  136. signin_secret: ${{ secrets.GHASecretsGPGPassphrase1 }}
  137. runs-on: macOS-latest
  138. needs: check
  139. steps:
  140. - uses: actions/checkout@v2
  141. - name: Setup quickstart
  142. run: scripts/setup_quickstart.sh firestore
  143. - name: Install Secret GoogleService-Info.plist
  144. run: scripts/decrypt_gha_secret.sh scripts/gha-encrypted/qs-firestore.plist.gpg \
  145. quickstart-ios/firestore/GoogleService-Info.plist "$plist_secret"
  146. - name: Install Secret FIREGSignInInfo.h
  147. run: scripts/decrypt_gha_secret.sh scripts/gha-encrypted/FIREGSignInInfo.h.gpg \
  148. quickstart-ios/TestUtils/FIREGSignInInfo.h "$signin_secret"
  149. - name: Test swift quickstart
  150. run: ([ -z $plist_secret ] ||
  151. scripts/third_party/travis/retry.sh scripts/test_quickstart.sh Firestore)