firestore.yml 4.6 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179
  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. runs-on: macos-latest
  51. steps:
  52. - uses: actions/checkout@v2
  53. - name: Setup check
  54. run: scripts/setup_check.sh
  55. - name: Run check
  56. run: scripts/check.sh --test-only
  57. cmake:
  58. needs: check
  59. strategy:
  60. matrix:
  61. os: [macos-latest, ubuntu-latest]
  62. runs-on: ${{ matrix.os }}
  63. steps:
  64. - uses: actions/checkout@v2
  65. - name: Prepare ccache
  66. uses: actions/cache@v1
  67. with:
  68. path: ~/.ccache
  69. key: firestore-ccache-${{ runner.os }}-${{ github.sha }}
  70. restore-keys: |
  71. firestore-ccache-${{ runner.os }}-
  72. - name: Setup build
  73. run: scripts/install_prereqs.sh Firestore ${{ runner.os }} cmake
  74. - name: Build and test
  75. run: scripts/third_party/travis/retry.sh scripts/build.sh Firestore ${{ runner.os }} cmake
  76. sanitizers:
  77. runs-on: macos-latest
  78. needs: check
  79. strategy:
  80. matrix:
  81. sanitizer: [asan, tsan]
  82. env:
  83. SANITIZERS: ${{ matrix.sanitizer }}
  84. steps:
  85. - uses: actions/checkout@v2
  86. - name: Prepare ccache
  87. uses: actions/cache@v1
  88. with:
  89. path: ~/.ccache
  90. key: firestore-ccache-${{ runner.os }}-${{ matrix.sanitizer }}-${{ github.sha }}
  91. restore-keys: |
  92. firestore-ccache-${{ runner.os }}-${{ matrix.sanitizer }}-
  93. - name: Setup build
  94. run: scripts/install_prereqs.sh Firestore ${{ runner.os }} cmake
  95. - name: Build and test
  96. run: scripts/third_party/travis/retry.sh scripts/build.sh Firestore ${{ runner.os }} cmake
  97. xcodebuild:
  98. runs-on: macos-latest
  99. needs: check
  100. strategy:
  101. matrix:
  102. target: [iOS, tvOS, macOS]
  103. steps:
  104. - uses: actions/checkout@v2
  105. - name: Setup build
  106. run: scripts/install_prereqs.sh Firestore ${{ matrix.target }} xcodebuild
  107. - name: Build and test
  108. run: scripts/third_party/travis/retry.sh scripts/build.sh Firestore ${{ matrix.target }} xcodebuild
  109. pod-lib-lint:
  110. runs-on: macos-latest
  111. needs: check
  112. steps:
  113. - uses: actions/checkout@v2
  114. - name: Setup Bundler
  115. run: ./scripts/setup_bundler.sh
  116. - name: Pod lib lint
  117. run: |
  118. scripts/third_party/travis/retry.sh scripts/pod_lib_lint.rb FirebaseFirestore.podspec \
  119. --platforms=ios \
  120. --allow-warnings
  121. quickstart:
  122. env:
  123. plist_secret: ${{ secrets.GHASecretsGPGPassphrase1 }}
  124. signin_secret: ${{ secrets.GHASecretsGPGPassphrase1 }}
  125. runs-on: macOS-latest
  126. needs: check
  127. steps:
  128. - uses: actions/checkout@v2
  129. - name: Setup quickstart
  130. run: scripts/setup_quickstart.sh firestore
  131. - name: Install Secret GoogleService-Info.plist
  132. run: scripts/decrypt_gha_secret.sh scripts/gha-encrypted/qs-firestore.plist.gpg \
  133. quickstart-ios/firestore/GoogleService-Info.plist "$plist_secret"
  134. - name: Install Secret FIREGSignInInfo.h
  135. run: scripts/decrypt_gha_secret.sh scripts/gha-encrypted/FIREGSignInInfo.h.gpg \
  136. quickstart-ios/TestUtils/FIREGSignInInfo.h "$signin_secret"
  137. - name: Test swift quickstart
  138. run: ([ -z $plist_secret ] ||
  139. scripts/third_party/travis/retry.sh scripts/test_quickstart.sh Firestore)