firestore.yml 4.5 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173
  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. # Podspec
  21. - 'FirebaseFirestore.podspec'
  22. # CMake
  23. - 'CMakeLists.txt'
  24. - 'cmake/**'
  25. # Build scripts to which Firestore is sensitive
  26. #
  27. # Note that this doesn't include check scripts because changing those will
  28. # already trigger the check workflow.
  29. - 'scripts/binary_to_array.py'
  30. - 'scripts/build.sh'
  31. - 'scripts/install_prereqs.sh'
  32. - 'scripts/localize_podfile.swift'
  33. - 'scripts/pod_lib_lint.rb'
  34. - 'scripts/run_firestore_emulator.sh'
  35. - 'scripts/setup_*'
  36. - 'scripts/sync_project.rb'
  37. - 'scripts/test_quickstart.sh'
  38. - 'scripts/xcresult_logs.py'
  39. # This workflow
  40. - '.github/workflows/firestore.yml'
  41. schedule:
  42. # Run every day at 11pm (PST) - cron uses UTC times
  43. - cron: '0 7 * * *'
  44. jobs:
  45. check:
  46. runs-on: macos-latest
  47. steps:
  48. - uses: actions/checkout@v2
  49. - name: Setup check
  50. run: scripts/setup_check.sh
  51. - name: Run check
  52. run: scripts/check.sh --test-only
  53. cmake:
  54. needs: check
  55. strategy:
  56. matrix:
  57. os: [macos-latest, ubuntu-latest]
  58. runs-on: ${{ matrix.os }}
  59. steps:
  60. - uses: actions/checkout@v2
  61. - name: Prepare ccache
  62. uses: actions/cache@v1
  63. with:
  64. path: ~/.ccache
  65. key: firestore-ccache-${{ runner.os }}-${{ github.sha }}
  66. restore-keys: |
  67. firestore-ccache-${{ runner.os }}-
  68. - name: Setup build
  69. run: scripts/install_prereqs.sh Firestore ${{ runner.os }} cmake
  70. - name: Build and test
  71. run: scripts/third_party/travis/retry.sh scripts/build.sh Firestore ${{ runner.os }} cmake
  72. sanitizers:
  73. runs-on: macos-latest
  74. needs: check
  75. strategy:
  76. matrix:
  77. sanitizer: [asan, tsan]
  78. env:
  79. SANITIZERS: ${{ matrix.sanitizer }}
  80. steps:
  81. - uses: actions/checkout@v2
  82. - name: Prepare ccache
  83. uses: actions/cache@v1
  84. with:
  85. path: ~/.ccache
  86. key: firestore-ccache-${{ runner.os }}-${{ matrix.sanitizer }}-${{ github.sha }}
  87. restore-keys: |
  88. firestore-ccache-${{ runner.os }}-${{ matrix.sanitizer }}-
  89. - name: Setup build
  90. run: scripts/install_prereqs.sh Firestore ${{ runner.os }} cmake
  91. - name: Build and test
  92. run: scripts/third_party/travis/retry.sh scripts/build.sh Firestore ${{ runner.os }} cmake
  93. xcodebuild:
  94. runs-on: macos-latest
  95. needs: check
  96. strategy:
  97. matrix:
  98. target: [iOS, tvOS, macOS]
  99. steps:
  100. - uses: actions/checkout@v2
  101. - name: Setup build
  102. run: scripts/install_prereqs.sh Firestore ${{ matrix.target }} xcodebuild
  103. - name: Build and test
  104. run: scripts/third_party/travis/retry.sh scripts/build.sh Firestore ${{ matrix.target }} xcodebuild
  105. pod-lib-lint:
  106. runs-on: macos-latest
  107. needs: check
  108. steps:
  109. - uses: actions/checkout@v2
  110. - name: Setup Bundler
  111. run: ./scripts/setup_bundler.sh
  112. - name: Pod lib lint
  113. run: |
  114. scripts/third_party/travis/retry.sh scripts/pod_lib_lint.rb FirebaseFirestore.podspec \
  115. --platforms=ios \
  116. --allow-warnings
  117. quickstart:
  118. runs-on: macOS-latest
  119. needs: check
  120. steps:
  121. - uses: actions/checkout@v2
  122. - name: Setup quickstart
  123. run: scripts/setup_quickstart.sh firestore
  124. - name: Install Secret GoogleService-Info.plist
  125. env:
  126. plist_secret: ${{ secrets.QsFirestorePlistSecret }}
  127. run: scripts/decrypt_gha_secret.sh scripts/gha-encrypted/qs-firestore.plist.gpg \
  128. quickstart-ios/firestore/GoogleService-Info.plist "$plist_secret"
  129. - name: Install Secret FIREGSignInInfo.h
  130. env:
  131. signin_secret: ${{ secrets.QsSignInSecret }}
  132. run: scripts/decrypt_gha_secret.sh scripts/gha-encrypted/FIREGSignInInfo.h.gpg \
  133. quickstart-ios/TestUtils/FIREGSignInInfo.h "$signin_secret"
  134. - name: Test quickstart
  135. run: scripts/third_party/travis/retry.sh scripts/test_quickstart.sh Firestore