firestore.yml 4.6 KB

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